Solution_ - the solution type, the class with the PlanningSolution annotationScore_ - the score type to go with the solutionpublic interface ConstraintMatchAwareIncrementalScoreCalculator<Solution_,Score_ extends Score> extends IncrementalScoreCalculator<Solution_,Score_>
IncrementalScoreCalculator to report ConstraintMatchTotals
for explaining a score (= which score constraints match for how much)
and also for score corruption analysis.| Modifier and Type | Method and Description |
|---|---|
Collection<ConstraintMatchTotal> |
getConstraintMatchTotals() |
Map<Object,Indictment> |
getIndictmentMap() |
void |
resetWorkingSolution(Solution_ workingSolution,
boolean constraintMatchEnabled)
Allows for increased performance because it only tracks if constraintMatchEnabled is true.
|
afterEntityAdded, afterEntityRemoved, afterVariableChanged, beforeEntityAdded, beforeEntityRemoved, beforeVariableChanged, calculateScore, resetWorkingSolutionvoid resetWorkingSolution(Solution_ workingSolution, boolean constraintMatchEnabled)
Every implementation should call resetWorkingSolution(Solution_, boolean)
and only handle the constraintMatchEnabled parameter specifically (or ignore it).
workingSolution - never null, to pass to resetWorkingSolution(Solution_, boolean).constraintMatchEnabled - true if getConstraintMatchTotals() or getIndictmentMap() might be called.Collection<ConstraintMatchTotal> getConstraintMatchTotals()
IllegalStateException - if resetWorkingSolution(Solution_, boolean)'s constraintMatchEnabled parameter was falseScoreDirector.getConstraintMatchTotals()Map<Object,Indictment> getIndictmentMap()
getConstraintMatchTotals()IllegalStateException - if resetWorkingSolution(Solution_, boolean)'s constraintMatchEnabled parameter was falseScoreDirector.getIndictmentMap()Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.