Interface RevertableScoreDirector<Solution_>
- All Superinterfaces:
ScoreDirector<Solution_>,VariableDescriptorAwareScoreDirector<Solution_>
- All Known Implementing Classes:
VariableChangeRecordingScoreDirector
public interface RevertableScoreDirector<Solution_>
extends VariableDescriptorAwareScoreDirector<Solution_>
-
Method Summary
Modifier and TypeMethodDescription<Action_> List<Action_>Use this method to get a copy of all non-commited changes executed by the director so far.voidUse this method to revert all changes made by moves.Methods inherited from interface ai.timefold.solver.core.api.score.director.ScoreDirector
afterEntityAdded, afterEntityRemoved, afterProblemFactAdded, afterProblemFactRemoved, afterProblemPropertyChanged, beforeEntityAdded, beforeEntityRemoved, beforeProblemFactAdded, beforeProblemFactRemoved, beforeProblemPropertyChanged, getWorkingSolution, lookUpWorkingObject, lookUpWorkingObjectOrReturnNull, triggerVariableListenersMethods inherited from interface ai.timefold.solver.core.impl.score.director.VariableDescriptorAwareScoreDirector
afterListVariableChanged, afterListVariableChanged, afterListVariableElementAssigned, afterListVariableElementAssigned, afterListVariableElementUnassigned, afterListVariableElementUnassigned, afterVariableChanged, afterVariableChanged, beforeListVariableChanged, beforeListVariableChanged, beforeListVariableElementAssigned, beforeListVariableElementAssigned, beforeListVariableElementUnassigned, beforeListVariableElementUnassigned, beforeVariableChanged, beforeVariableChanged, changeVariableFacade, getSolutionDescriptor, getVariableDescriptorCache
-
Method Details
-
copyChanges
Use this method to get a copy of all non-commited changes executed by the director so far.- Type Parameters:
Action_- The action type for recorded changes
-
undoChanges
void undoChanges()Use this method to revert all changes made by moves. The score director that implements this logic must be able to track every single change in the solution and restore it to its original state.
-