0

I need to plan the placement of a set of virtualized functionalities over a set of servers using OptaPlanner. My functionalities needs to be executed in a specific pre-defined order, forming a Service Function Chain.

For example Let's say 2 chains are defined

  1. F1->F2
  2. F1->F2->F3

The goal is to place them on a set of servers while minimizing the costs (bandwidth, CPU, Storage,.. costs)

The examples I see in the OptaPlanner user guide for a set of chained planning entities include the Traveler Salesman Problem (TSP) and VRP, however in theses problems the planning entities do not need to be planned in a specific order.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Elaheh
  • 13
  • 6

1 Answers1

0

If the sequence order of the functionalities is given you can just give it a bad score if the planned sequence is not correct. e.g. (pseudorule)

rule "keepServiceFunctionChainSequence"
when
  Functionality($chainId:chainId,$end:end, $orderPos:orderPos)
  // find another entity in the same chain with a higher position in the order
  // that starts earlier
  Functionality(chainId==$chainId, orderPos>$orderPos, start.before($end), $orderPos2)
then
  scoreHolder.addHardConstraintMatch(kcontext, $orderPos2-$orderPos);
end

if you have a lot of functionalities to plan and you see too many useless moves it may be smart to make an own move that moves one whole chain at once and keeps the sequence.

Wolkenfels
  • 43
  • 7