Interface CustomPhaseCommand<Solution_>
- All Superinterfaces:
PhaseCommand<Solution_>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@NullMarked
@Deprecated(forRemoval=true,
since="1.20.0")
public interface CustomPhaseCommand<Solution_>
extends PhaseCommand<Solution_>
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangeWorkingSolution(ScoreDirector<Solution_> scoreDirector) Deprecated, for removal: This API element is subject to removal in a future version.default voidchangeWorkingSolution(ScoreDirector<Solution_> scoreDirector, BooleanSupplier isPhaseTerminated) Deprecated, for removal: This API element is subject to removal in a future version.Changesworking solutionofScoreDirector.getWorkingSolution().
-
Method Details
-
changeWorkingSolution
default void changeWorkingSolution(ScoreDirector<Solution_> scoreDirector, BooleanSupplier isPhaseTerminated) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PhaseCommandChangesworking solutionofScoreDirector.getWorkingSolution(). When theworking solutionis modified, theScoreDirectormust be correctly notified (throughScoreDirector.beforeVariableChanged(Object, String)andScoreDirector.afterVariableChanged(Object, String)), otherwise calculatedScores will be corrupted.Don't forget to call
ScoreDirector.triggerVariableListeners()after each set of changes (especially before everyInnerScoreDirector.calculateScore()call) to ensure all shadow variables are updated.- Specified by:
changeWorkingSolutionin interfacePhaseCommand<Solution_>- Parameters:
scoreDirector- theScoreDirectorthat needs to get notified of the changes.isPhaseTerminated- long-running command implementations should check this periodically and terminate early if it returns true. Otherwise the terminations configured by the user will have no effect, as the solver can only terminate itself when a command has ended.
-
changeWorkingSolution
Deprecated, for removal: This API element is subject to removal in a future version.
-
PhaseCommandinstead.