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

Assertion for VariableListener corruption should figure out which shadow variable value is stale

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 6.3.0.Final
    • 6.2.0.Final
    • optaplanner-core
    • None
    • NEW
    • NEW

      This error message doesn't give enough diagnostic information:

      Caused by: java.lang.IllegalStateException: UndoMove corruption: the beforeMoveScore (0hard/0soft) is not the undoScore (-570hard/0soft) which is the uncorruptedScore (-570hard/0soft) of the workingSolution.
      1) Enable EnvironmentMode FULL_ASSERT (if you haven't already) to fail-faster in case there's a score corruption.
      2) Check the Move.createUndoMove(...) method of the moveClass (class org.optaplanner.core.impl.heuristic.selector.move.generic.chained.ChainedChangeMove). The move (B1 {B0 -> C1}) might have a corrupted undoMove (B1 {B0 -> B0}
      
      ).
      3) Check your custom VariableListeners (if you have any) for shadow variables that are used by the score constraints with a different score weight between the beforeMoveScore (0hard/0soft) and the undoScore (-570hard/0soft).
      at org.optaplanner.core.impl.phase.scope.AbstractPhaseScope.assertExpectedUndoMoveScore(AbstractPhaseScope.java:140)
      ...
      

              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

                Created:
                Updated:
                Resolved: