so basically my problem is, that OptaPlanner is throwing this:
java.lang.IllegalStateException: The entity (...) has a variable (previousEntry) with value (.
I have the same problem and managed to avoid the issue with a MoveFilter that prevents the situation Frank explains in his answer (one move affecting another in a compositMove). Here is my badly coded proof of concept for the workaround:
public class ParallelTaskMoveFilter
implements SelectionFilter> {
@Override
public boolean accept(ScoreDirector scoreDirector,
CompositeMove selection) {
Move[] childMoves = selection.getMoves();
ChangeMove firstMove = (ChangeMove) childMoves[0];
ChangeMove secondMove = (ChangeMove) childMoves[1];
DailyRoute srcRoute1 = ((RouteItem) firstMove.getEntity()).getDailyRoute();
DailyRoute destRoute1 = ((RouteItem) firstMove.getToPlanningValue()).getDailyRoute();
DailyRoute srcRoute2 = ((RouteItem) secondMove.getEntity()).getDailyRoute();
DailyRoute destRoute2 = ((RouteItem) secondMove.getToPlanningValue()).getDailyRoute();
return !srcRoute1.equals(srcRoute2) && !srcRoute1.equals(destRoute2) && !destRoute2.equals(destRoute1)
&& !srcRoute2.equals(destRoute1);
}
}