Class AbstractScoreDirector.AbstractScoreDirectorBuilder<Solution_,Score_ extends Score<Score_>,Factory_ extends AbstractScoreDirectorFactory<Solution_,Score_,Factory_>,Builder_ extends AbstractScoreDirector.AbstractScoreDirectorBuilder<Solution_,Score_,Factory_,Builder_>>
java.lang.Object
ai.timefold.solver.core.impl.score.director.AbstractScoreDirector.AbstractScoreDirectorBuilder<Solution_,Score_,Factory_,Builder_>
- Type Parameters:
Solution_- The type of the planning solution.Score_- The type of the score associated with the solution.Factory_- The type of the score director factory used to create the score director.Builder_- The type of the builder, used for fluent configuration.
- Direct Known Subclasses:
BavetConstraintStreamScoreDirector.Builder,EasyScoreDirector.Builder,IncrementalScoreDirector.Builder
- Enclosing class:
- AbstractScoreDirector<Solution_,
Score_ extends Score<Score_>, Factory_ extends AbstractScoreDirectorFactory<Solution_, Score_, Factory_>>
@NullMarked
public abstract static class AbstractScoreDirector.AbstractScoreDirectorBuilder<Solution_,Score_ extends Score<Score_>,Factory_ extends AbstractScoreDirectorFactory<Solution_,Score_,Factory_>,Builder_ extends AbstractScoreDirector.AbstractScoreDirectorBuilder<Solution_,Score_,Factory_,Builder_>>
extends Object
An abstract builder for creating instances of
InnerScoreDirector.
This class provides methods to configure the behavior of the score director before building it.
Unless the appropriate withers are called, the score director will be built:
- With
ConstraintMatchPolicy.DISABLED. - With lookup disabled.
- Expecting shadow variables in their correct state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConstraintMatchPolicyprotected booleanprotected booleanprotected final Factory_ -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractScoreDirectorBuilder(Factory_ scoreDirectorFactory) -
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractScoreDirector<Solution_,Score_, Factory_> build()Optionally makes the score director a derived one; most score directors do not require this.withConstraintMatchPolicy(ConstraintMatchPolicy constraintMatchPolicy) withExpectShadowVariablesInCorrectState(boolean expectShadowVariablesInCorrectState) withLookUpEnabled(boolean lookUpEnabled)
-
Field Details
-
scoreDirectorFactory
protected final Factory_ extends AbstractScoreDirectorFactory<Solution_,Score_, scoreDirectorFactoryFactory_> -
constraintMatchPolicy
-
lookUpEnabled
protected boolean lookUpEnabled -
expectShadowVariablesInCorrectState
protected boolean expectShadowVariablesInCorrectState
-
-
Constructor Details
-
AbstractScoreDirectorBuilder
-
-
Method Details
-
withConstraintMatchPolicy
-
withLookUpEnabled
-
withExpectShadowVariablesInCorrectState
public Builder_ withExpectShadowVariablesInCorrectState(boolean expectShadowVariablesInCorrectState) -
build
-
buildDerived
Optionally makes the score director a derived one; most score directors do not require this. Derived score directors may make choices which the main score director cannot make, such as reducing logging. Derived score directors are typically used for multithreaded solving, testing and assert modes. Derived score directors do not support move streams, as they are only used to calculate the score.- Returns:
- this
-