Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.drools.planner.core.solver;
A PlanningFactChange represents a change in 1 or more planning facts of a solution. Planning facts used by a org.drools.planner.core.Solver must not be changed while it is solving, but by scheduling this command to the org.drools.planner.core.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 org.drools.planner.core.Solver. Note that the org.drools.planner.core.Solver clones a org.drools.planner.core.solution.Solution at will. On that change it should also notify the org.drools.WorkingMemory accordingly.

public interface PlanningFactChange {

Does the Move and updates the org.drools.planner.core.solution.Solution and its org.drools.WorkingMemory accordingly. When the solution is modified, the org.drools.WorkingMemory's org.drools.FactHandles should be correctly notified, otherwise the score(s) calculated will be corrupted.

solutionDirector never null. Contains the working org.drools.planner.core.solution.Solution which contains the planning facts (and planning entities) to change. Also contains the org.drools.WorkingMemory that needs to get notified of those changes.
    void doChange(SolutionDirector solutionDirector);
New to GrepCode? Check out our FAQ X