Solution_ - the solution type, the class with the PlanningSolution annotationScore_ - the score type to go with the solutionpublic interface IncrementalScoreCalculator<Solution_,Score_ extends Score>
Score calculation.
This is much faster than EasyScoreCalculator but requires much more code to implement too.
Any implementation is naturally stateful.
| Modifier and Type | Method and Description |
|---|---|
void |
afterEntityAdded(Object entity) |
void |
afterEntityRemoved(Object entity) |
void |
afterVariableChanged(Object entity,
String variableName) |
void |
beforeEntityAdded(Object entity) |
void |
beforeEntityRemoved(Object entity) |
void |
beforeVariableChanged(Object entity,
String variableName) |
Score_ |
calculateScore()
This method is only called if the
Score cannot be predicted. |
void |
resetWorkingSolution(Solution_ workingSolution)
There are no
beforeEntityAdded(Object) and afterEntityAdded(Object) calls
for entities that are already present in the workingSolution. |
void resetWorkingSolution(Solution_ workingSolution)
beforeEntityAdded(Object) and afterEntityAdded(Object) calls
for entities that are already present in the workingSolution.workingSolution - never nullvoid beforeEntityAdded(Object entity)
entity - never null, an instance of a PlanningEntity classvoid afterEntityAdded(Object entity)
entity - never null, an instance of a PlanningEntity classvoid beforeVariableChanged(Object entity, String variableName)
entity - never null, an instance of a PlanningEntity classvariableName - never null, either a genuine or shadow PlanningVariablevoid afterVariableChanged(Object entity, String variableName)
entity - never null, an instance of a PlanningEntity classvariableName - never null, either a genuine or shadow PlanningVariablevoid beforeEntityRemoved(Object entity)
entity - never null, an instance of a PlanningEntity classvoid afterEntityRemoved(Object entity)
entity - never null, an instance of a PlanningEntity classCopyright © 2006–2021 JBoss by Red Hat. All rights reserved.