See this image from the 6.0.0.Final docs:
Also see the section "incremental score calculation" (which also explains why this is so much faster than SimpleScoreCalculator). Look at the example implementations. You'll see that beforeVariableChanged()
is needed to retract the violated constraint matches that no longer match.
In the diagram above, the ChangeMove needs to get +1
because AB no longer match during the beforeVariableChanged()
method and -1
becaues AC now match during the afterVariableChanged
method.