-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
linux 32bit JavaSE 1.6
A score corruption occurs in DEBUG environment Mode during construction heuristics if there are rules that add constraints if planning variable is null e.g.
rule "no foo without bar" when $foo : Foo(bar == null) then insertLogical( new IntConstraintOccurrence("foo without bar", ConstraintType.NEGATIVE_HARD, 1, $foo) ); end
Debugging show following sympthoms: While org.drools.planner.core.constructionheuristic.greedyFit.decider.DefaultGreedyDecider executed doMove() a deviation between undoScore and lastCompletedStepScore occur (around the 108th line of code):
...
if (assertUndoMoveIsUncorrupted) {
GreedyFitSolverPhaseScope greedyFitSolverPhaseScope = moveScope.getGreedyFitStepScope()
.getGreedyFitSolverPhaseScope();
Score undoScore = greedyFitSolverPhaseScope.calculateScore();
Score lastCompletedStepScore = greedyFitSolverPhaseScope.getLastCompletedStepScope().getScore();
if (!undoScore.equals(lastCompletedStepScore)) { //<-- HERE scores deviate!
...
Again, this occurs only in DEBUG environment mode!