Interface ProblemChange<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.
@FunctionalInterface public interface ProblemChange<Solution_>
A ProblemChange represents a change in 1 or moreplanning entities
or problem facts of aPlanningSolution
. Problem facts used by aSolver
must not be changed while it is solving, but by scheduling this command to theSolver
, you can change them when the time is right.Note that the
Solver
clones aPlanningSolution
at will. Any change must be done on the problem facts and planning entities referenced by thePlanningSolution
of theProblemChangeDirector
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
doChange(Solution_ workingSolution, ProblemChangeDirector problemChangeDirector)
Do the change on thePlanningSolution
.
-
-
-
Method Detail
-
doChange
void doChange(Solution_ workingSolution, ProblemChangeDirector problemChangeDirector)
Do the change on thePlanningSolution
. Every modification to thePlanningSolution
must be done via theProblemChangeDirector
, otherwise theScore
calculation will be corrupted.- Parameters:
workingSolution
- never null; theworking solution
which contains the problem facts (andplanning entities
) to changeproblemChangeDirector
- never null;ProblemChangeDirector
to perform the change through
-
-