2011 3rd Conference on Data Mining and Optimization (DMO) 28-29 June 2011, Selangor, Malaysia
Hybridization of Heuristic Approach with Variable Neighborhood Descent Search to Solve Nurse Rostering Problem at Universiti Kebangsaan Malaysia Medical Centre (UKMMC) Ebtisam Sharif, Masri Ayob and Mohammed Hadwan Faculty of Information Science and Technology Universiti Kebangsaan Malaysia 43600 Bangi, Selangor, Malaysia
[email protected],
[email protected] and
[email protected]
Abstract— Nurse Rostering problem (NRP) represents a subclass of scheduling problems that are difficult to solve for optimality. It deals with assigning shifts to staff nurses subject to satisfying required workload and other constraints. The constraints are classified into hard constraints (compulsory) and soft constraints (should be satisfied as much as possible). A feasible solution is a solution that satisfies all hard constraints. However, the quality of the duty roster is measured based on satisfying the soft constraints. This study is an attempt to solve a real world scenario from Universiti Kebangsaan Malaysia Medical Center (UKMMC). Currently, the duty roster is constructed manually by head nurses in different wards. So, the main goal of our work is to generate good duty roster that satisfied all the hard constraints which are required by (UKMMC). A constructive heuristic is introduced to solve (UKMMC) nurse rostering problem. This heuristic is a hybridization of cycling schedule with non-cycling schedule (random order). If the solution is not feasible, we apply a repairing mechanism to produce feasible solution. Then, the initial solution is improved by applying variable neighborhood descent search. Computational results are presented to demonstrate the effectiveness of the proposed approach. Keywords- nurse rostering problems, cycling approach, noncycling approach, heuristic and Meta-heuristic.
I.
INTRODUCTION
Universiti Kebangsaan Malaysia Medical Centre (UKMMC) is an educational hospital which belongs to Universiti Kebangsaan Malaysia (UKM). It has a workforce exceeding 1300 nurses attending about 900 beds [1]. This hospital still uses manual methods to create a two-week duty roster with three shifts a day for the staff nurses. The time of constructing the duty roster is varied (from 4 to 7 days depending on the number of staff nurses at each ward). In this paper, we introduce a constructive heuristic method by hybridizing cycling scheduling with non-cycling scheduling approaches (random order) to construct a feasible initial
978-1-61284-212-7/11/$26.00©2011 IEEE
solution. If the solution is not feasible, then, a repairing mechanism is applied to produce feasible solution. We then improve the solution using variable neighborhood descent search algorithm. As for the scope of this study, we focus on UKMMC datasets only in applying this algorithm. Section 2 of this paper presents a background of the literature regarding NRP. Section 3 focuses on the NRP at UKMMC. In section 4, introduces the proposed approach. Section 5 is devoted to show the experimental results. Finally, in section 6 we conclude the paper with final remarks. II. RELATED WORK Nurse rostering problem (NRP) is concerned with generating rosters where required shifts are assigned to nurses over a scheduling period in order to satisfy a number of constraints [2, 3] [4]. These constraints are usually defined by regulations, working practices and preferences of nurses in different countries. There are many methods and techniques that have been applied to solve NRP. (please refer to survey papers [3, 5].) Based on the literature, cyclical rostering is a common approach to solve NRP. It is a method for designing working patterns that satisfy the rules and regulations then rotate those patterns between the staff nurses. Some researchers used cyclic rostering approaches to generate the duty roster at healthcare organizations, and they conclude that, cyclical approaches can easily generate a good duty roster, distribute the work load evenly among the available nurses and help the staff nurses to know their working shifts for enough time a head in order to plan their social life [6-14]. On the other side, other researchers maintained that cyclic rostering approaches have a big lack in flexibility to address the change in working regulations and the demand of modern hospitals [3].
178
Due to the inflexibility of cyclic rostering approach to address the modern hospital requirements, a non-cyclic rostering approaches have appeared in order to offer a more flexible duty roster for the staff nurses. Non-cyclic rostering approaches can address the sudden change in coverage demand and take the individual preferences into account in a better way than cyclic rostering approach [3]. In non-cyclic rostering approaches, the workload is assigned to each nurses based on different operational requirements which make each nurses got different working shift patterns than each other in each rostering period. The non-cyclic rostering approaches have some disadvantages such as the nurses cannot predict their future working shift pattern as it produces a different duty roster at each time. Also, the process of constructing the duty roster using noncyclic rostering approaches is difficult and time consuming [3]. Some researchers used non-cyclic rostering approach such as in [15-17]. So in this work, we have balanced the use of cyclic and non-cyclic rostering approaches to construct the duty roster. Variable Neighborhood Search algorithm VNS has been widely applied to solve NRP such as in [18-20]. As a matter of fact, it shows promising results. Therefore, in this work, we hybridize cycling schedule with non-cycling schedule (random order) with a repairing mechanism followed by a variable neighborhood descent search algorithm to solve NRP at UKMMC. III.
NURSE ROSTERING PROBLEM AT UKMMC
At UKMMC the nurse roster must be generated for every fourteen days. A day off or a working shift must be assigned to each nurse in each day during the planning period. Since, the roster is still being constructed manually; it is difficult to fairly consider all requests from nurses. One of the major complaints raised by the nurses is that, the head nurse was not distributing workloads fairly. More details about the UKMMC NRP can be found in [1]. A. UKMMC Hard and Soft Constraints For UKMMC NRP’s, there are thirteen constraints (8 hard constraints and 5 soft constraints), more information about UKMMC can be found in [1]. The following are the hard constraints: (H1) All shifts must have at least the requested number of nurses. (H2) Each nurse is allowed to work at most one shift (Morning, Evening or Night) on a particular day. (H3) During scheduling period, all nurses must have at least 2 days off in the two-week roster. This constraint indicates the minimum number of off-days for each nurse. (H4) At least one senior nurse must be scheduled to each shift. (H5) Each nurse must not be scheduled to an isolated working day. This constraint presents the minimum number of consecutive days that any nurse should work.
978-1-61284-212-7/11/$26.00©2011 IEEE
(H6) The maximum working days for each nurse are 12 days for each fourteen days and the minimum is 10 days. (H7) The maximum consecutive working days that the staff nurses can work is 4 days. (H8) For all night shifts, it must be in the form of four consecutive night shift followed by two days off. This indicates that nurses should not be assigned individual night shifts. The soft constraints for NRP at UKMMC are: (S1) To give a fair number of working days and days off to all the nurses. (S2) To give each nurse at least one day off in the weekend during the schedule period. (S3) To give four consecutive morning shifts followed by one day off. (S4) To give four consecutive evening shifts followed by one day off. (S5) To give an evening shift after the day off that follows the night shift. The quality of the roster is always measured by how far it can satisfy the soft constraints. The higher weight indicates to the higher value and importance of the specific soft constraint to be satisfied. Assigning an appropriate penalty (Weight) for each violation of soft constraint is very important in heuristics methods. The problem is that there is no standard weights for the soft constraints, so we use the same penalty weights as in [21] which are: TABLE1. THE WEIGHTS OF EACH SOFT CNSTRAINT [1] WEIGHT SOFT CONSTRAINTS Gives a fair number of working days and days off to all staff 100 nurses. Gives each nurse at least one day off in the weekends. 100 Give four consecutive mornings shift followed by one day off. 10 Gives four consecutive evenings shift followed by one day off 10 Give an evening shift after the day off that follows by night shift. 1
B. Coverage Demand The coverage demands are the constraints that determine the minimum required number of staff nurses from each category in each shift for each day. It is the most common and the most important constraint that needs to be satisfied (H1). In addition, it should be noted that, shift demands are different from one day to another and from one ward to another. Please refer to table 2 for a coverage demand for some UKMMC datasets. For example, in ward CICU, there are 11 nurses. The ward needs 8 nurses to work during the weekdays and 6 nurses to work during the weekends. TABLE2. THE MINIMUM COVERAGE DEMAND [1]. Weekdays(Mon- Friday) Weekend(Sat and Sun)
Data Set Total Morning Evening Nurses (7AM- (2PM9PM) 2PM)
CICU Surgry5 MDI N50
11 18 19 50
3 4 4 10
3 4 4 10
Night Morning (9 PM- (7AM7Am) 2PM)
2 3 3 10
2 4 4 10
Evening Night (9 PM(2PM7Am) 9PM)
2 4 4 10
179
2 2 2 10
GICU
73
16
16
15
15
15
14
C. Examples of shift sequences and penalty calculation Table 3 shows some examples of shift sequences and the attached penalty for each pattern. TABLE 3.SAMPLE FOR SHIFT SEQUENCES Shift Sequence NNNNOOE NNNNOON EEEEO MMEEO
Penalty 0 1 0 10
Comment Satisfy S5 Violation of S5 Satisfy S4 Undesirable patterns (violation of S3)
EEMMO
10
Undesirable patterns (violation of S4)
TABLE 4 PRESENTS AN EXAMPLE OF HOW TO CALCUALTE THE PENALY FOR SOFT CONSTRAINT 1.
N1 N2 N3
TABLE 4. SAMPLE FOR CALCULATION THE PENALTY OF S1 Total working Total No. of days Violation of S1 days off 11 3 100 10 4 0 12 2 100 Total penalty of S1 200
Note: ideal case is 10 working days and 4 days off, S1= soft constraint number 1
IV.
SOLUTION APPROACH
This section reviews all details that we used in the proposed heuristic. The algorithm applied algorithm has two phases. The first phase is used to construct the initial solution (feasible roster). It includes three approaches cyclic, non-cyclic (random order) and a repairing mechanism. The second phase is used to improve the quality of solution obtained from the first phase. At this phase, we apply Variable Neighborhood Descent Search algorithm (VND) to the solution obtained from the constructive phase.
two nurses in the same day. Figure1 provides more details for all the processes that are used to construct and improve our proposed solution A. Constructive Heuristic This phase is is where an initial solution is generated and it must be a feasible solution. It is based on three stages to generate the initial solution (feasible roster). These steps are: Step 1: The Construction of Block and Cyclic Pattern: To constructing any blocks, we must take some specific criteria in to account. Therefore, we first consider the shifts that are the most difficult or the most important to schedule. In this case, the most important and difficult one to schedule is the night shift (H8). Then we design a sequence of shifts with four consecutive night shifts followed by two days off (we call them pattern). Those patterns are used to fill up the shift slots for a group of nurses cyclicly. Approach to distribute required number of night shifts for four positions (we call the schedule for a group of nurses a cyclic pattern). The numbers of patterns in each day will be based on the the coverage for each ward. For example, in Table 5, the number of night shifts in d1 is two, because the required coverage for night shift per day is two based on shift demands of CICU dataset. So, we repeat the first pattern before cycling it. This is applied in each ward with different demands. Table 5 demonstrates more details: TABLE5. EXAMPL OF DATASET p1 p2 p13 N N d1 N N d2 N N d3 N N d4 O O N d5 O O N d6 N d7 N d8 O d9 O d10 d11 d12 d13 d14
POSSIBLE NIGHT PATTERNS FOR CICU p4
N N N N O O
p5
p6
p7
p8
N N N N O O
N N N N O O
N N
N N
P9
p10
p11
N= Night shift, O = Day Off, P(1:11) = number of nurses, D(1:14)= number of days
FIGURE 1. STEPS OF GENERATING THE DUTY ROSTER
Two neighborhood structures were used, these neighborhoods are commonly used in NRP, these are reassigning shifts for some nurses and swapping shift between
978-1-61284-212-7/11/$26.00©2011 IEEE
Step 2: Using Non-cyclic (Random Order): The concept of random order is essential in probability theory and statistics. The main idea for this concept relies on the notion of a sequence of random variables. It does not have any specific pattern, specific criteria or objective that ought to be taken into account. It is just randomly distributed. We use this type to randomly distributing the required remaining shifts for nurses who are not involved in the cyclic patterns. Table 6, shows and example of randomly distributing three morning and three evening shifts based on shift demand of CICU dataset:
180
TABLE 6. EXAMPLE OF DISTRIBUTE SOME SHIFTS BY USING RANDOM ORDER FOR CICU DATASET. p1 p2 p13 p4 p5 p6 p7 p8 P9 p10 p11 N N M M M E E E d1 N N E E E M M M d2 N N M M M E E E d3 N N E M M M E E d4 O O N N M E E E M M d5 O O N N M E M M E E d6 E E N N M M M E d7 E E N N M E M M d8 E E O O N N E M M M d9 M O O N N M E E E d10 M E M M N N M E d11 E M E E N N E M d12 M E M M O O N N E E d13 M E E E O O N N M M d14 M O= Day off, M= Morning, E= Evening, and N=Night.
Step 3: Using Repairing Mechanism: This step is based on swapping the shifts between nurses on the same day to tackle the random shifts distribution and in order to satisfy all the hard constraints, and consequently get feasible solutions. Figure 2 provides more details, where case A presents the shift distribution before the swap, and case B presents the post-swap distribution.
systematically change the visited neighborhood structure using a local search. Hence, after constructing the initial roster (the feasible solution); the second stage is to apply VNDS to improve its quality. Two neighborhood structures are applied in this work. These two neighborhoods are commonly used in nurse rostering problem, the first neighborhood structure is to re-assign shift to a different nurses, and the second neighborhood structure is to swap the assigned shifts between two nurses on the same day. At this stage, these processes will continue until reaching an acceptable penalty or stopping condition. See figure 4 for the variable neighborhood descent search procedure. Variable Neighborhood Descent Search Procedure Initialization select neighborhood structures N , k = 1,2... K ; construct an initial solution x; Repeat until no improvement is obtained: (1) Select k = 1; (2) Repeat the following steps until k = K ; (a) Explore to find the best neighbor x’ of x ; (b) Move or not. If the solution thus obtained x' is better than x; set x = x’ and k = 1; otherwise, set k = k + 1; Note: This process is repeated until there are no improvement moves left by using both neighborhood structures 1 and 2. FIGURE 4. VARIABLE NEIGHBORHOOD DESCENT SEARCH IN PSEUDO-CODE
The procedure of variable neighborhood descent search is the standard variable neighborhood descent search as in [22]. FIGURE 2:EXAMPLE FOR REPAIR MECHANISAM
See figure 3 for more details about the construction procedure. Start with empty schedule: While the nurse is not scheduled: Repeat: Rotate required number of consecutive night shift until cover all days. Set the remaining shift by random order While the schedule is not feasible: Repeat: Repeat: If consecutive working days for each nurse more than required number, then move the disturbing shift for other nurse. Repeat: Check the number of day off for each nurse if less than minimum number of off day then swap work shift with off day between other nurse. Repeat: If there are isolated day then swap day off with work shift between other nurse. Note: This process is repeated until feasible solution is obtained. FIGURE 3. INITIAL SOLUTION CONSTRUCTION PROCEDURE
B. Variable Neighborhood Descent Search Algorithm Variable Neighborhood Descent Search (VNDS) is one of Variable Neighborhood Search (VNS). The basic idea is to
978-1-61284-212-7/11/$26.00©2011 IEEE
V.
EXPERIMENTAL RESULT
In this work, we use UKMMC as our case study in order to test our algorithm. We choose five datasets from five different wards, where the number of nurses ranges from 11 to 73 for two weeks scheduling period. We ran our experiments by using laptop with Intel(R) Core(TM) Duo CPU 2.16 GHz 2.17 GHz with 3 GB RAM and windows vista 32-bit operating system. We also use C++ programming language to implementation our code. We ran our algorithm for 10 times and obtained the average result that is presented in table 7. TABLE 7. EXPERMINTAL RESULT OF UKMMC DATASET. No
Dataset name
No. of nurses
Initial penalty
Final penalty
660
20
Average of construction time in Sec 131
985
85
190
1
CICU
11
No. of days 14
2
Sgy5
18
14
3
MD1
19
14
885
105
159
4
N50
50
14
2500
145
407
5
GICU
73
14
3490
183
733
VI.
DISCUSSION
Table 7 shows the efficiency of our algorithm in terms of construction speed and average penalty. In general, for small
181
datasets we can construct the roster in less than 1 minute. The initial penalty weights ranges between 660 and 3490. On the other hand, when we apply variable neighborhood descent search algorithm the final penalty weights were improved (compared to the initial penalty weights). It ranges between 20 and 183, and the minimum penalty weight is 20. This demonstrates that the initial solution is improved by applying variable neighborhoods descent search algorithm.
[6] [7] [8]
VII. CONCLUSION AND FUTURE WORK In this study, we have applied a variable neighborhood descent search to solve real world NRP in University Kebangsaan Malaysia Medical Centre (UKMMC). Generally, our proposed algorithm is divided into two stages, the first stage is generate feasible roster by using our new constructive heuristic algorithm obtained from hybridization of cyclical and non-cyclical (random order) approaches, and applying a repairing mechanism to treat all disturbing shifts. Whilst, in the second stage we apply variable neighborhoods descent search algorithm to improve the quality of the duty roster. Results show that our proposed algorithm is capable of accommodating all the hard constraints and tries to satisfy soft constraints as much as possible. In this study, we have achieved the goal of providing good roster tool that is able to generate good quality roster for our case study. Our future work will try to find other optimization algorithms to further improve the solution quality. ACKNOWLEDGEMENT
The authors wish to thank Ministry of Higher Education (Malaysia) for supporting this work under the Fundamental Research Grant Scheme (FRGS) no. (UKM- TT - 02 – FRGS 0121 – 2009).
[9]
[10] [11] [12] [13] [14]
[15]
[16]
REFERENCES
[1]
[2] [3]
[4]
[5]
M. Hadwan and M. B. Ayob, "An Exploration Study of Nurse Rostering Practice at Hospital Universiti Kebangsaan Malaysia," in 2nd Conference on Data Mining and Optimization, 2009. DMO '09. . vol. 2 Bangi, Selangor Malaysia: IEEE, 2009, pp. 100 - 107. M. J. Brusco and M. J. Showalter, "Constrained Nurse Staffing Analysis," Omega, vol. 21, pp. 175186, 1993. E. K. Burke, P. De Causmaecker, G. V. Berghe, and H. V. Landeghem, "The State of the Art of Nurse Rostering," J. of Scheduling, vol. 7, pp. 441-499, 2004. B. Cheang., H. Li., A. Lim., and B. Rodrigues., "Nurse rostering problems--a bibliographic survey," European Journal of Operational Research, vol. 151, pp. 447-460, 2003. Search Methodologies: Introductory Tutorials in Optimization and Decision Support Techniques: Springer, 2005.
978-1-61284-212-7/11/$26.00©2011 IEEE
[17]
[18]
[19]
[20]
[21]
H. Ahuja and R. Sheppard, "Computerized Nurse Scheduling," Industrial Engeeniering, pp. 24-29, 1975. B. Arnold and M. E. Mills, "implementation of flexible scheduling," Journal of Nursing Administration, vol. 13, pp. 9-14, 1983. J. J. Bartholdi, J. B. Orlin, and H. D. Ratliff, "Cyclic scheduling via integer programming with circular ones," Operations Research, vol. 28, pp. 1074-1085, 1980. R. N. Burns, "Manpower scheduling with variable demands and alternate weekends off," Information and Decision Technologies, vol. 16, pp. 101-111, 1978. M. A. Francis, "Implementing a program of cyclical scheduling of nurse personal," Hospitals pp. 108123, 1966. J. P. Howell, "Cyclical scheduling of nursing personnel," Hospitals, vol. 40, pp. 77-85, 1966. A. Morrish and A. Conner, "Cyclical scheduling " Hospitals, vol. 14, pp. 66-71, 1970. E. S. Rosenbloom and N. F. Goertzen, "Cyclic nurse scheduling," European Journal of Operational Research, vol. 31, pp. 19-23, 1987. C. Maier-Rothe and H. Wolfe., "Cyclical Scheduling and Allocation of Nursing Staff " Socio- Economic Planning Sciences, vol. 7, pp. 471-487, 1973. E. K. Burke, P. Causmaecker, and G. Vanden, "A Hybrid Tabu Search Algorithm for the Nurse Rostering Problem, in Simulated Evolution and Learning," Springer, vol. 1585, pp. 187-194, 1999. K. A. Dowsland, "Nurse scheduling with tabu search and strategic oscillation," European Journal of Operational Research, vol. 106, pp. 393-407, 1998. H. Kawanaka, K.Yamamoto, T. Yoshikawa, T. Shinogi, and S. Tsuruoka, "Genetic algorithm with the constraints for Nurse scheduling problem," in Proceedings of Congress on Evolutionary Computation, Seoul, 2001, pp. 1123-1130. E. K. Burke, P. Causmaecker, S. Petrovic, and G. Vanden, "Variable Neighborhood Search for Nurse Rostering Problems," in Metaheuristics: Computer Decision-Making, M. G. C. Resende and J. P. d. Sousa, Eds.: Kluwer, 2004, pp. 153-172. C. Valouxis and E. Housos, "Hybrid Optimization Techniques for the Workshift and Rest Assignment of Nursing Personnel," Artificial Intelligence in Medicine, vol. 20, pp. 155–175, 2000. E. K. Burke, T. Curtois, G. Post, R. Qu, and B. Veltman, "A Hybrid Heuristic Ordering and Variable Neighbourhood Search for the Nurse Rostering Problem," European Journal of Operational Research, vol. 188, pp. 330-341, 2008. M. Hadwan and M. Ayob, "A constructive shift patterns approach with simulated annealing for
182
[22]
nurse rostering problem," in (ITSim), 2010 International Symposium in Information Technology, Kuala Lumpur, Malaysia, 2010, pp. 16. P. Hansen, N. Mladenovic, and J. A. Pérez, "Variable neighbourhood search: methods and
978-1-61284-212-7/11/$26.00©2011 IEEE
applications," Springer Science, vol. 175, pp. 367407, 2009.
183