Op 16-05-11 01:46, felipebr schreef:
Hi Geoffrey, thank you for your answer.
My problem is implementing the solution initializer.
I didnĀ“t set the starting solution because I am implementing the
startsolution interface.
Need I set it anyway ?
Yes, a starting solution is kinda like setting the problem
[1]:
you load the facts (rooms, timeslots, ... or airplanes, airports, ... or
nurses, shifts, ...) from a dataset (coming from a database, xml file,
webservice, ...)
and give those facts to planner as a "starting solution".
But that doesn't mean that starting solution is initialized:
For example, just because it now knows the nurses and the shifts, it
doesn't have the Assignments yet: which nurse will cover which shifts?
The Assignments change during planning, to find the optimal state.
The StartingSolutionInitializer's job is to initialize those Assignment
as fast as possible, yet still get an ok solution.
Usually this uses the simple First-Fit Decreasing algorithm: for
example, sort all shifts and then assign them one by one to the best
remaining nurse. [2]
[1] Separate discussion: Maybe I should rename
setStartingSolution(Solution) to setProblem(Solution))?
But to do that cleanly, I would have to force the distinction of Problem
and Solution on the domain model of my users,
so it becomes setProblem(Problem).
But as far as I can see, forcing that distinction of Problem and
Solution on my users isn't a benefit for them, but instead an annoyance.
Feed-back welcome :)
[2] I am working on automating some types of
StartingSolutionInitializer, so it supports that First-Fit Decreasing
algorithm out-of-the-box.
I read it at the manual but how to set it
uninitialized ?
It's not cleary for me if I need to use it or not.
I already have the code to initialize my solution class but it work without
the score.
Need I implement it anyway or it should be used only if I want use the score
?
Best regards
--
View this message in context:
http://drools.46999.n3.nabble.com/How-to-initialize-LocalSearchSolverScop...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
With kind regards,
Geoffrey De Smet