ge0ffrey wrote
Sounds weird to me.
It's sounds like you're assigning the pigeon holes to the pigeons,
instead of assigning the pigeons to the pigeon holes.
[...]
@PlanningEntity
class SessionAttendance {
Session session;
@PlanningVariable boolean attending;
}
Based on that, your start and end times can be calculated.
Either in the score calculation itself (insertLogicals etc like in nurse
rostering)
Or with shadow variables (like in vehicle routing and project job
scheduling)
http://blog.athico.com/2013/06/shadow-variables-planningvariablelisten.html
Shadow variables is probably more efficient.
Exactly why I asked...there's a certain art to framing the problem in a way
that makes it work well with the engine. I tried restructuring the problem
the other way around...I hadn't thought of calculating the windows on the
fly, but it does make a lot of sense. The engine now seems to be giving
much better answers faster. I'm still just determining the windows directly
in the score calculation, but now that it looks like it's functioning
better, I'll explore more efficient approaches like shadow variables or
using rules-based calculation.
I still haven't found the construction phase to be of any use...it seems to
just end right away with an initial solution of "all sessions off", but
maybe I just need to play with the configuration file some.
Lots to learn, but looks like a powerful and flexible tool framework.
Thanks again for the suggestion!
--
View this message in context:
http://drools.46999.n3.nabble.com/OptaPlanner-best-strategy-for-variable-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.