[jboss-jira] [JBoss JIRA] (JBRULES-3643) Drools Planner score corruption during construction heuristics if there are rules that check if planning variable is null
Reinis Vicups (JIRA)
jira-events at lists.jboss.org
Sun Sep 30 20:11:04 EDT 2012
[ https://issues.jboss.org/browse/JBRULES-3643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Reinis Vicups updated JBRULES-3643:
-----------------------------------
Git Pull Request: https://github.com/droolsjbpm/drools-planner/pull/12 (was: https://github.com/droolsjbpm/drools-planner/pull/12)
Affects Version/s: 5.5.0.Beta1
Workaround: (was: Workaround Exists)
> 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, 5.5.0.Beta1
> Environment: linux 32bit JavaSE 1.6
> Reporter: Reinis Vicups
> Assignee: Geoffrey De Smet
>
> 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
More information about the jboss-jira
mailing list