org.optaplanner.core.impl.score.director.incremental
Interface ConstraintMatchAwareIncrementalScoreCalculator<Sol extends Solution>
- Type Parameters:
Sol -
- All Superinterfaces:
- IncrementalScoreCalculator<Sol>
- All Known Implementing Classes:
- CheapTimeIncrementalScoreCalculator, MachineReassignmentIncrementalScoreCalculator
public interface ConstraintMatchAwareIncrementalScoreCalculator<Sol extends Solution>
- extends IncrementalScoreCalculator<Sol>
Allows a IncrementalScoreCalculator to report ConstraintMatchTotals
for explaining a score (= which score constraints match for how much)
and also for score corruption analysis.
- See Also:
IncrementalScoreCalculator
resetWorkingSolution
void resetWorkingSolution(Sol workingSolution,
boolean constraintMatchEnabled)
- Allows for increased performance by tracking only if constraintMatchEnabled is true.
Every implementation should call
IncrementalScoreCalculator.resetWorkingSolution(Solution)
and only handle the constraintMatchEnabled parameter specifically (or ignore it).
- Parameters:
workingSolution - never null, to pass to IncrementalScoreCalculator.resetWorkingSolution(Solution).constraintMatchEnabled - true if getConstraintMatchTotals() might be called.
getConstraintMatchTotals
Collection<ConstraintMatchTotal> getConstraintMatchTotals()
- Returns:
- never null
- Throws:
IllegalStateException - if resetWorkingSolution(Solution, boolean)'s
constraintMatchEnabled parameter was false- See Also:
ScoreDirector.getConstraintMatchTotals()
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.