[rules-users] Planner - Initialized solution & local search

Garf JonGarfunkel at gmail.com
Thu Jul 12 19:46:02 EDT 2012


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.


More information about the rules-users mailing list