I’m trying to use OR-Tools to solve custom nurse scheduling problem - essentially each nurse works exactly two paired shifts, and gives a ranked list of the paired preferences.
For example, nurse1 has the following preferences:
- shift 1 and shift 7
- shift 4 and shift 8
- shift 2 and shift 6
If the nurse gets assigned to shift 1, he must also work shift 7. If the nurse gets assigned to shift 4, he must also work shift 8. If the nurse gets assigned to shift 2 he must work shift 6.
This holds true for all nurses in the hospital.
I can schedule individual shifts, but I don’t know how to create the requests matrix or link the shifts.
Any ideas?
Thanks.