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) . |
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 PlanningSolution
boolean isConstraintMatchEnabled()
ScoreDirector.isConstraintMatchEnabled()
for the ScoreDirector
which contains this ScoreHolder
.
Defaults to true.
ConstraintMatch
s and ConstraintMatchTotal
s 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 falseCopyright © 2006–2016 JBoss by Red Hat. All rights reserved.