Solution_
- the solution type, the class with the PlanningSolution
annotationpublic interface IncrementalScoreCalculator<Solution_>
Score
calculation.
This is much faster than EasyScoreCalculator
but requires much more code to implement too.
Any implementation is naturally stateful.
IncrementalScoreDirector
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 PlanningVariable
void afterVariableChanged(Object entity, String variableName)
entity
- never null, an instance of a PlanningEntity
classvariableName
- never null, either a genuine or shadow PlanningVariable
void 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–2020 JBoss by Red Hat. All rights reserved.