← All challenges

Doctor Planning

April 2020

schedulinghealthcare

Based on a real-life use case offered by Simon Vandevelde (KU Leuven): a hospital needs a doctor present at all times. Build a 7-day schedule, starting on a Monday, that covers three shifts per day — early, late, and night — using 5 doctors, subject to these rules:

  1. A doctor can only work one shift per day.
  2. A doctor must be available for the shift they’re assigned (see availability below).
  3. If a doctor works the night shift, they either get the next day off or work the night shift again.
  4. A doctor either works both weekend days or neither.
DoctorAvailability
FlemingFriday, Saturday, Sunday only
FreudEvery day, early or late shift, never night
HeimlichEvery day, but never the night shift on weekends
EustachiEvery day, every shift
GolgiEvery day, every shift, but at most 2 night shifts total

Produce a 7-day, 3-shift schedule that satisfies every doctor’s requirements.

Send your solutions to DecisionManagementCommunity@gmail.com, or open a pull request to add yours here.

One submitted solution (Prolog, by Matteo Redaelli) was originally published as an external write-up whose link no longer resolves. If you’re the author (or know a working link), please open a pull request adding the url field back.

Solutions