Package org.optaplanner.constraint.drl
Class DrlScoreDirectorFactory<Solution_,Score_ extends Score<Score_>>
java.lang.Object
org.optaplanner.core.impl.score.director.AbstractScoreDirectorFactory<Solution_,Score_>
org.optaplanner.constraint.drl.DrlScoreDirectorFactory<Solution_,Score_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotationScore_- the score type to go with the solution
- All Implemented Interfaces:
InnerScoreDirectorFactory<Solution_,,Score_> ScoreDirectorFactory<Solution_>
public class DrlScoreDirectorFactory<Solution_,Score_ extends Score<Score_>>
extends AbstractScoreDirectorFactory<Solution_,Score_>
Drools implementation of
ScoreDirectorFactory.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirectorFactory
assertClonedSolution, assertionScoreDirectorFactory, initializingScoreTrend, logger, solutionDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionDrlScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor, org.kie.api.KieBase kieBase) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertGlobalScoreHolderExists(org.kie.api.KieBase kieBase) buildScoreDirector(boolean lookUpEnabled, boolean constraintMatchEnabledPreference) LikeInnerScoreDirectorFactory.buildScoreDirector(), but optionally disablesConstraintMatchtracking and look up for more performance (presuming theScoreDirectorimplementation actually supports it to begin with).protected voidcreateRuleToConstraintWeightExtractorMap(org.kie.api.KieBase kieBase) org.kie.api.runtime.KieSessionMethods inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirectorFactory
assertScoreFromScratch, buildScoreDirector, getAssertionScoreDirectorFactory, getInitializingScoreTrend, getScoreDefinition, getSolutionDescriptor, isAssertClonedSolution, setAssertClonedSolution, setAssertionScoreDirectorFactory, setInitializingScoreTrend
-
Field Details
-
ruleToConstraintWeightExtractorMap
-
-
Constructor Details
-
DrlScoreDirectorFactory
public DrlScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor, org.kie.api.KieBase kieBase) - Parameters:
solutionDescriptor- never nullkieBase- never null
-
-
Method Details
-
assertGlobalScoreHolderExists
protected void assertGlobalScoreHolderExists(org.kie.api.KieBase kieBase) -
createRuleToConstraintWeightExtractorMap
protected void createRuleToConstraintWeightExtractorMap(org.kie.api.KieBase kieBase) -
getRuleToConstraintWeightExtractorMap
-
buildScoreDirector
public DrlScoreDirector<Solution_,Score_> buildScoreDirector(boolean lookUpEnabled, boolean constraintMatchEnabledPreference) Description copied from interface:InnerScoreDirectorFactoryLikeInnerScoreDirectorFactory.buildScoreDirector(), but optionally disablesConstraintMatchtracking and look up for more performance (presuming theScoreDirectorimplementation actually supports it to begin with).- Parameters:
lookUpEnabled- true if aScoreDirectorimplementation should track all working objects forScoreDirector.lookUpWorkingObject(Object)constraintMatchEnabledPreference- false if aScoreDirectorimplementation should not doConstraintMatchtracking even if it supports it.- Returns:
- never null
- See Also:
-
newKieSession
public org.kie.api.runtime.KieSession newKieSession()
-