-
Feature Request
-
Resolution: Done
-
Optional
-
7.3.0.Final
-
None
-
NEW
-
NEW
While implementing a ConstraintMatchAwareIncrementalScoreCalculator I noticed, that the removeConstraintMatch method in ConstraintMatchTotal is not working correctly, as there is no hashCode implementation for ConstraintMatch.
I am trying to use the ConstraintMatchTotal.getScore method to return the score in the calculateScore method, but it fails, since the beforeVariableChanged method cannot remove the respective ConstraintMatch.
Also, as it is today, the compareTo method of ConstraintMatch is not consistent with the equals method, thus it breaks the compareTo contract.
(I have modified OptaPlanner to include the equals and hashCode methods - consistent with compareTo - and it is working fine.)
- causes
-
PLANNER-921 Constraint matches dialog throws IllegalStateException in Machine reassignment example with data set model_a1_1
- Resolved
- is related to
-
PLANNER-916 Improve ConstraintMatchTotal and Indictment test coverage
- Open