HardSoftBigDecimalScoreHolder or a scaled HardSoftLongScoreHolder instead.@Deprecated public class HardSoftDoubleScoreHolder extends AbstractScoreHolder<HardSoftDoubleScore>
HardSoftBigDecimalScoreHolder instead.HardSoftDoubleScore,
Serialized FormAbstractScoreHolder.ConstraintActivationUnMatchListener| Modifier and Type | Field and Description |
|---|---|
protected double |
hardScore
Deprecated.
|
protected Map<org.kie.api.definition.rule.Rule,BiConsumer<org.kie.api.runtime.rule.RuleContext,Double>> |
matchExecutorByNumberMap
Deprecated.
|
protected Map<org.kie.api.definition.rule.Rule,BiConsumer<org.kie.api.runtime.rule.RuleContext,HardSoftDoubleScore>> |
matchExecutorByScoreMap
Deprecated.
Slower than
matchExecutorByNumberMap |
protected double |
softScore
Deprecated.
|
constraintMatchEnabled, constraintMatchTotalMap, indictmentMap, zeroScore| Constructor and Description |
|---|
HardSoftDoubleScoreHolder(boolean constraintMatchEnabled)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeight)
Deprecated.
|
void |
addMultiConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeight,
double softWeight)
Deprecated.
|
void |
addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
double softWeight)
Deprecated.
|
void |
configureConstraintWeight(org.kie.api.definition.rule.Rule rule,
HardSoftDoubleScore constraintWeight)
Deprecated.
Sets up a
ConstraintWeight from the ConstraintConfiguration during initialization. |
HardSoftDoubleScore |
extractScore(int initScore)
Deprecated.
|
double |
getHardScore()
Deprecated.
|
double |
getSoftScore()
Deprecated.
|
void |
impactScore(org.kie.api.runtime.rule.RuleContext kcontext)
Deprecated.
For internal use only, use penalize() or reward() instead.
|
void |
penalize(org.kie.api.runtime.rule.RuleContext kcontext)
Deprecated.
Penalize a match by the
ConstraintWeight negated. |
void |
penalize(org.kie.api.runtime.rule.RuleContext kcontext,
double weightMultiplier)
Deprecated.
Penalize a match by the
ConstraintWeight negated and multiplied with the weightMultiplier for all score levels. |
void |
penalize(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeightMultiplier,
double softWeightMultiplier)
Deprecated.
Penalize a match by the
ConstraintWeight negated and multiplied with the specific weightMultiplier per score
level. |
void |
reward(org.kie.api.runtime.rule.RuleContext kcontext)
Deprecated.
Reward a match by the
ConstraintWeight. |
void |
reward(org.kie.api.runtime.rule.RuleContext kcontext,
double weightMultiplier)
Deprecated.
Reward a match by the
ConstraintWeight multiplied with the weightMultiplier for all score levels. |
void |
reward(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeightMultiplier,
double softWeightMultiplier)
Deprecated.
Reward a match by the
ConstraintWeight multiplied with the specific weightMultiplier per score level. |
extractJustificationList, getConstraintMatchTotalMap, getConstraintMatchTotals, getIndictmentMap, impactScore, impactScore, impactScore, isConstraintMatchEnabled, registerConstraintMatch, setJustificationListConverterprotected final Map<org.kie.api.definition.rule.Rule,BiConsumer<org.kie.api.runtime.rule.RuleContext,Double>> matchExecutorByNumberMap
protected final Map<org.kie.api.definition.rule.Rule,BiConsumer<org.kie.api.runtime.rule.RuleContext,HardSoftDoubleScore>> matchExecutorByScoreMap
matchExecutorByNumberMapprotected double hardScore
protected double softScore
public HardSoftDoubleScoreHolder(boolean constraintMatchEnabled)
public double getHardScore()
public double getSoftScore()
public void configureConstraintWeight(org.kie.api.definition.rule.Rule rule,
HardSoftDoubleScore constraintWeight)
ScoreHolderConstraintWeight from the ConstraintConfiguration during initialization.configureConstraintWeight in interface ScoreHolder<HardSoftDoubleScore>configureConstraintWeight in class AbstractScoreHolder<HardSoftDoubleScore>rule - never nullconstraintWeight - never null, with Score.getInitScore() equal to 0.public void penalize(org.kie.api.runtime.rule.RuleContext kcontext)
ConstraintWeight negated.kcontext - never null, the magic variable in DRLpublic void penalize(org.kie.api.runtime.rule.RuleContext kcontext,
double weightMultiplier)
ConstraintWeight negated and multiplied with the weightMultiplier for all score levels.kcontext - never null, the magic variable in DRLweightMultiplier - at least 0public void penalize(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeightMultiplier,
double softWeightMultiplier)
ConstraintWeight negated and multiplied with the specific weightMultiplier per score
level.
Slower than penalize(RuleContext, double).kcontext - never null, the magic variable in DRLhardWeightMultiplier - at least 0softWeightMultiplier - at least 0public void reward(org.kie.api.runtime.rule.RuleContext kcontext)
ConstraintWeight.kcontext - never null, the magic variable in DRLpublic void reward(org.kie.api.runtime.rule.RuleContext kcontext,
double weightMultiplier)
ConstraintWeight multiplied with the weightMultiplier for all score levels.kcontext - never null, the magic variable in DRLweightMultiplier - at least 0public void reward(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeightMultiplier,
double softWeightMultiplier)
ConstraintWeight multiplied with the specific weightMultiplier per score level.
Slower than reward(RuleContext, double).kcontext - never null, the magic variable in DRLhardWeightMultiplier - at least 0softWeightMultiplier - at least 0public void impactScore(org.kie.api.runtime.rule.RuleContext kcontext)
AbstractScoreHolderimpactScore in class AbstractScoreHolder<HardSoftDoubleScore>kcontext - never nullpublic void addHardConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
double hardWeight)
kcontext - never null, the magic variable in DRLhardWeight - higher is better, negative for a penalty, positive for a rewardpublic void addSoftConstraintMatch(org.kie.api.runtime.rule.RuleContext kcontext,
double 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,
double hardWeight,
double softWeight)
kcontext - never null, the magic variable in DRLhardWeight - higher is better, negative for a penalty, positive for a rewardsoftWeight - higher is better, negative for a penalty, positive for a rewardpublic HardSoftDoubleScore 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–2021 JBoss by Red Hat. All rights reserved.