Interface IncrementalScoreCalculator<Solution_,Score_ extends Score<Score_>>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationScore_
- the score type to go with the solution
- All Known Subinterfaces:
ConstraintMatchAwareIncrementalScoreCalculator<Solution_,Score_>
public interface IncrementalScoreCalculator<Solution_,Score_ extends Score<Score_>>
Used for incremental javaScore
calculation. This is much faster thanEasyScoreCalculator
but requires much more code to implement too.Any implementation is naturally stateful.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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 theScore
cannot be predicted.void
resetWorkingSolution(Solution_ workingSolution)
There are nobeforeEntityAdded(Object)
andafterEntityAdded(Object)
calls for entities that are already present in the workingSolution.
-
-
-
Method Detail
-
resetWorkingSolution
void resetWorkingSolution(Solution_ workingSolution)
There are nobeforeEntityAdded(Object)
andafterEntityAdded(Object)
calls for entities that are already present in the workingSolution.- Parameters:
workingSolution
- never null
-
beforeEntityAdded
void beforeEntityAdded(Object entity)
- Parameters:
entity
- never null, an instance of aPlanningEntity
class
-
afterEntityAdded
void afterEntityAdded(Object entity)
- Parameters:
entity
- never null, an instance of aPlanningEntity
class
-
beforeVariableChanged
void beforeVariableChanged(Object entity, String variableName)
- Parameters:
entity
- never null, an instance of aPlanningEntity
classvariableName
- never null, either a genuine or shadowPlanningVariable
-
afterVariableChanged
void afterVariableChanged(Object entity, String variableName)
- Parameters:
entity
- never null, an instance of aPlanningEntity
classvariableName
- never null, either a genuine or shadowPlanningVariable
-
beforeEntityRemoved
void beforeEntityRemoved(Object entity)
- Parameters:
entity
- never null, an instance of aPlanningEntity
class
-
afterEntityRemoved
void afterEntityRemoved(Object entity)
- Parameters:
entity
- never null, an instance of aPlanningEntity
class
-
-