0
我想在opta planner教程中使用一個簡單的雲平衡示例。optaplanner不正確的雲平衡輸出
我有2臺計算機和4個進程(在opta planner文檔中說明了相同的例子)。每個進程需要一定數量的RAM和CPU。
最終解決的輸出不正確,您可以從下面的日誌中看到。嚴格的規定被違反。
理想情況下,流程1和4應該適合計算機1。 過程2和3應該適合計算機2.
從日誌看起來像HeuristicPhase發生但本地搜索沒有顯示在日誌中。
請指導我什麼東錯了。
After building unsolvedCloudBalance Computers [ Computer [C1][7 CPU][6 RAM], Computer [C2][6 CPU][6 RAM]] Processes [ Process [P1][5 CPU][5 RAM], Process [P2][4 CPU][3 RAM], Process [P3][2 CPU][3 RAM], Process [P4][2 CPU][1 RAM]] Hard Soft Score null
01:35:57.099 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving started: time spent (3), best score (4uninitialized/0hard/0soft), environment mode (REPRODUCIBLE), random (JDK with seed 0).
01:35:57.099 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving started: time spent (3), best score (4uninitialized/0hard/0soft), environment mode (REPRODUCIBLE), random (JDK with seed 0).
01:35:57.104 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (0), time spent (9), score (0hard/-800soft), selected move count (2), picked move (Process [P1][5 CPU][5 RAM] {null -> Computer [C2][6 CPU][6 RAM]}).
01:35:57.104 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (0), time spent (9), score (0hard/-800soft), selected move count (2), picked move (Process [P1][5 CPU][5 RAM] {null -> Computer [C2][6 CPU][6 RAM]}).
01:35:57.104 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (1), time spent (9), score (0hard/-1800soft), selected move count (2), picked move (Process [P2][4 CPU][3 RAM] {null -> Computer [C1][7 CPU][6 RAM]}).
01:35:57.104 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (1), time spent (9), score (0hard/-1800soft), selected move count (2), picked move (Process [P2][4 CPU][3 RAM] {null -> Computer [C1][7 CPU][6 RAM]}).
01:35:57.104 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (2), time spent (9), score (0hard/-1800soft), selected move count (1), picked move (Process [P3][2 CPU][3 RAM] {null -> Computer [C1][7 CPU][6 RAM]}).
01:35:57.104 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (2), time spent (9), score (0hard/-1800soft), selected move count (1), picked move (Process [P3][2 CPU][3 RAM] {null -> Computer [C1][7 CPU][6 RAM]}).
01:35:57.105 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (3), time spent (10), score (-1hard/-1800soft), selected move count (2), picked move (Process [P4][2 CPU][1 RAM] {null -> Computer [C2][6 CPU][6 RAM]}).
01:35:57.105 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (3), time spent (10), score (-1hard/-1800soft), selected move count (2), picked move (Process [P4][2 CPU][1 RAM] {null -> Computer [C2][6 CPU][6 RAM]}).
01:35:57.106 [main] INFO o.o.c.i.c.DefaultConstructionHeuristicPhase - Construction Heuristic phase (0) ended: step total (4), time spent (11), best score (-1hard/-1800soft).
01:35:57.106 [main] INFO o.o.c.i.c.DefaultConstructionHeuristicPhase - Construction Heuristic phase (0) ended: step total (4), time spent (11), best score (-1hard/-1800soft).
01:36:07.095 [main] DEBUG o.o.c.i.l.DefaultLocalSearchPhase - LS step (0), time spent (10000), score (-2hard/-1800soft), best score (-1hard/-1800soft), accepted/selected move count (0/9152031), picked move (Process [P4][2 CPU][1 RAM] { Computer [C2][6 CPU][6 RAM] -> Computer [C1][7 CPU][6 RAM]}).
01:36:07.095 [main] DEBUG o.o.c.i.l.DefaultLocalSearchPhase - LS step (0), time spent (10000), score (-2hard/-1800soft), best score (-1hard/-1800soft), accepted/selected move count (0/9152031), picked move (Process [P4][2 CPU][1 RAM] { Computer [C2][6 CPU][6 RAM] -> Computer [C1][7 CPU][6 RAM]}).
01:36:07.096 [main] INFO o.o.c.i.l.DefaultLocalSearchPhase - Local Search phase (1) ended: step total (1), time spent (10001), best score (-1hard/-1800soft).
01:36:07.096 [main] INFO o.o.c.i.l.DefaultLocalSearchPhase - Local Search phase (1) ended: step total (1), time spent (10001), best score (-1hard/-1800soft).
01:36:07.096 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving ended: time spent (10001), best score (-1hard/-1800soft), average calculate count per second (915112), environment mode (REPRODUCIBLE).
01:36:07.096 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving ended: time spent (10001), best score (-1hard/-1800soft), average calculate count per second (915112), environment mode (REPRODUCIBLE).
time taken 10 sec