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?