org.drools.planner.core.solver
Interface ProblemFactChange
public interface ProblemFactChange
A ProblemFactChange represents a change in 1 or more problem facts of a Solution
.
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 Solution
at will.
So any change must be done on the problem facts and planning entities referenced by the Solution
on the SolutionDirector
. On each change it should also notify the WorkingMemory
accordingly.
doChange
void doChange(SolutionDirector solutionDirector)
- Does the change and updates the
Solution
and its WorkingMemory
accordingly.
When the solution is modified, the WorkingMemory
's FactHandle
s must 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.