public class HardMediumSoftLongScoreHolder extends AbstractScoreHolder
HardMediumSoftScore,
Serialized FormAbstractScoreHolder.BigDecimalConstraintUndoListener, AbstractScoreHolder.ConstraintUndoListener, AbstractScoreHolder.DoubleConstraintUndoListener, AbstractScoreHolder.IntConstraintUndoListener, AbstractScoreHolder.LongConstraintUndoListener| Modifier and Type | Field and Description |
|---|---|
protected long |
hardScore |
protected long |
mediumScore |
protected long |
softScore |
constraintMatchEnabled, constraintMatchTotalMap| Constructor and Description |
|---|
HardMediumSoftLongScoreHolder(boolean constraintMatchEnabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
long weight) |
void |
addMediumConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
long weight) |
void |
addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
long weight) |
Score |
extractScore(int initScore)
|
long |
getHardScore() |
long |
getMediumScore() |
long |
getSoftScore() |
getConstraintMatchTotals, isConstraintMatchEnabled, registerBigDecimalConstraintMatch, registerDoubleConstraintMatch, registerIntConstraintMatch, registerLongConstraintMatchprotected long hardScore
protected long mediumScore
protected long softScore
public HardMediumSoftLongScoreHolder(boolean constraintMatchEnabled)
public long getHardScore()
public long getMediumScore()
public long getSoftScore()
public void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
long weight)
kcontext - never null, the magic variable in DRLweight - higher is better, negative for a penalty, positive for a rewardpublic void addMediumConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
long weight)
kcontext - never null, the magic variable in DRLweight - higher is better, negative for a penalty, positive for a rewardpublic void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
long weight)
kcontext - never null, the magic variable in DRLweight - 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–2016 JBoss by Red Hat. All rights reserved.