[
https://issues.jboss.org/browse/JBRULES-3301?page=com.atlassian.jira.plug...
]
Geoffrey De Smet edited comment on JBRULES-3301 at 12/2/11 10:52 AM:
---------------------------------------------------------------------
I made some changes:
If the undoMove is corrupted, you get this message:
{code}
java.lang.IllegalStateException: The moveClass (class
org.drools.planner.examples.curriculumcourse.solver.move.PeriodChangeMove)'s move
(c0315{t054}-0 @ 4-1 + 36 {C42} => 4-1) probably has a corrupted undoMove
(c0315{t054}-0 @ 4-1 + 36 {C42} => 4-1). Or maybe there are corrupted score rules.
Check the Move.createUndoMove(...) method of that Move class and enable EnvironmentMode
TRACE to fail-faster on corrupted score rules.
Score corruption: the lastCompletedStepScore (-4hard/-454soft) is not the undoScore
(-6hard/-461soft).
{code}
If the score rules cause corruption, you get this message:
{code}
java.lang.IllegalStateException: Score corruption: the presumedScore (-1hard/-4858soft) is
not the uncorruptedScore (-1hard/-4096soft):
The workingMemory has 1 ConstraintOccurrence(s) in excess:
roomCapacity/NEGATIVE_SOFT:[36 {C42}, c0386{t060}-2 @ 4-4 + 36 {C42}]=4826
The workingMemory has 1 ConstraintOccurrence(s) lacking:
roomCapacity/NEGATIVE_SOFT:[36 {C42}, c0386{t060}-2 @ 4-4 + 36 {C42}]=4064
Check the score rules who created those ConstraintOccurrences. Verify that each
ConstraintOccurrence's causes and weight is correct.
{code}
was (Author: ge0ffrey):
I made some changes:
If the undoMove is corrupted, you get this message:
{code}
java.lang.IllegalStateException: The moveClass (class
org.drools.planner.examples.curriculumcourse.solver.move.PeriodChangeMove)'s move
(c0315{t054}-0 @ 4-1 + 36 {C42} => 4-1) has a corrupted undoMove (c0315{t054}-0 @ 4-1 +
36 {C42} => 4-1) or there is general score corruption.
Check the Move.createUndoMove(...) method and enable EnvironmentMode TRACE to fail-faster
on general score corruption.
...
{code}
Planner's "presumedScore is corrupted because it is not the
realScore" exception should analyse and clearly list what could be wrong.
-------------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3301
URL:
https://issues.jboss.org/browse/JBRULES-3301
Project: Drools
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: drools-planner
Affects Versions: 5.3.0.Final
Reporter: Geoffrey De Smet
Assignee: Geoffrey De Smet
Priority: Critical
Fix For: 5.4.0.Beta1
The exception "presumedScore is corrupted because it is not the realScore", can
occur for multiple reasons:
- The Move.createUndoMove() method is incorrectly implemented. If a Move A moves from X
to Z, then the undo Move should move A from Z to X.
- The score constraints do insertLogical's of something else than a class that
extends ConstraintOccurrence. Although it is technically not 100% required to do this,
there are specific technical requirements on those logically inserted classes by Drools
Expert to keep the score uncorrupted. So it's far easier just to use
IntConstraintOccurrence or to extend ConstraintOccurrence correctly.
- The score constraints, which do insertLogical's of ConstraintOccurrence, forget to
add a cause too little or too much. The exception message should identify which of the
ConstraintOccurrences are corrupted and only list those.
- Drools Expert 5.1 or lower is used (these possibly have bugs in the statefull working
memory. From drools 5.2 this is proven not the be the case).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira