public interface ScoreHolder
DroolsScoreDirector into the Drools DRL.
Other ScoreDirector implementations do not use this class.
An implementation must extend AbstractScoreHolder to ensure backwards compatibility in future versions.
AbstractScoreHolder| Modifier and Type | Method and Description |
|---|---|
Score |
extractScore(int initScore)
|
Collection<ConstraintMatchTotal> |
getConstraintMatchTotals()
Explains the
Score of extractScore(int). |
Map<Object,Indictment> |
getIndictmentMap()
Explains the impact of each planning entity or problem fact on the
Score. |
boolean |
isConstraintMatchEnabled()
Must be in sync with
ScoreDirector.isConstraintMatchEnabled()
for the ScoreDirector which contains this ScoreHolder. |
Score extractScore(int initScore)
Score, calculated by the KieSession for DroolsScoreDirector.
Should not be called directly, use ScoreDirector.calculateScore() instead.
initScore - <= 0, managed by OptaPlanner, needed as a parameter in the Score's creation
method, see Score.getInitScore()Score of the working PlanningSolutionboolean isConstraintMatchEnabled()
ScoreDirector.isConstraintMatchEnabled()
for the ScoreDirector which contains this ScoreHolder.
Defaults to true.
ConstraintMatchs and ConstraintMatchTotals do not need to be collected
which is a performance boostgetConstraintMatchTotals()Collection<ConstraintMatchTotal> getConstraintMatchTotals()
Score of extractScore(int).
Should not be called directly, use ScoreDirector.getConstraintMatchTotals() instead.
IllegalStateException - if isConstraintMatchEnabled() is falseScoreDirector.getConstraintMatchTotals()Map<Object,Indictment> getIndictmentMap()
Score.
Should not be called directly, use ScoreDirector.getIndictmentMap() instead.
IllegalStateException - if isConstraintMatchEnabled() returns falseScoreDirector.getIndictmentMap()Copyright © 2006–2017 JBoss by Red Hat. All rights reserved.