[rules-users] New user: reducing the problem space

Adam Hirsch adam.e.hirsch at gmail.com
Wed Aug 21 18:01:10 EDT 2013


Hey, folks -- I'm trying to wrap my head around Optaplanner by extending
the nurse-rostering example (for my wife, who's a nurse in a group that
needs a rostering solution, as it happens).

I've got a couple of approach/philosophy questions I haven't yet found
addressed in the docs, and I'm hoping someone could help direct me.

   - How best to constrain a problem: Say I've got six people to schedule
   and Employee A *must* work every Tuesday night and alternate Friday nights,
   while the other five people should fill in the remaining shifts as best
   they can with the other soft constraints I'm specifying. From my initial
   reading, I'm thinking the best approach will be to specify an "only Tuesday
   and alt Fridays" <Contract> in the scoreRules.xml (with an accompanying DRL
   rule to match whether or not the particular employee is working shifts
   other than those) and then specify it as a "hard" constraint for that
   particular employee. Do I have that right, or is there some way to remove
   those shifts entirely from the problem space, since we already know ahead
   of time how they'll be allocated?


   - A similar question would come up around Christmas, New Years, Arbor
      Day, etc, to wit: if we know before the problem ever runs which employees
      are supposed to be working those, what's the recommended approach to
      pre-setting an employee into those particular shifts before trawling the
      solution space?

Apologies if these are naive questions -- I suppose I could/should have
started with one of the easier examples, but, well, real world needs and
all.

Thanks!

Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130821/b3985d3f/attachment.html 


More information about the rules-users mailing list