Class AbstractScoreDirectorFactory<Solution_,Score_ extends Score<Score_>,Factory_ extends AbstractScoreDirectorFactory<Solution_,Score_,Factory_>>
java.lang.Object
ai.timefold.solver.core.impl.score.director.AbstractScoreDirectorFactory<Solution_,Score_,Factory_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotationScore_- the score type to go with the solution
- All Implemented Interfaces:
ScoreDirectorFactory<Solution_,Score_>
- Direct Known Subclasses:
AbstractConstraintStreamScoreDirectorFactory,EasyScoreDirectorFactory,IncrementalScoreDirectorFactory
public abstract class AbstractScoreDirectorFactory<Solution_,Score_ extends Score<Score_>,Factory_ extends AbstractScoreDirectorFactory<Solution_,Score_,Factory_>>
extends Object
implements ScoreDirectorFactory<Solution_,Score_>
Abstract superclass for
ScoreDirectorFactory.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ScoreDirectorFactory<Solution_,Score_> protected InitializingScoreTrendprotected final ListVariableDescriptor<Solution_>protected final org.slf4j.Loggerprotected final SolutionDescriptor<Solution_>protected boolean -
Constructor Summary
ConstructorsConstructorDescriptionAbstractScoreDirectorFactory(SolutionDescriptor<Solution_> solutionDescriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoidassertScoreFromScratch(Solution_ solution) Asserts that if theScoreis calculated for the parameter solution, it would be equal to the score of that parameter.booleanbooleanWhen true, a snapshot of the solution is created before, after and after the undo of a move.voidsetAssertClonedSolution(boolean assertClonedSolution) voidsetAssertionScoreDirectorFactory(ScoreDirectorFactory<Solution_, Score_> assertionScoreDirectorFactory) voidsetInitializingScoreTrend(InitializingScoreTrend initializingScoreTrend) voidsetTrackingWorkingSolution(boolean trackingWorkingSolution) voidvalidateEntity(ScoreDirector<Solution_> scoreDirector, Object entity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.impl.score.director.ScoreDirectorFactory
buildScoreDirector, createScoreDirectorBuilder, supportsConstraintMatching
-
Field Details
-
logger
protected final transient org.slf4j.Logger logger -
solutionDescriptor
-
listVariableDescriptor
-
initializingScoreTrend
-
assertionScoreDirectorFactory
protected ScoreDirectorFactory<Solution_,Score_ extends Score<Score_>> assertionScoreDirectorFactory -
assertClonedSolution
protected boolean assertClonedSolution -
trackingWorkingSolution
protected boolean trackingWorkingSolution
-
-
Constructor Details
-
AbstractScoreDirectorFactory
-
-
Method Details
-
getSolutionDescriptor
- Specified by:
getSolutionDescriptorin interfaceScoreDirectorFactory<Solution_,Score_ extends Score<Score_>> - Returns:
- never null
-
getScoreDefinition
- Specified by:
getScoreDefinitionin interfaceScoreDirectorFactory<Solution_,Score_ extends Score<Score_>> - Returns:
- never null
-
getInitializingScoreTrend
- Specified by:
getInitializingScoreTrendin interfaceScoreDirectorFactory<Solution_,Score_ extends Score<Score_>> - Returns:
- never null
-
setInitializingScoreTrend
-
getAssertionScoreDirectorFactory
-
setAssertionScoreDirectorFactory
public void setAssertionScoreDirectorFactory(ScoreDirectorFactory<Solution_, Score_> assertionScoreDirectorFactory) -
isAssertClonedSolution
public boolean isAssertClonedSolution() -
setAssertClonedSolution
public void setAssertClonedSolution(boolean assertClonedSolution) -
isTrackingWorkingSolution
public boolean isTrackingWorkingSolution()When true, a snapshot of the solution is created before, after and after the undo of a move. InEnvironmentMode.TRACKED_FULL_ASSERT, the snapshots are compared when corruption is detected, allowing us to report exactly what variables are different. -
setTrackingWorkingSolution
public void setTrackingWorkingSolution(boolean trackingWorkingSolution) -
assertScoreFromScratch
Description copied from interface:ScoreDirectorFactoryAsserts that if theScoreis calculated for the parameter solution, it would be equal to the score of that parameter.- Specified by:
assertScoreFromScratchin interfaceScoreDirectorFactory<Solution_,Score_ extends Score<Score_>> - Parameters:
solution- never null- See Also:
-
validateEntity
-