[jboss-jira] [JBoss JIRA] (DROOLS-200) score corruption when using insertLogical with custom objects
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Mon Jul 29 11:15:27 EDT 2013
[ https://issues.jboss.org/browse/DROOLS-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793508#comment-12793508 ]
Geoffrey De Smet commented on DROOLS-200:
-----------------------------------------
Reproduced this way. I 've isolated it to the moves 224, 225, 226, 227:
{code}
29-07-13 17:13:51 INFO - nstructionHeuristicSolverPhase - Phase (0) constructionHeuristic ended: step total (0), time spend (111), best score (0hard/-5soft).
29-07-13 17:13:51 TRACE - LocalSearchDecider - Move index (224), score (0hard/-6soft), accepted (true) for move (Conversation 4: Family 1, Student 4, Teacher 0, Timeslot 4 => Timeslot 0).
29-07-13 17:13:51 TRACE - LocalSearchDecider - Move index (225), score (0hard/-4soft), accepted (true) for move (Conversation 2: Family 1, Student 2, Teacher 0, Timeslot 2 => Timeslot 3).
29-07-13 17:13:51 TRACE - LocalSearchDecider - Move index (226), score (0hard/-4soft), accepted (true) for move (Conversation 0: Family 0, Student 0, Teacher 0, Timeslot 0 => Timeslot 1).
Exception in thread "main" java.lang.IllegalStateException: Score corruption: the workingScore (0hard/-6soft) is not the uncorruptedScore (0hard/-5soft) after completedAction (Conversation 4: Family 1, Student 4, Teacher 0, Timeslot 1 => Timeslot 1):
The corrupted scoreDirector has 1 ConstraintMatch(s) which are in excess (and should not be there):
defaultpkg/familyCompact/level1/[FamilyEnd Family 1, Timeslot 2, FamilyStart Family 1, Timeslot 1]=-1
The corrupted scoreDirector has no ConstraintMatch(s) which are missing.
Check your score constraints.
at org.optaplanner.core.impl.score.director.AbstractScoreDirector.assertWorkingScoreFromScratch(AbstractScoreDirector.java:292)
at org.optaplanner.core.impl.solver.scope.DefaultSolverScope.assertWorkingScoreFromScratch(DefaultSolverScope.java:109)
at org.optaplanner.core.impl.phase.AbstractSolverPhaseScope.assertWorkingScoreFromScratch(AbstractSolverPhaseScope.java:132)
at org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider.processMove(LocalSearchDecider.java:153)
at org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider.doMove(LocalSearchDecider.java:138)
at org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider.decideNextStep(LocalSearchDecider.java:111)
at org.optaplanner.core.impl.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:62)
at org.optaplanner.core.impl.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:155)
{code}
> score corruption when using insertLogical with custom objects
> -------------------------------------------------------------
>
> Key: DROOLS-200
> URL: https://issues.jboss.org/browse/DROOLS-200
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.Beta5
> Reporter: Pieter van den Brink
> Assignee: Mario Fusco
> Attachments: drools-200-isolated-reproducer-v2.zip, drools-200-isolated-reproducer-v3.zip, drools-200-isolated-reproducer.tar.gz, reproducer.zip
>
>
> When using a rule with insertLogical to insert custom objects, score corruption occurs in certain situations. It seems like the custom objects aren't always inserted or retracted properly after a move. This causes any rule that depends on these custom objects to fire multiple times, which corrupts the score.
> Attached is a reproducer which demonstrates the issue. Also see the forum reference for a detailed discussion.
--
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