I would like to implement a Call shift for the following paper in Italy

Long term nurse scheduling via a decision support system based on linear integer programming: A case study at the University Hospital in Cagliari



Specifications

• no more than one shift per day should be assigned to nurses (further more, maternity nurses should not work during the night shift);
• when a nurse works in a given shift, he/she should not work in the following two shifts; each day, exactly one nurse should be in a call day (with the exception of maternity nurses who cannot be in a call day);
• no more than a given number of night shifts per month should beassigned to regular nurses;
• if a regular nurse works in a night shift in a given day, then the next two days are free days for him/her;
• the number of consecutive working days is upper and lower limited. Working days are partitioned in three shifts: 7:00 am - 2:00 pm,2:00 pm - 10:00 pm , 10:00 pm - 7:00 am. Therefore the amount of hours of shifts is equal to p1 = 7, p2 = 8, p3 = 9, respectively

– A regular nurse is expected to work 36 hours per week,while a maternity nurse is expected to work 30 hours per week.
– Regular nurses may work during any shift, while maternity nurses may only work during morning shift and evening shift.
– The maximum number of call days per month is 6, as well as the maximum number of night shifts per month.
– A nurse in a call day may only be asked to work in the night shift. As a consequence, call days are not assigned to maternity nurses.
– The maximum number of consecutive working days is 6, while the minimum number of consecutive working days is 3.
Finally, shifts should be assigned to nurses in order to guarantee the following requirements:
• at least 4 nurses should be simultaneously present during morning and evening shifts
• exactly 3 nurses should be simultaneously present during night shift ;
• if a day is an urgent day, at least 5 nurses should be simultaneously present during morning shift.
• Each day, exactly one nurse should be in a call day



Implementation

You can implement the spec above within 20 minutes.

National Holiday



Urgent Days

Special days are designated in the annual calendar.



Shift Definitions

We have five shifts, including a call and a day off.



We define the shift set as follws. We reference them in row constraints.



Staff Definitions

We define 21 nurses.



Row Constraints

– A regular nurse is expected to work 36 hours per week,while a maternity nurse is expected to work 30 hours per week.



• if a regular nurse works in a night shift in a given day, then the next two days are free days for him/her;
• when a nurse works in a given shift, he/she should not work in the following two shifts;
– A nurse in a call day may only be asked to work in the night shift.



– The maximum number of consecutive working days is 6, while the minimum number of consecutive working days is 3.



– The maximum number of call days per month is 6, as well as the maximum number of night shifts per month.





Column Constraints

• at least 4 nurses should be simultaneously present during morning and evening shifts
• exactly 3 nurses should be simultaneously present during night shift ;
• if a day is an urgent day, at least 5 nurses should be simultaneously present during morning shift.
• Each day, exactly one nurse should be in a call day



The synthesis of days set are as follows.



Solving Parameters and Solving Time

It shows we get the solution within 1 sec.



The solver reported no soft errors.

Solution



Discussion

Border constraints

The paper introduces a series of constraints, called “border constraints”. Schedule Nurse naturally handles them within the constraints of the rows, including the continuity of the previous month.



Load the Example Project File

File → Open Project File from GitHub