Annotation Interface PlanningSolution


@Target(TYPE) @Retention(RUNTIME) public @interface PlanningSolution
Specifies that the class is a planning solution. A solution represents a problem and a possible solution of that problem. A possible solution does not need to be optimal or even feasible. A solution's planning variables might not be initialized (especially when delivered as a problem).

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 ConstraintWeightOverrides property too. This will make it easy for a solution to override constraint weights provided in ConstraintProvider, in turn making it possible to run different solutions with a different balance of constraint weights.

Each planning solution used with ConstraintStream 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).