Interface CustomPhaseCommand<Solution_>
- 
- Type Parameters:
- Solution_- the solution type, the class with the- PlanningSolutionannotation
 - All Known Implementing Classes:
- NoChangeCustomPhaseCommand
 - Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
 @FunctionalInterface public interface CustomPhaseCommand<Solution_> Runs a custom algorithm as aPhaseof theSolverthat changes the planning variables. Do not abuse to change the problems facts, instead useSolver.addProblemFactChange(ProblemFactChange)for that.To add custom properties, configure custom properties and add public setters for them. 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchangeWorkingSolution(ScoreDirector<Solution_> scoreDirector)Changesworking solutionofScoreDirector.getWorkingSolution().
 
- 
- 
- 
Method Detail- 
changeWorkingSolutionvoid changeWorkingSolution(ScoreDirector<Solution_> scoreDirector) Changesworking 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.- Parameters:
- scoreDirector- never null, the- ScoreDirectorthat needs to get notified of the changes.
 
 
- 
 
-