Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-73

Planner's "presumedScore is corrupted because it is not the realScore" exception should analyse and clearly list what could be wrong.

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Critical
    • 5.4.0.Final
    • None
    • optaplanner-core
    • None

    Description

      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).

      Attachments

        Activity

          People

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: