I figured out the problem.

DefaultSolver.runSolverPhases() will go through each phase, and will revert
the changes if they're not better. Or, more exactly, here are lines 191-193:

            if (it.hasNext()) {
                // solverScope.setWorkingSolutionFromBestSolution();
            }

Now, if this involved setting the planning variables for the first time,
those will be reverted.

There's a few ways of tackling this, some of which are on the user end, such
as a adding a hard constraint to penalize the solution if the planning
variable isn't set.

Jon

--
View this message in context: 
http://drools.46999.n3.nabble.com/Planner-Initialized-solution-local-search-tp4018594p4018642.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to