Interface Solution<S extends Score>
-
- Type Parameters:
S
- theScore
type used by this use case
@Deprecated public interface Solution<S extends Score>
Deprecated.UsePlanningScore
,ProblemFactCollectionProperty
andProblemFactProperty
instead. Will be removed in 8.0.Retained for backwards compatibility with 6.x. This interface will be removed in 8.0.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 variables do not even have to be initialized.
A Solution is mutable. For scalability reasons, the same Solution instance, called the working solution, is continuously modified. It's cloned to recall the best solution.
This annotation described declarative properties of the planning solution. The planning solution class must implement this interface which is needed to get/set state. But the planning solution class must also be annotated with
PlanningSolution
describes declarative properties.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Collection<? extends Object>
getProblemFacts()
Deprecated.Called by theDroolsScoreDirector
when thePlanningSolution
needs to be inserted into an emptyKieSession
.S
getScore()
Deprecated.Returns theScore
of this Solution.void
setScore(S score)
Deprecated.
-
-
-
Method Detail
-
setScore
void setScore(S score)
Deprecated.- Parameters:
score
- sometimes null
-
getProblemFacts
Collection<? extends Object> getProblemFacts()
Deprecated.Called by theDroolsScoreDirector
when thePlanningSolution
needs to be inserted into an emptyKieSession
. These facts can be used by the constraints. They don't change during planning (except throughProblemFactChange
events).Do not include the planning entities as problem facts: they are automatically inserted into the
KieSession
.- Returns:
- never null (although an empty collection is allowed), all the facts of this solution except for the planning entities
-
-