Annotation Interface PlanningSolution
A solution is mutable. For scalability reasons (to facilitate incremental score calculation), the same solution instance (called the working solution per move thread) is continuously modified. It's cloned to recall the best solution.
Each planning solution must have exactly 1 PlanningScore
property.
Each planning solution must have at least 1 PlanningEntityCollectionProperty
or PlanningEntityProperty
property.
Each planning solution is recommended to have 1 ConstraintConfigurationProvider
property too.
Each planning solution used with Drools score calculation must have at least 1 ProblemFactCollectionProperty
or ProblemFactProperty
property.
The class should have a public no-arg constructor, so it can be cloned
(unless the solutionCloner()
is specified).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Workaround for annotation limitation insolutionCloner()
. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionEnable reflection through the members of the class to automatically assumePlanningScore
,PlanningEntityCollectionProperty
,PlanningEntityProperty
,ProblemFactCollectionProperty
,ProblemFactProperty
andConstraintConfigurationProvider
annotations based on the member type.Class<? extends SolutionCloner>
Overrides the defaultSolutionCloner
to implement a customPlanningSolution
cloning implementation.
-
Element Details
-
autoDiscoverMemberType
AutoDiscoverMemberType autoDiscoverMemberTypeEnable reflection through the members of the class to automatically assumePlanningScore
,PlanningEntityCollectionProperty
,PlanningEntityProperty
,ProblemFactCollectionProperty
,ProblemFactProperty
andConstraintConfigurationProvider
annotations based on the member type.- Returns:
- never null
- Default:
- NONE
-
solutionCloner
Class<? extends SolutionCloner> solutionClonerOverrides the defaultSolutionCloner
to implement a customPlanningSolution
cloning implementation.If this is not specified, then the default reflection-based
SolutionCloner
is used, so you don't have to worry about it.- Returns:
PlanningSolution.NullSolutionCloner
when it is null (workaround for annotation limitation)
- Default:
- org.optaplanner.core.api.domain.solution.PlanningSolution.NullSolutionCloner.class
-
lookUpStrategyType
LookUpStrategyType lookUpStrategyType- Returns:
- never null
- Default:
- PLANNING_ID_OR_NONE
-