public class SimpleBigDecimalScoreHolder extends AbstractScoreHolder
SimpleBigDecimalScore,
Serialized FormAbstractScoreHolder.ConstraintActivationUnMatchListener| Modifier and Type | Field and Description |
|---|---|
protected BigDecimal |
score |
constraintMatchEnabled, constraintMatchTotalMap, indictmentMap, zeroScore| Constructor and Description |
|---|
SimpleBigDecimalScoreHolder(boolean constraintMatchEnabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
BigDecimal weight) |
Score |
extractScore(int initScore)
|
BigDecimal |
getScore() |
extractJustificationList, getConstraintMatchTotals, getIndictmentMap, isConstraintMatchEnabled, registerConstraintMatchprotected BigDecimal score
public SimpleBigDecimalScoreHolder(boolean constraintMatchEnabled)
public BigDecimal getScore()
public void addConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
BigDecimal weight)
kcontext - never null, the magic variable in DRLweight - never null, higher is better, negative for a penalty, positive for a rewardpublic Score extractScore(int initScore)
ScoreHolderScore, 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 PlanningSolutionCopyright © 2006–2017 JBoss by Red Hat. All rights reserved.