Annotation Type PlanningScore
Specifies that a property (or a field) on a
PlanningSolution class holds the Score of that solution.
This property can be null if the PlanningSolution is uninitialized.
This property is modified by the Solver,
every time when the Score of this PlanningSolution has been calculated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated, for removal: This API element is subject to removal in a future version. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintRequired for bendable scores.intRequired for bendable scores.Class<? extends ScoreDefinition>Deprecated, for removal: This API element is subject to removal in a future version.Support for custom scores is deprecated and will be removed in OptaPlanner 9.0. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intWorkaround for annotation limitation inbendableHardLevelsSize()andbendableSoftLevelsSize().
-
Field Details
-
NO_LEVEL_SIZE
static final int NO_LEVEL_SIZEWorkaround for annotation limitation inbendableHardLevelsSize()andbendableSoftLevelsSize().- See Also:
-
-
Element Details
-
bendableHardLevelsSize
int bendableHardLevelsSizeRequired for bendable scores.For example with 3 hard levels, hard level 0 always outweighs hard level 1 which always outweighs hard level 2, which outweighs all the soft levels.
- Returns:
- 0 or higher if the
Scoreis aIBendableScore, not used otherwise
- Default:
- -1
-
bendableSoftLevelsSize
int bendableSoftLevelsSizeRequired for bendable scores.For example with 3 soft levels, soft level 0 always outweighs soft level 1 which always outweighs soft level 2.
- Returns:
- 0 or higher if the
Scoreis aIBendableScore, not used otherwise
- Default:
- -1
-
scoreDefinitionClass
Deprecated, for removal: This API element is subject to removal in a future version.Support for custom scores is deprecated and will be removed in OptaPlanner 9.0.Overrides the default determinedScoreDefinitionto implement a custom one.If this is not specified, the
ScoreDefinitionis automatically determined based on the return type of the annotated property (or field) on aPlanningSolution.- Returns:
PlanningScore.NullScoreDefinitionwhen it is null (workaround for annotation limitation)
- Default:
- org.optaplanner.core.api.domain.solution.PlanningScore.NullScoreDefinition.class
-