Modelling a Nurse Shift Schedule with Multiple Preference Ranks for Shifts and Days-Off

When it comes to nurse shift schedules, it is found that the nursing staff have diverse preferences about shift rotations and daysoff. The previous studies only focused on the most preferred work shift and the number of satisfactory days-off of the schedule at the current schedule period but had few discussions on the previous schedule periods and other preference levels for shifts and days-off, which may affect fairness of shift schedules. As a result, this paper proposes a nurse scheduling model based upon integer programming that takes into account constraints of the schedule, different preference ranks towards each shift, and the historical data of previous schedule periods tomaximize the satisfaction of all the nursing staff ’s preferences about the shift schedule.Themain contribution of the proposed model is that we consider that the nursing staff ’s satisfaction level is affected by multiple preference ranks and their priority ordering to be scheduled, so that the quality of the generated shift schedule is more reasonable. Numerical results show that the planned shifts and days-off are fair and successfully meet the preferences of all the nursing staff.


Introduction
Nurse-scheduling problem is a classical combinatorial optimization problem and has been shown to be NP-hard [1,2]. The objective of the nurse-scheduling problem is to determine the rotating shifts of the nursing staff over a schedule period (weekly or monthly) [3]. A nurse schedule includes the work shifts and days-off of the nursing staff, ensuring that all the combinations of shifts and days-off meet the manpower requirements of each shift (including total number of staff members, daily minimum number of staff members, and number of senior staff members required), and at the same time the number of basic days-off of each staff member should be fulfilled [3].
In general, there are a lot of types of work shifts and days-off in shift schedules. The most common ones include the 2-shift rotation (i.e., 12-hour day shift and 12-hour night shift) and the 3-shift rotation (i.e., 8-hour day shift, 8hour evening shift, and 8-hour night shift). Regular daysoff allow the nursing staff to rest, and each staff member is entitled to the same number of days-off [4][5][6][7]. Due to diverse personal lifestyles and different degrees of physical tolerance for continuous working days, the nursing staff usually have different preferences for work shifts and days-off.
The satisfaction of the nursing staff 's preference for work shifts and days-off enables them to take the proper rest to increase the quality of medical service and reduce medical cost of the hospital as well as risks of occupational hazard [8,9]. Therefore, it has been an interesting problem in the recent works to take into consideration the nursing staff 's preferences in planning the schedule of work shifts and daysoff and adopt maximization of satisfaction and minimization of penalty cost to evaluate the quality of the shift schedule with preferences [2,[10][11][12][13].
For example, as far as the hard constraints and soft constraints of the nurse shift schedule (including the nursing staff 's preferences and the demands of hospitals) are concerned, Hadwan et al. [2] aimed to minimize the penalty cost of a nurse schedule. Aickelin and Dowsland [11] applied a genetic algorithm to solve the nurse shift scheduling problem with the objective of minimizing the penalty cost for not fulfilling the preferences of the nursing staff. Maenhout and Vanhoucke [12] investigated the penalty costs with multiple constraints (including the nursing staff 's preferences and some specific combinations of work shifts and days-off). Topaloglu and Selim [13] considered a variety of uncertain factors in nurse shift scheduling to propose a fuzzy multiobjective integer programming model which takes into consideration the fuzziness of the objective and the nursing staff 's preferences.
From the literature, we discover that, in the penalty cost (or satisfaction) due to the nursing staff 's preferences in the objective function, all the previous works only focused on the most preferred work shift and the number of satisfactory days-off of the shift schedule at the current schedule period and further investigated neither different preference ranks (such as three ranks: good, normal, or bad) of the nursing staff toward different work shifts or planned days-off nor the number of times in which their preferences are satisfied in the previous shift schedules and days-off. Since the constraints of the schedule lead to the fact that the most preferred work shifts and days-off of each staff member cannot be fulfilled completely, we believe that if the penalty cost (or satisfaction level) due to preferences of the nursing staff does not consider different preference ranks and the historical data of previous schedules, the long-term fairness and justice of the nurse shift schedules is affected. For example, if each nursing staff member has three different preference ranks (good, normal, or bad) towards a 3-shift rotation, those scheduled to a bad work shift would have a larger preference penalty cost (or lower preference satisfaction level) as compared with those scheduled to work a normal shift and should be assigned a higher priority to their higher preference rank in their schedule at the next scheduling period.
In light of the above, this paper proposes a binary integer linear programming model for the nurse shift schedule with different levels of satisfaction preference and a different priority ordering of the nursing staff for planning their shift schedule. The objective of this model is to maximize the overall satisfaction level of the nursing staff towards their work shifts and days-off schedule. In addition, some common nurse-scheduling constraints are considered, including the limited number of nursing staff members, work shift limitation, and day-off limitation. Our mathematical model is capable of effectively helping schedule planners to design a nurse shift schedule that attempts to, within all scheduling constraints, satisfy the shift and day-off preferences of most of the nursing staff members in a fair manner and to achieve the highest overall satisfaction level.
The main contributions of this paper are stated as follows. In the proposed mathematical model for nurse schedule, the work shift and day-off preferences of the nursing staff are categorized into different levels and are then integrated to be solved. In addition, in the case, where the preferred number of shifts or days-off exceeds the actual shifts or days-off available (due to schedule constraints), a priority ordering mechanism of the nursing staff when planning their shift schedule is applied to solve the contradictory situations among their preferences.
The rest of this paper is organized as follows. Section 2 gives the literature review of our work. Section 3 first describes our concerned problem and then constructs its mathematical programming model. Section 4 gives a numeric example to analyze the performance of the shift schedule constructed by our mathematical model. Finally, a conclusion is made in Section 5.

Literature Review
The nurse-scheduling problems have been solved by a variety of methods, which are mainly introduced by mathematical programming, heuristics, and others in this section.
First, the mathematical programming approaches for the nurse-scheduling problem are introduced. Maenhout and Vanhoucke [12] proposed an integrated analysis method to solve human resource planning and shift scheduling problem of nurses on the long run. Azaiez and Al Sharif [14] solved the nurse-scheduling problem with a 0-1 linear programming model, which takes into consideration the ratio of nurses working night shifts or having days-off on weekends and tries to avoid unnecessary overtime so that hospital costs can be reduced. Topaloglu [15] proposed a multiobjective programming model to tackle the nurse-scheduling problems of house physicians in the emergency room. Based on the AHP method, soft constraints in the model are weighted in accordance with their relative importance and this becomes the basis for weighting objective functions. Topaloglu [16] proposed a multiobjective scheduling model for planning the shifts of resident physicians, in which seniority of a resident physician is used for the weight setting. Empirical analysis showed that the model is far superior to the manual scheduling method in terms of efficiency and time-saving.
Beliën and Demeulemeester [17] proposed an integrated scheduling method for nurses and surgeons. They applied the branch-and-price method to perform integration, which is one of the most common methods to generate explicit solutions among the column generation techniques. Glass and Knight [18] identified four categories of nurse-scheduling problems and solved them with mixed-integer linear programming. Results showed that the optimal solutions were produced in all benchmarking examples within 30 minutes. The characteristic of this model is that it reduces the collection space based on the structure of the problem so that the problem-solving efficiency can be enhanced. Valouxis et al. [19] proposed a 2-stage solution to solve the nurse-scheduling problem, where the workload and days-off of each nurse are first determined before the shifts are planned.
Second, the heuristics for nurse-scheduling problems are introduced. Hadwan et al. [2] proposed a harmony search algorithm for the nurse-scheduling problem, which was tested in hospitals in Malaysia and was shown to be better than the genetic algorithm approach as well as most heuristic approaches. Aickelin and Dowsland [11] proposed an indirect genetic algorithm for the nurse-scheduling problem, in which a chromosome encoding is performed; recombination is conducted with a heuristic approach; evolution is conducted via mixed-crossover to locate better solutions. The method has been tested and was found to be superior to some of the already published Tabu search methods.
Tsai and Li [20] proposed a 2-stage programming model to analyze and solve the nurse-scheduling problem, in which days-off are planned in the first stage, and then shifts are determined in the second stage. The two stages were then analyzed with a genetic algorithm. Sadjadi et al. [21] proposed a mixed-integer nonlinear programming model to randomly plan shift schedules, in which the demand for human resource is considered a variable and is based on a certain probability distribution. Then, the authors applied the GA and Taguchi method to solve the nurse-scheduling problem. Gutjahr and Rauner [22] proposed ant colony optimization to solve dynamic regional nurse-scheduling problem in a public hospital in Vienna, Austria. Upon verification via simulation experiments, the model was shown to be superior to a greedy assignment algorithm.
Finally, except for the above two methods, some other solutions for the nurse-scheduling problem are introduced. Lü and Hao [23] proposed adaptive neighborhood search (ANS) for the nurse-scheduling problem, which performs a neighborhood search and changes based on three different levels of intensity and change. The approach was tested on 60 examples and the results were quite impressive. M. V. Chiaramonte and L. M. Chiaramonte [24] proposed to use a competitive agent-based negotiation algorithm for the nursescheduling problem, which aims to maximize preferences of nurses and minimize the costs. Vanhoucke and Maenhout [25] proposed a set of complexity indicators for the nursescheduling problem, which can indicate the complexity of the problem and automatically come up with a simulation solution that meets the level of complexity of the problem. They can be used as the baseline analysis to compare the performance of different approaches.
From the above literature review, it can be found that many works did not explore the preference ranks of the nursing staff towards each shift rotation or day-off. In addition, the preferred shift and day-off are not given any priority ordering according to the previous scheduling periods. Based on this, this paper proposes a mathematical programming model for the nurse-scheduling problem in order to produce a preliminary shift schedule that can fulfill the needs of practical work and at the same time satisfy most nursing staff members.

Methodology
In this section, we construct a mathematical model to plan the shift rotation and day-off based on the preference ranks of the nursing staff. The construction process of the mathematical model includes description of the problem, identification of the satisfaction level of the nursing staff, and the development of the mathematical model.

Problem Description.
In this subsection, we explain the actual work scenario inside the hospital and then the problems encountered when planning for a shift schedule.
We first describe the work scenario, which includes the structure and constraints of shift schedule, combination of the nursing staff, and the preference ranks of the nursing staff towards each shift rotation and days-off. Consider a shift schedule for a 2-week work in which the shifts of a day start at 0:00 AM and the hospital runs on a 3-shift rotation: a day shift (8:00 AM∼4:00 PM), an evening shift (4:00 PM∼0:00 AM), and a night shift (0:00 AM∼8:00 AM). Note that only regular days-off are planned in the schedule.
The planned schedule has some constraints on shift rotations: each nursing staff member is only assigned to a fixed type of shift within each schedule period; the number of nursing staff members required for each shift is fixed (after deducting the number of nursing staff members on regular days-off); each person should have at least an 8-hour rest before continuing on to the next shift. Note that the constraint of a fixed shift for each staff member is reasonable since, in practice, in order to ensure that the nursing staff enjoy the health with fixed work and rest, some hospitals assign each nursing staff member a fixed work shift type for all working days of the scheduling period. In addition, the planned schedule has some constraints on days-off: the total number of days-off of each nursing staff member within the schedule period is the same, and each nursing staff member is entitled to at least one day-off each week. The maximum number of the nursing staff members is allowed to be on dayoff, and the number of senior staff members working in each shift each day are known and flexible.
As for composition of the nursing staff, the qualified nursing staff members are categorized into junior and senior staff members, where the staff members with at least 2 years of nursing working experience are considered senior, and those below 2 years, junior. Also, all the nursing staff are full time. When the total number of staff members is insufficient to cover all the shifts, the concerned department has to hire new staff members to fill this shortage in manpower. Outsourcing nursing staff members from other departments is not allowed.
Lastly, the nursing staff are asked to rank their preferences for each shift and day-off, which are called preference ranks. The preference ranks of each shift are classified into three types: "good, " "normal, " and "bad" shifts. The preference ranks of days-off are classified into "good" and "bad" daysoff based on the "preferred" and "not preferred" days-off, respectively. Note that each staff member has a fixed number of days-off within each schedule period. Therefore, we assume that there may be more than one "good" day-off and no further rank is made among all the "good" days-off.
As the nursing staff have rather diverse preferences, they are asked to fill out a preference form before the schedule is formulated so that the schedule planner has adequate information about the staff 's preferences for shifts and daysoff and the total number of the nursing staff preferring each shift or day-off. In the preference form, the preference ranks of shifts are expressed in a numerical ordering: 1 indicates "good" (most preferred), 2 indicates "normal, " and 3 indicates "bad" (least preferred). The preference ranks of days-off are expressed as follows: 1 indicates "good" (preferred) while 3 indicates "bad" (not preferred). Note that the numbers of the preference ranks for shifts and days-off are three (i.e., 1, 2, and 3 for good, normal, and bad, resp.) and two (i.e., good and bad), respectively. We assume that the good and bad preference ranks for shifts and days-off are corresponded with each other. Therefore, we let the good and bad preference ranks for days-off be 1 and 3, respectively.
In the actual work scenario, each nursing staff member has different preference ranks for shifts and days-off, markedly increasing the computing time and difficulty to formulate a shift schedule. Also, a lot of constraints for schedule make it impossible for all the staff members to work their preferred shifts and have their preferred daysoff. Therefore, it is important to formulate a preliminary shift schedule recommendation so that schedule planners can perform necessary and flexible adjustments on the recommended schedule, reducing the difficulty and workload of manpower planning.

Preference Satisfaction of Shifts and Days-Off.
This subsection discusses the satisfaction of the preference ranks of shifts and days-off, which is called preference satisfaction. This paper aims to maximize the overall shifts and days-off preference satisfaction of the nursing staff. There are different preference ranks of shifts and days-off, and the preference satisfaction increases with the preference ranks. The more the number of preferred shifts and days-off is satisfied, the higher the overall satisfaction level towards the shift schedule will be.
However, due to the constraints on shifts and days-off, not all the preferred shifts and days-off could be satisfied. For the staff members not scheduled to their preferred shifts or days-off for consecutive schedule periods, if their preferences in the next schedule are satisfied with a higher priority, then their preference satisfaction must be higher. Therefore, in designing the preference satisfaction, the past schedules are reviewed first (to count the number of times in which a preferred shift of an individual is satisfied in the past few schedule periods) and the weights of preferred shifts and days-off of each nursing staff member are calculated before the current schedule is formulated. Note that the staff member with a larger preference weight must be scheduled with a higher priority order. Then, based on these two weighted values, the preference satisfaction of work shifts and days-off of the current schedule can be calculated.

Mathematical Model.
In this subsection, a binary integer linear programming model is constructed, which aims to maximize the overall preference satisfaction of the nursing staff towards the shift schedule by taking into consideration the preference ranks of the nursing staff for different work shifts and days-off, despite the constraints of manpower, shifts, and days-off.

Symbols
Subscript : Index of a nursing staff member : Index of a shift type : Index of date.
We continue to look at the constraints of the model. Nine constraints (from Constraint (6) to (14)) are identified based on the shift scheduling constraints, in which Constraints (6) to (8) are shift constraints, Constraints (9) to (12) are day-off constraints, and Constraints (13) to (14) are binary variable constraints. Constraint (6) enforces each staff member to be assigned to at most one work shift within each schedule period. According to Constraints (7) and (8), respectively, manpower demand and number of senior staff members of each shift each day should be met. Constraint (9) enforces the fact that the total number of days-off assigned to each staff member in a work shift should be the same within a certain schedule period. Constraint (10) enforces the maximum total number of nursing staff members allowed to have day-off on each shift each day. As the number of patients usually fluctuates, the schedule planner may adjust the total number of nursing staff members allowed to be on day-off according to the actual number of patients on that particular day. Constraint (11) enforces the fact that each staff member has to be given at least one day-off each week and the interval between two different shifts must be more than 8 hours. Constraint (12) ensures that each staff member has at least an 8-hour rest before continuing on to the next shift. According to Constraints (13) and (14), the decision variables of work shifts and days-off should be either zero or one.

Numeric Analysis
The performance and feasibility of the model are evaluated on the obstetrics and gynecology department of a hospital. The parameters of the department are stated as follows. The paper involves a total of 20 nursing staff members, in which those from #1 to #15 are senior, while those from #16 to #20 are junior. Each staff member is allowed to have a total of 4 daysoff over the overall schedule planning period (14 days). A total of 8 staff members are required for day shift, 7 for evening shift and 5 for night shift. During each shift every day, the number of staff members allowed to have day-off is 3 persons for the day shift, 3 persons for the evening shift, and 2 persons for the night shift, and at least one senior staff must be on duty during each shift. The schedules of the past two periods are collected as historical data, in which nursing staff members 5, 6, 17, 19, and 20 were on night shifts in the previous week while staff members 6, 7, 8, 9, 14, 15, and 17 were given day-off on the last day of the previous week. First, the shift preference weights and the preference satisfaction of three shift preference ranks of each staff member are calculated and listed in Tables 1 and 2. Table 1 shows the number of times in which each shift preference rank is satisfied in the previous schedule periods and the preference weight at the current schedule period. In Table 1, since staff members 5, 6, 17, 18, and 19 were assigned to "bad" shifts in the past two schedule periods, their shift preference weights are set to be larger in the current schedule planning. To maintain fairness of shift rotation, those staff members are therefore given higher chances of being assigned to "good" shifts in the current schedule. Table 2 shows each nursing staff member's satisfaction for shift preference ranks. A smaller preference rank number indicates a more preferred shift; that is, preference rank 1 yields the highest degree of preference satisfaction, while preference rank 3 yields the lowest degree of preference satisfaction. In general, in solving a mathematical model, the model would attempt to satisfy all the shifts with preference rank 1 in order to enhance the satisfaction of the nursing staff toward the shift schedule. However, in the current schedule planning period, 15 staff members consider day shifts as "good, " 4 staff members consider evening shifts as "good, " and 1 staff member considers night shifts as "good. " Since the total number of the nursing staff members who prefer day shifts exceeds the total manpower demand of 8 persons for day shift, the good shift preference ranks of 7 nursing staff members cannot be satisfied.
Next, each staff member's day-off preference weights and preference satisfaction for day-off preference ranks are calculated and listed in Tables 3 and 4. Table 3 shows the number of times in which each day-off preference rank was satisfied in the past schedule periods and the current weighted preference. It is found from Table 3 that staff member 18 was given the largest number of "bad" days-off within the past two schedule periods, and hence her/his day-off preference weight is set to be larger than the others in the current schedule. To maintain fairness of the schedule, the staff member is therefore prioritized, that is, given a higher chance of being assigned "good" days-off in the current schedule. Table 4 shows each staff member's preference satisfaction of the "good" day-off preference rank. Since each staff member is entitled to 4 days-off, each has 4 days-off with a "good" dayoff preference rank and the same preference satisfaction level.
Lastly, the numerical example is solved under IBM ILOG CPLEX Studio 12.4 software on a PC with an Intel i7-3770 CPU 3.90 GHz and 16 GB RAM, which operates in Windows 7 (64x). The optimal solution is obtained very frequently. The average computing time of generating a solution is about 3.755 seconds. The generated schedule is listed in Tables 5 and  6, which meet the constraints on numbers of senior nursing staff members, shifts, and days-off.
Note that, since both the parameters , for manpower demand in shift j on day k and max , for the maximum number of staff members allowed to have day-off in shift j on day k can be adjusted according to the realistic situations, the generated schedule can be used in the realistic instances with different sizes. For the schedule with a longer schedule period (with multiple two-week periods), it can be handled by splitting the whole schedule period to multiple two-week periods and then using the generated schedule of each twoweek period as the history for the next one. Table 5 shows the resultant schedule for shifts, in which the assigned shifts for 20 nursing staff members are shown; each staff member is associated with two entries of 0 (nonassigned shifts) and one entry of 1 (the assigned shift); the entries with star marks are the shifts that are not preferred. From Table 5, each staff member is assigned to a fixed shift type for all working days in the scheduling period of 14 days and the manpower requirement of each shift is satisfied.
From Table 5, we also observe that the schedule satisfies the demand of each work shift, in which eight staff members are scheduled to work on the day shift (staff members 3, 4, 6, 11, 12, 15, 16, and 18), 7 on the evening shift (staff members 1, 2, 5, 7, 8, 17, and 19), and 5 on the night shift (staff members 9, 10, 13, 14, and 20). It is also observed from Table 6 that each staff member is also given sufficient rest time between two shifts. For example, since staff member 5 was scheduled to work night shift in the previous schedule period and was given 1 day-off on the last day, he/she is therefore not scheduled for "good" (day) shift even though he/she has a large shift preference weight. In addition, as for shift preference, 3 staff members are scheduled for the "normal" shift (staff members 1, 5, and 19), 4 for the "bad" shifts (staff members 9, 10, 13, and 14), and the rest for the "good" shift. It can be found that those scheduled for "bad" shifts have a small shift preference weight, indicating that the schedule is formulated fairly. Table 6 shows the resultant schedule for days-off, in which the four days-off of each staff member are marked with 1; the entries with star marks are the days-off that are not preferred. From Table 6, the day-off constraints of all the nursing staff are satisfied and the total number of nonpreferred days-off is small. In addition, note that the total number of days-off of each staff member within the schedule period is the same and each staff member is given at least 1 day-off each week. Therefore, the number of nursing staff members allowed to take a day-off and the minimum number of senior nursing staff members on duty each shift each day are fulfilled. As for day-off preference, only a few staff members are not given "good" days-off (staff members 4, 6, 11, and 20), and all these have low day-off preference weights.

Conclusion
Nurse-scheduling is a difficult and time-consuming task for schedule planners. Since there are a lot of hard constraints imposed by the government and the hospital, and multiple preference ranks of the nursing staff for work shifts and daysoff are considered, it is rather impossible to obtain a perfect nurse shift schedule manually. Therefore, this paper performs a mathematical programming approach to establish a model to effectively make a nurse shift schedule. The results of the schedule show that all hard constraints are filled completely and the preferred shift and days-off of the nursing staff are assigned fairly.
In the future, we intend to extend our work along the following two lines. First, for the objective function of the mathematical model proposed in this paper, the preference satisfactions of the nursing staff for work shifts and daysoff of the schedule could be integrated. Since the number of days-off of the schedule is greater than the number of shifts, the proposed model is scheduled in two stages in this paper (first days-off and then work shifts). Therefore, it would be of interest to integrate them to be solved in a single stage to enlarge possible solutions, to increase the preference satisfaction of the nursing staff.