public class HardMediumSoftScoreHolder extends AbstractScoreHolder
HardMediumSoftScore,
Serialized FormAbstractScoreHolder.ConstraintActivationUnMatchListener| Modifier and Type | Field and Description |
|---|---|
protected int |
hardScore |
protected int |
mediumScore |
protected int |
softScore |
constraintMatchEnabled, constraintMatchTotalMap, indictmentMap, zeroScore| Constructor and Description |
|---|
HardMediumSoftScoreHolder(boolean constraintMatchEnabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int hardWeight) |
void |
addMediumConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int mediumWeight) |
void |
addMultiConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int hardWeight,
int mediumWeight,
int softWeight) |
void |
addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int softWeight) |
Score |
extractScore(int initScore)
|
int |
getHardScore() |
int |
getMediumScore() |
int |
getSoftScore() |
extractJustificationList, getConstraintMatchTotals, getIndictmentMap, isConstraintMatchEnabled, registerConstraintMatchprotected int hardScore
protected int mediumScore
protected int softScore
public HardMediumSoftScoreHolder(boolean constraintMatchEnabled)
public int getHardScore()
public int getMediumScore()
public int getSoftScore()
public void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int hardWeight)
kcontext - never null, the magic variable in DRLhardWeight - higher is better, negative for a penalty, positive for a rewardpublic void addMediumConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int mediumWeight)
kcontext - never null, the magic variable in DRLmediumWeight - higher is better, negative for a penalty, positive for a rewardpublic void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int softWeight)
kcontext - never null, the magic variable in DRLsoftWeight - higher is better, negative for a penalty, positive for a rewardpublic void addMultiConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
int hardWeight,
int mediumWeight,
int softWeight)
kcontext - never null, the magic variable in DRLhardWeight - higher is better, negative for a penalty, positive for a rewardmediumWeight - higher is better, negative for a penalty, positive for a rewardsoftWeight - 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.