Package org.optaplanner.core.api.solver
Interface ProblemFactChange<Solution_>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Deprecated, for removal: This API element is subject to removal in a future version.
This interface is deprecated.
A ProblemFactChange represents a change in 1 or more problem facts of a
PlanningSolution
.
Problem facts used by a Solver
must not be changed while it is solving,
but by scheduling this command to the Solver
, you can change them when the time is right.
Note that the Solver
clones a PlanningSolution
at will.
So any change must be done on the problem facts and planning entities referenced by the PlanningSolution
of the ScoreDirector
. On each change it should also notify the ScoreDirector
accordingly.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doChange
(ScoreDirector<Solution_> scoreDirector) Deprecated, for removal: This API element is subject to removal in a future version.Does the change on thePlanningSolution
of theScoreDirector
and notifies theScoreDirector
accordingly.
-
Method Details
-
doChange
Deprecated, for removal: This API element is subject to removal in a future version.Does the change on thePlanningSolution
of theScoreDirector
and notifies theScoreDirector
accordingly. Every modification to thePlanningSolution
, must be correctly notified to theScoreDirector
, otherwise theScore
calculation will be corrupted.- Parameters:
scoreDirector
- never null Contains theworking solution
which contains the problem facts (andplanning entities
) to change. Also needs to get notified of those changes.
-
ProblemChange
.