Nurse Rostering Problem Using Cuckoo Search

Nurse rostering problem is to construct a nurse roster for a given period, which is NP-hard. In this paper, we apply cuckoo search algorithm to the problem and adjust the parameters of the algorithm through experiments. We show that the proposed algorithm performed well under many circumstances by comparison between our algorithm and other approximation algorithms. Introduction In organizations providing round-the-clock services such as hospitals, workers are assigned to a set of shifts in a roster which is announced in advance and should satisfy government regulations and contracts clauses. The problem of creating the roster in a hospital is called nurse rostering problem. The goal of the problem is simple: given the number of nurses and the period that they should work, create schedules for nurses. It is one of the most popular NP-hard problems which may not have a polynomial algorithm so that the time to find a solution grows exponentially with problem size. Because of its complexity, many approximation algorithms were applied [1,2,3,4]. A bibliographical survey of the problem can be found in [5]. Because of the page limit, we briefly present the problem and its conditions in the following section. To find a feasible solution, we applied cuckoo search algorithm which was introduced by Yang and Deb [7]. It is a nature-inspired optimization algorithm which is briefly described in Section 3. To justify its applicability to the problem, we compared its performance with simulated annealing algorithm in Section 4. Nurse Rostering Problem The goal of the nurse rostering problem is that for the given number of nurses and the period that they should work, schedules for the nurses need to be made. However, it is not that simple to solve this problem because there are several conditions to consider. For example, there should be several days-off in a week or limitation of working hours. There are various conditions that can be applied by the hospital and must be satisfied by laws or the terms of contracts. These are called hard constraints. On the other hand, there are others that do not need to be observed. These are called soft constraints. The environment that is usually addressed in nurse rostering problem is three shifts 24 hours a day such as in a large hospital. Sometimes nurses may want to work at certain shifts on certain days because of personal reasons. These needs should be met as well as possible. Although there can be various constraints, we will consider three constraints that are commonly applied in real life. The constraints are as follows. a. The number of nurses for each shift of a day is specified by the upper and lower limits. b. There are restrictions on the pattern of shifts of a nurse. Morning shift or evening shift after night shift, morning shift after evening shift and three consecutive night shifts should be avoided. c. The number of morning, evening, and night shifts and days-off of each nurse should be fixed. The constraint (a) means the required number of nurses to provide adequate medical care. we set 4-6 nurses for the morning shift, 3-5 nurses for the evening, 1-3 nurses for the night. Constraint (b) must also be met because nurses must have enough rest after work. Therefore, constraints (a) and (b) 149 are hard constraints. In the case of constraint (c), nurses are basically on two morning shifts, two evening, two days-off and one night shift in a week. These numbers increase as the period gets longer. For example, the numbers are doubled for two weeks. The final one, (c), is considered as a soft constraint in this study. When the numbers of violations of constraint (a), (b) and (c) are f1, f2, and f3, respectively, the cost of a roster, C, is: C = f1 · w1 + f2 · w2 + f3 · w3 (1) The weight implies the importance of each constraint. Since the constraints (a) and (b) are hard constraints, w1 and w2 are set to 5, and the constraint (c) is soft constraint so that w3 to 1. Our goal is to find a nurse schedule that minimizes the cost function C. The schedule that N nurses can work for D days is a matrix of size N×D. There are four possible values that the element of the matrix can have: morning(m), evening(e), night(n) and a day-off(o). The number of possible schedules is 4 (N×D) and the size of search space increases exponentially as N and D grow. Therefore, it is very inefficient to create all possible schedules, calculate the cost of them, and find the schedule with the minimum cost. To solve this problem, we use cuckoo search algorithm, which is an approximation algorithm. Cuckoo Search Algorithm Cuckoo search (CS) is one of nature-inspired heuristic algorithms which was developed by Yang and Deb [7]. It is derived from cuckoo’s habit of laying eggs in other bird’s nest and letting host birds grow eggs. It can be described by three rules: 1. A cuckoo lays one egg at a time, and a nest to lay an egg is randomly selected. 2. Nests with high quality eggs remain in the next generation. 3. The number of nests is fixed and the host can find cuckoo eggs with a probability Pa ∈ [0, 1]. In this case, the host throws away the eggs or leaves the nest and builds a new nest. In the algorithm, a cuckoo randomly chooses one nest for every generation and lays an egg. The next host is selected by Lévy flight. Lévy flight is a type of random walk that normally searches around an existing area but has a low probability of jumping largely to distant areas. Several studies have shown that it is similar to the hunting and flight paths of many animals and insects [6]. The nests with cuckoos’ eggs of high quality remain for the next generation. The eggs are solutions. This means that a better solution than an existing one will replace the worse and be carried over to the next generation. In addition, the host discovers cuckoo’s egg with a certain probability, which is the process of replacing bad solutions with new ones. The interested readers may refer to others for the detailed description of the algorithm [7,8]. The algorithm using Lévy flight is shown in Algorithm. 1.