org.drools.planner.core.solver
Interface PlanningFactChange
public interface PlanningFactChange
A PlanningFactChange represents a change in 1 or more planning facts of a solution.
Planning 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.
Any change should be done on the planning facts and planning entities referenced by the Solver
.
Note that the Solver
clones a Solution
at will.
On that change it should also notify the WorkingMemory
accordingly.
doChange
void doChange(SolutionDirector solutionDirector)
- Does the Move and updates the
Solution
and its WorkingMemory
accordingly.
When the solution is modified, the WorkingMemory
's FactHandle
s should be correctly notified,
otherwise the score(s) calculated will be corrupted.
- Parameters:
solutionDirector
- never null.
Contains the working Solution
which contains the planning facts (and planning entities) to change.
Also contains the WorkingMemory
that needs to get notified of those changes.
Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.