Optimization of Nurse Scheduling Problem using Genetic Algorithm: A Case Study

Nurse scheduling problem is an essential problem in hospital, especially in emergency department. Emergency department is very busy unit in hospital because it receives patients in emergency situation, therefore nurses in this department are obliged to be ready for 24 hours. Working hours allocation of nurses in this department is not equally, so nurse’s preferences cannot be fulfilled yet. In this study, genetic algorithms are used to minimize unfulfilled preferences of nurse that called violations. Genetic algorithm represents solution candidate using random chromosomes. The selection used is elitist, the crossover used is one point cut crossover, and mutation used is reciprocal exchange mutation. Based on experiment, the optimal parameters are obtained, size of population is 80, mutation rate is 0.01, and iteration is 10000. Result is schedule of nurses for 30 days in emergency department that generated 74 violations.


Introduction
Scheduling the right nursing staff will improve the performance and quality of the nursing unit. Proper scheduling will help recruitment, nurse preferences, and maintain an overtime budget for a logical nurse. The most important thing in scheduling is increasing the nurse's spirit and ensuring patient safety [1]. Scheduling of nurse or commonly referred to as Nurse Scheduling Problems (NSP) are challenging because the number of nurses is relatively limited compared to the number of patients in the hospital, so the scheduling of nurses is required to get a schedule with a fair workload for each nurse and fulfill existing scheduling restrictions. Fulfillment of all scheduling restrictions is very often hampered when a limit is met, but other limitations are violated [2].NSP is an important part of resource management in the emergency room. Good scheduling can contribute to increase the nurse welfare and distribute workload evenly [3]. NSP can be solved by using many method, one of them is using genetic algorithm (GA). Based on previous research, GA is an effective and optimal method in solving nurse scheduling problems. The results obtained from this study is an optimal schedule that is the schedule does not violate the rules that have been determined and the achievement of the objectives of the research conducted [2,[4][5][6].Not only used to solve nurse scheduling problems, GA is also used to solve other scheduling problems. Scheduling using GA produces a more optimal schedule compared to previous schedule [7][8][9][10].
The case study in this paper is a regional hospital located in Banda Aceh. Currently the nurse scheduling for 54 nurses in hospital is still done manually. The number of working hours for each nurse is not evenly distributed because the working hours depend on the number of working hours the group has determined.Based on these problems, it is necessary to do research about scheduling at hospital with a genetic algorithm (GA) to provide optimal scheduling solutions.

Research Methodology
In the research conducted there are several steps in the steps that will be explained below. 1. Design of GA algorithm: GA algorithm is designed using MATLAB 2013a programming language by initializing the number of nurse data and algorithm GA parameters such as population size, crossover rate (Cr), mutation rate(Mr), and the number of iterations. 2. Verification of the GA Algorithm: GA algorithm is verified if the solution obtained changes when the parameter combination also changes. If the solution obtained does not change and the combination of parameters changes, it is necessary to revise the GA design that has been made. 3. Numerical example: A numerical example is done manually on the GA algorithm using hypothetical data to see GA steps. 4. Experiment and Computing Results: The experimental results are carried out by running the program 10 times and calculating the standard deviation to see the performance of the GA algorithm and see the computation time. 5. Sensitivity Analysis: The sensitivity analysis test is carried out to see how much influence the GA parameter has on the solution obtained.

Design of GA
Steps for GA design are following: 1. Perform data input: number of nurse nurses, shifts, days and names of nurses.
2. Determine the parameters used: population size, Cr, Mr, and the number of iterations. 3. Initialize the population. 4. Evaluate the penalty value. Penalties are violations committed. 5. Conduct a selection process to find candidates for parents. The selection process is carried out using the elitist method. 6. Perform crossover. Crossover is done using the one cut point crossover method. 7. Perform a mutation process. Mutations are done using the reciprocal exchange mutation method. 8. Conduct evaluation. Evaluate the penalty values of chromosomes resulting from crossover and mutation processes. 9. Make a selection. The selection process is carried out using the elitist method. 10. Perform population changes. 11. Termination of Iteration. 12. Get a solution.

GA Verification
GA verification is done to see the suitability of the program model with the desired model. If the program is run by changing the parameter combination and producing different outputs, it shows that the program has been verified. The verification phase is done by changing the parameter combination. Table 1 shows the parameter scenario. From the table, it can be seen that there is a change from the smallest total violation if the different parameter combinations. So that it can be said that the program has been verified.

Numerical Examples
Numerical examples are done by manual calculation using hypothetical data. The population size used is 5 individuals with crossover rate (Cr) 1 and mutation rate (Mr) 0.01. Iteration is done 1 time. The following are the steps taken.

Population Initialization
Chromosome representation is depicted in table 2.

Calculation of penalty and parent selection
Penalty is the value of a violation that is not in accordance with the rules. 10 rules or nurse scheduling criteria can be seen in table3. The violation value is calculated based on the violations that occur on each chromosome. Following are the results of the recapitulation of the penalty results from the 5 initial population chromosomes shown in table 4.  One nurse in one shift and one working day.

P2
Each nurse was not assigned more than two consecutive morning shifts.

P3
Each nurse is not assigned more than two consecutive afternoon shifts.

P4
Each nurse is not assigned more than two consecutive night shifts.

P5
Every nurse is not closed for more than two consecutive days.

P6
Every nurse on the night shift is in accordance with a predetermined portion.

P7
After having two consecutive night shifts, each nurse must be closed.

P8
Nurses are not assigned on the night shift on day i then continue the morning shift or afternoon shift the following day. P9 Each nurse gets the same number of shifts.

P10
Every nurse gets a minimum of one time off on weekends in one month. From five individuals, it can be seen that individu 1 and individu 2 are the best chromosomes because they have the smallest violations. Whereas individu 4 and individu 5 are chromosomes that have the most violations. Then chromosome 1 and chromosome 2 were chosen to be parent.

Crossover(C) and Mutation(M)
The crossing process is done by selecting two individuals to cross. The method used is a cut point crossover. The cut point of the crossover cut point is point 18. The mutation process is done by the reciprocal exchange mutation method, which is by selecting two positions in a particular gene randomly and then exchanging it. In this mutation, chromosome 1 is chosen as the parent, with the exchange point that is point 3 and point 15. The number of chromosomes that can make a mutation is 1 because the number of population X Mr = 5 X 0.01 = 0.05~1.

Penalty
Penalty calculation evaluation is done to assess the chromosomes resulting from the crossover process and the mutation process. Number violations of each chromosome show in table 5.

Selection
The method used is elitist. The elitist selection process is carried out by filtering all individu from the GA process to form a new generation. Individu chosen are individu with the least number of violations, shown in Table 6.