[
https://issues.jboss.org/browse/JBRULES-3643?page=com.atlassian.jira.plug...
]
Geoffrey De Smet commented on JBRULES-3643:
-------------------------------------------
Occurs because undoWM and lastStepWM are different: the entity is inserted but not
retracted.
The undoSolution and the lastStepSolution are equal.
Needs to be fixed with the work for the scalable constr heuristics
Drools Planner score corruption during construction heuristics if
there are rules that check if planning variable is null
-------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3643
URL:
https://issues.jboss.org/browse/JBRULES-3643
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-planner
Affects Versions: 5.4.0.Final
Environment: linux 32bit JavaSE 1.6
Reporter: Reinis Vicups
Assignee: Geoffrey De Smet
Priority: Minor
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.
{code}
rule "no foo without bar"
when
$foo : Foo(bar == null)
then
insertLogical( new IntConstraintOccurrence("foo without bar",
ConstraintType.NEGATIVE_HARD, 1, $foo) );
end
{code}
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):
{code}
...
if (assertUndoMoveIsUncorrupted) {
GreedyFitSolverPhaseScope greedyFitSolverPhaseScope =
moveScope.getGreedyFitStepScope()
.getGreedyFitSolverPhaseScope();
Score undoScore = greedyFitSolverPhaseScope.calculateScore();
Score lastCompletedStepScore =
greedyFitSolverPhaseScope.getLastCompletedStepScope().getScore();
if (!undoScore.equals(lastCompletedStepScore)) { //<-- HERE scores
deviate!
...
{code}
Again, this occurs only in DEBUG environment mode!
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira