Class TestGenDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
- java.lang.Object
-
- org.optaplanner.core.impl.score.director.AbstractScoreDirector<Solution_,Score_,DrlScoreDirectorFactory<Solution_,Score_>>
-
- org.optaplanner.constraint.drl.DrlScoreDirector<Solution_,Score_>
-
- org.optaplanner.constraint.drl.testgen.TestGenDrlScoreDirector<Solution_,Score_>
-
- All Implemented Interfaces:
AutoCloseable,Cloneable,org.optaplanner.core.api.score.director.ScoreDirector<Solution_>,org.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_>
public class TestGenDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>> extends DrlScoreDirector<Solution_,Score_>
-
-
Field Summary
-
Fields inherited from class org.optaplanner.constraint.drl.DrlScoreDirector
GLOBAL_SCORE_HOLDER_KEY, kieSession, scoreHolder
-
Fields inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirector
allChangesWillBeUndoneBeforeStepEnds, calculationCount, constraintMatchEnabledPreference, logger, lookUpEnabled, lookUpManager, scoreDirectorFactory, variableListenerSupport, workingEntityListRevision, workingInitScore, workingSolution
-
-
Constructor Summary
Constructors Constructor Description TestGenDrlScoreDirector(DrlScoreDirectorFactory<Solution_,Score_> scoreDirectorFactory, boolean lookUpEnabled, boolean constraintMatchEnabledPreference, List<String> scoreDrlList, List<File> scoreDrlFileList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterEntityAdded(org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor<Solution_> entityDescriptor, Object entity)voidafterEntityRemoved(org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor<Solution_> entityDescriptor, Object entity)voidafterProblemFactAdded(Object problemFact)voidafterProblemFactRemoved(Object problemFact)voidafterVariableChanged(org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor variableDescriptor, Object entity)voidassertShadowVariablesAreNotStale(Score_ expectedWorkingScore, Object completedAction)voidassertWorkingScoreFromScratch(Score_ workingScore, Object completedAction)voidbeforeVariableChanged(org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor variableDescriptor, Object entity)Score_calculateScore()voidclose()org.kie.api.runtime.KieSessioncreateKieSession()Map<String,org.optaplanner.core.api.score.constraint.ConstraintMatchTotal<Score_>>getConstraintMatchTotalMap()voidsetWorkingSolution(Solution_ workingSolution)-
Methods inherited from class org.optaplanner.constraint.drl.DrlScoreDirector
afterProblemPropertyChanged, getIndictmentMap, getKieSession, isConstraintMatchEnabled, requiresFlushing
-
Methods inherited from class org.optaplanner.core.impl.score.director.AbstractScoreDirector
afterEntityAdded, afterEntityRemoved, afterVariableChanged, assertExpectedUndoMoveScore, assertExpectedWorkingScore, assertNonNullPlanningIds, assertPredictedScoreFromScratch, beforeEntityAdded, beforeEntityAdded, beforeEntityRemoved, beforeEntityRemoved, beforeProblemFactAdded, beforeProblemFactRemoved, beforeProblemPropertyChanged, beforeVariableChanged, buildScoreCorruptionAnalysis, buildShadowVariableAnalysis, changeVariableFacade, clone, cloneSolution, cloneWorkingSolution, createChildThreadScoreDirector, doAndProcessMove, doAndProcessMove, getCalculationCount, getScoreDefinition, getScoreDirectorFactory, getSolutionDescriptor, getSupplyManager, getWorkingEntityListRevision, getWorkingSolution, isAllChangesWillBeUndoneBeforeStepEnds, isConstraintConfiguration, isConstraintMatchEnabledPreference, isLookUpEnabled, isWorkingEntityListDirty, lookUpWorkingObject, lookUpWorkingObjectOrReturnNull, overwriteConstraintMatchEnabledPreference, resetCalculationCount, setAllChangesWillBeUndoneBeforeStepEnds, setCalculatedScore, setWorkingEntityListDirty, toString, triggerVariableListeners
-
-
-
-
Method Detail
-
createKieSession
public org.kie.api.runtime.KieSession createKieSession()
-
setWorkingSolution
public void setWorkingSolution(Solution_ workingSolution)
- Specified by:
setWorkingSolutionin interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
setWorkingSolutionin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
calculateScore
public Score_ calculateScore()
- Specified by:
calculateScorein interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
calculateScorein classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
assertShadowVariablesAreNotStale
public void assertShadowVariablesAreNotStale(Score_ expectedWorkingScore, Object completedAction)
- Specified by:
assertShadowVariablesAreNotStalein interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
assertShadowVariablesAreNotStalein classorg.optaplanner.core.impl.score.director.AbstractScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>,DrlScoreDirectorFactory<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>>
-
assertWorkingScoreFromScratch
public void assertWorkingScoreFromScratch(Score_ workingScore, Object completedAction)
- Specified by:
assertWorkingScoreFromScratchin interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
assertWorkingScoreFromScratchin classorg.optaplanner.core.impl.score.director.AbstractScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>,DrlScoreDirectorFactory<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>>
-
getConstraintMatchTotalMap
public Map<String,org.optaplanner.core.api.score.constraint.ConstraintMatchTotal<Score_>> getConstraintMatchTotalMap()
- Specified by:
getConstraintMatchTotalMapin interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
getConstraintMatchTotalMapin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
closein classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
afterEntityAdded
public void afterEntityAdded(org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor<Solution_> entityDescriptor, Object entity)
- Overrides:
afterEntityAddedin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
beforeVariableChanged
public void beforeVariableChanged(org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor variableDescriptor, Object entity)- Specified by:
beforeVariableChangedin interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
beforeVariableChangedin classorg.optaplanner.core.impl.score.director.AbstractScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>,DrlScoreDirectorFactory<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>>
-
afterVariableChanged
public void afterVariableChanged(org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor variableDescriptor, Object entity)- Specified by:
afterVariableChangedin interfaceorg.optaplanner.core.impl.score.director.InnerScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>- Overrides:
afterVariableChangedin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
afterEntityRemoved
public void afterEntityRemoved(org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor<Solution_> entityDescriptor, Object entity)
- Overrides:
afterEntityRemovedin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
afterProblemFactAdded
public void afterProblemFactAdded(Object problemFact)
- Specified by:
afterProblemFactAddedin interfaceorg.optaplanner.core.api.score.director.ScoreDirector<Solution_>- Overrides:
afterProblemFactAddedin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
afterProblemFactRemoved
public void afterProblemFactRemoved(Object problemFact)
- Specified by:
afterProblemFactRemovedin interfaceorg.optaplanner.core.api.score.director.ScoreDirector<Solution_>- Overrides:
afterProblemFactRemovedin classDrlScoreDirector<Solution_,Score_ extends org.optaplanner.core.api.score.Score<Score_>>
-
-