Interface ScoreHolder<Score_ extends Score<Score_>>
-
- Type Parameters:
Score_- theScoretype
- All Known Implementing Classes:
AbstractScoreHolder,BendableBigDecimalScoreHolder,BendableLongScoreHolder,BendableScoreHolder,HardMediumSoftBigDecimalScoreHolder,HardMediumSoftLongScoreHolder,HardMediumSoftScoreHolder,HardSoftBigDecimalScoreHolder,HardSoftDoubleScoreHolder,HardSoftLongScoreHolder,HardSoftScoreHolder,SimpleBigDecimalScoreHolder,SimpleDoubleScoreHolder,SimpleLongScoreHolder,SimpleScoreHolder
public interface ScoreHolder<Score_ extends Score<Score_>>This class is injected as a global byDroolsScoreDirectorinto the Drools DRL. OtherScoreDirectorimplementations do not use this class.An implementation must extend
AbstractScoreHolderto ensure backwards compatibility in future versions.- See Also:
AbstractScoreHolder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidconfigureConstraintWeight(org.kie.api.definition.rule.Rule rule, Score_ constraintWeight)Deprecated.for removal from public APIScore_extractScore(int initScore)Deprecated.for removal from public API, seeScoreManager.Map<String,ConstraintMatchTotal>getConstraintMatchTotalMap()Deprecated.for removal from public API, seeScoreManagerCollection<ConstraintMatchTotal>getConstraintMatchTotals()Deprecated.for removal from public API, seeScoreManagerMap<Object,Indictment>getIndictmentMap()Deprecated.for removal from public API, seeScoreManagerbooleanisConstraintMatchEnabled()Deprecated.for removal from public API
-
-
-
Method Detail
-
extractScore
@Deprecated Score_ extractScore(int initScore)
Deprecated.for removal from public API, seeScoreManager.Extracts theScore, calculated by theKieSessionforDroolsScoreDirector.Should not be called directly, use
ScoreDirector.calculateScore()instead.- Parameters:
initScore-<= 0, managed by OptaPlanner, needed as a parameter in theScore's creation method, seeScore.getInitScore()- Returns:
- never null, the
Scoreof the workingPlanningSolution
-
configureConstraintWeight
@Deprecated void configureConstraintWeight(org.kie.api.definition.rule.Rule rule, Score_ constraintWeight)
Deprecated.for removal from public APISets up aConstraintWeightfrom theConstraintConfigurationduring initialization.- Parameters:
rule- never nullconstraintWeight- never null, withScore.getInitScore()equal to 0.
-
isConstraintMatchEnabled
@Deprecated boolean isConstraintMatchEnabled()
Deprecated.for removal from public APIMust be in sync withScoreDirector.isConstraintMatchEnabled()for theScoreDirectorwhich contains thisScoreHolder.Defaults to true.
- Returns:
- false if the
ConstraintMatchs andConstraintMatchTotals do not need to be collected which is a performance boost - See Also:
getConstraintMatchTotals()
-
getConstraintMatchTotals
@Deprecated Collection<ConstraintMatchTotal> getConstraintMatchTotals()
Deprecated.for removal from public API, seeScoreManagerExplains theScoreofextractScore(int).Should not be called directly, use
ScoreDirector.getConstraintMatchTotals()instead.- Returns:
- never null
- Throws:
IllegalStateException- ifisConstraintMatchEnabled()is false- See Also:
ScoreDirector.getConstraintMatchTotals()
-
getConstraintMatchTotalMap
@Deprecated Map<String,ConstraintMatchTotal> getConstraintMatchTotalMap()
Deprecated.for removal from public API, seeScoreManagerExplains theScoreofextractScore(int).Should not be called directly, use
ScoreDirector.getConstraintMatchTotalMap()instead.- Returns:
- never null
- Throws:
IllegalStateException- ifisConstraintMatchEnabled()is false- See Also:
ScoreDirector.getConstraintMatchTotalMap()
-
getIndictmentMap
@Deprecated Map<Object,Indictment> getIndictmentMap()
Deprecated.for removal from public API, seeScoreManagerExplains the impact of each planning entity or problem fact on theScore.Should not be called directly, use
ScoreDirector.getIndictmentMap()instead.- Returns:
- never null
- Throws:
IllegalStateException- ifisConstraintMatchEnabled()returns false- See Also:
ScoreDirector.getIndictmentMap()
-
-