public interface CustomPhaseCommand
Phase of the Solver that changes the planning variables.
Do not abuse to change the problems facts,
instead use Solver.addProblemFactChange(ProblemFactChange) for that.
An implementation must extend AbstractCustomPhaseCommand to ensure backwards compatibility in future versions.
AbstractCustomPhaseCommand| Modifier and Type | Method and Description |
|---|---|
void |
applyCustomProperties(Map<String,String> customPropertyMap)
Called during
SolverFactory.buildSolver(). |
void |
changeWorkingSolution(ScoreDirector scoreDirector)
Changes
workingSolution of ScoreDirector.getWorkingSolution(). |
void applyCustomProperties(Map<String,String> customPropertyMap)
SolverFactory.buildSolver().customPropertyMap - never nullIllegalArgumentException - if any of the properties are not supported or don't parse correctlyvoid changeWorkingSolution(ScoreDirector scoreDirector)
workingSolution of ScoreDirector.getWorkingSolution().
When the workingSolution is modified, the ScoreDirector must be correctly notified
(through ScoreDirector.beforeVariableChanged(Object, String),
ScoreDirector.afterProblemFactChanged(Object), etc),
otherwise calculated Scores will be corrupted.
Don't forget to call ScoreDirector.triggerVariableListeners() after each set of changes
(especially before every ScoreDirector.calculateScore() call)
to ensure all shadow variables are updated.
scoreDirector - never null, the ScoreDirector that needs to get notified of the changes.Copyright © 2006–2016 JBoss by Red Hat. All rights reserved.