I am creating a solver using the time grain pattern. It is similar to meeting scheduling. It does have immovable entities implemented to support fixed schedules by the user.
While starting the solver the construction heuristic ends leaving -2 init score. The termination criteria is 30 secs. After this the solution terminates without proper solution as seen in the log below.
Where am I going wrong ?
19:23:25.587 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving started: time spent (22), best score (-4init/0hard/0soft), environment mode (REPRODUCIBLE), random (JDK with seed 0).
19:23:25.613 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (0), time spent (50), score (-3init/1522656532800hard/12soft), selected move count (96), picked move (com.atomiton.vopak.activities.Activity@762ef0ea {null -> TimeGrain - 95 [1524180600000]}).
19:23:25.620 [main] DEBUG o.o.c.i.c.DefaultConstructionHeuristicPhase - CH step (1), time spent (57), score (-2init/3045313098000hard/24soft), selected move count (96), picked move (com.atomiton.vopak.activities.Activity@31f9b85e {null -> TimeGrain - 95 [1524180600000]}).
19:23:25.621 [main] INFO o.o.c.i.c.DefaultConstructionHeuristicPhase - Construction Heuristic phase (0) ended: time spent (58), best score (-2init/3045313098000hard/24soft), score calculation speed (6655/sec), step total (2).
19:23:55.563 [main] DEBUG o.o.c.i.l.DefaultLocalSearchPhase - LS step (0), time spent (30000), score (-2init/3045311298000hard/24soft), best score (-2init/3045313098000hard/24soft), accepted/selected move count (0/6961207), picked move (com.atomiton.vopak.activities.Activity@76ed1b7c {TimeGrain - 95 [1524180600000] -> TimeGrain - 94 [1524178800000]}).
19:23:55.563 [main] INFO o.o.c.i.l.DefaultLocalSearchPhase - Local Search phase (1) ended: time spent (30000), best score (-2init/3045313098000hard/24soft), score calculation speed (232497/sec), step total (1).
19:23:55.564 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving ended: time spent (30001), best score (-2init/3045313098000hard/24soft), score calculation speed (232038/sec), phase total (2), environment mode (REPRODUCIBLE).
Construction Heuristic phase (0) ended:
time spent (58),
best score (-2init/3045313098000hard/24soft),
score calculation speed (6655/sec),
step total (2).
2 steps, so only 2 entities are movable. The rest must be immovable, including the ones that cause the -2init
.
PS: There is something wrong with the hard score. Either it overflows (use long score variants) or it's constraint sign is wrong.
CH step (1), time spent (57), score (-2init/3045313098000hard/24soft),
selected move count (96),
picked move (...Activity@31f9b85e {null -> TimeGrain - 95 [1524180600000]})
The picked move seems to be a simple ChangeMove
, so there is only 1 planning variable.