public class SimpleDoubleScoreHolder extends AbstractScoreHolder
SimpleDoubleScoreHolder
instead.SimpleDoubleScore
,
Serialized FormAbstractScoreHolder.BigDecimalConstraintUndoListener, AbstractScoreHolder.ConstraintUndoListener, AbstractScoreHolder.DoubleConstraintUndoListener, AbstractScoreHolder.IntConstraintUndoListener, AbstractScoreHolder.LongConstraintUndoListener
Modifier and Type | Field and Description |
---|---|
protected double |
score |
constraintMatchEnabled, constraintMatchTotalMap
Constructor and Description |
---|
SimpleDoubleScoreHolder(boolean constraintMatchEnabled) |
Modifier and Type | Method and Description |
---|---|
void |
addConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
double weight) |
Score |
extractScore(int initScore)
|
double |
getScore() |
getConstraintMatchTotals, isConstraintMatchEnabled, registerBigDecimalConstraintMatch, registerDoubleConstraintMatch, registerIntConstraintMatch, registerLongConstraintMatch
public SimpleDoubleScoreHolder(boolean constraintMatchEnabled)
public double getScore()
public void addConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext, double weight)
kcontext
- never null, the magic variable in DRLweight
- higher is better, negative for a penalty, positive for a rewardpublic Score extractScore(int initScore)
ScoreHolder
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
Copyright © 2006–2016 JBoss by Red Hat. All rights reserved.