algorithm for nurse rostering problems. Information

. Harmony Search Algorithm (HSA) is a relatively new nature-inspired algorithm. It evolves solutions in the problem search space by mimicking the musical improvisation process in seeking agreeable harmony measured by aesthetic standards. The Nurse Rostering Problem (NRP) is a well-known NP-hard scheduling problem that aims at allocating the required workload to the available staff nurses at healthcare organizations to meet the operational requirements and a range of preferences. This work investigates research issues of the parameter settings in HSA and application of HSA to effectively solve complex NRPs. Due to the well-known fact that most NRPs algorithms are highly problem (or even instance) dependent, the performance of our proposed HSA is evaluated on two sets of very different nurse rostering problems. The first set represents a real world dataset obtained from a large hospital in Malaysia. Experimental results show that our proposed HSA produces better quality rosters for all considered instances than a genetic algorithm (implemented herein). The second is a set of well-known benchmark NRPs which are widely used by researchers in the literature. The proposed HSA obtains good results (and new lower bound for a few instances) when compared to the current state of the art of meta-heuristic algorithms in recent literature.


INTRODUCTION
Nurse rostering problems (NRPs) are highly constrained combinatorial problems which are difficult to be solved to optimality [1].Scheduling the nurses at healthcare organizations is a challenging task.Extra care needs to be taken as personnel of healthcare organizations consume about 40% of hospital budgets [2].Bad or inflexible duty roster can affect the personal life of staff nurses, increase job dissatisfaction, and thus result in high staff turnover.These have a direct impact on the nursing services provided to patients [3,2].Based on the literature in NRPs, a lot of big healthcare organizations around the world still construct nurses' duty roster manually [3][4][5].This raises the challenge for researchers to propose and investigate automated solution methodologies to solve this problem.
Various methods have been proposed to solve NRPs, including exact methods, metaheuristics and others [3].Although exact methods (mathematical based models) can obtain optimal solutions, they showed to be highly inflexible in solving large scale optimization problems due to the computational time required.Meta-heuristic approaches which are able to produce solutions of good quality for difficult combinatorial optimization problems within a reasonable computational time are thus usually preferable as the solution methodology [3].Meta-heuristics refer to the approaches that mimic some of the natural and artificial phenomena that combine "rules of thumb" and randomness to solve difficult problems [6,7].Well-known examples of meta-heuristic algorithms include genetic algorithms (GAs), simulated annealing (SA), tabu search (TS), to name a few [7] .During the last few decades, meta-heuristic approaches and their hybrids have been successfully applied to solve NRPs [3].
NRPs have gained the interest of many researchers for more than four decades [3].Several comprehensive surveys [3,8,9] have reviewed a large number of published papers on NRPs.NRPs are well known over-constrained problems [9,10].They are very difficult to solve manually due to their nature of large number of often conflicting objectives that must be taken into consideration while constructing the duty roster, i.e. different types of nurses, different shift types, different coverage demand of shifts each day, popular/unpopular shifts and many more issues [3,11].Many optimization algorithms have been proposed to solve NRPs with different constraints.Some showed to be superior in solving some of the instances but not the others.Various population based and local search based meta-heuristic algorithms developed to solve NRPs include GAs [12,13], TS [14,15], SA [16,17] and many others.In [18], the performance of scatter search algorithm and memetic algorithm (population-based) were better compared to variable neighborhood search and tabu search algorithms (local search-based) when tested against the presented benchmark datasets.This encouraged us to investigate the use of other population-based methods for NRPs.
In this work, we adapt harmony search algorithm (HSA), which was developed by Geem et al [19] to solve combinatorial optimization problems, to solve NRPs.It mimics the analogy of the natural process of musical improvisation that searches for suitable musical notes.The idea is adapted in the search process for solving optimization problems [19].HSA can be categorized as a recent evolutionary algorithm and showed to be efficient in solving difficult optimization problems such as university course timetabling [20], vehicle routing [21], Sudoku Puzzle [22], and many others [23][24][25][26][27].
Compared to the traditional optimization methods, HSA has some features that motivate our investigation to solve NRPs.These include [28]: (i) HSA has few parameters that need to be tuned and thus could be easily adapted to different NPRs or instances.These parameters do not require too much tuning effort to obtain high quality solutions [29].(ii) HSA is a stochastic random search method.(iii) HSA overcomes the drawback of building block theory of GAs by considering all existing solutions, whilst GAs consider only two solutions (parents) in reproduction [29].To our knowledge, there is only limited published work on HSA to solve NRPs [30], where a basic HSA has been evaluated on only the small instances established by the International Nurse Rostering Competition 2010 (INRC2010).How HSA will perform on large or complex NPRs instances has not been investigated.In addition, the parameter values of HSA in [30] were arbitrary chosen.It is well known that the performance of many population based methods is highly dependent on its parameter values [31].Therefore, the aim of this work is to address research issues in applying HSA to NRPs by intensive investigations on suitable parameter values and performance evaluation on a large number of instances of problems with different size and complexity.
In order to reduce the gap between practical problems and academic theories, a real world dataset obtained from a large hospital in Malaysia (UKMMC) is used to assess the performance of the proposed HSA.The performance of HSA is also evaluated on the nurse rostering benchmark problems (www.cs.nott.ac.uk/~tec/NRP/) [32].Computational results on both problems demonstrate the efficiency and effectiveness of the proposed HSA in producing high quality solutions in a shorter time compared to a basic genetic algorithm for the UKMMC problem, and obtaining good results compared to some existing meta-heuristic algorithms for the same benchmark NRPs.For more resources and application areas of HSA, please refer to [33,34].
The rest of the paper is organized as follows.Section 2 presents the problem description.The proposed harmony search algorithm is presented in Section 3. Section 4 presents the computational results and analysis.Finally, concluding remarks are presented in Section 5.

PROBLEM DESCRIPTION
NRPs can be defined as allocating the workload to the available staff nurses at healthcare organizations to meet the operational requirements [3].More precisely, given a set of nurses of specific categories, a set of pre-defined periods (shifts) on a working day, and a set of working days; the aim is to assign each nurse to specific planning periods satisfying some constrains (known as hard and soft constraints).Hard constraints are mandatory whereas soft constraints can be violated if necessary [3,9].The quality of the generated roster can therefore be assessed based on how many soft constraints have been satisfied.Due to the variety in hard and soft constraints, which are different from one organization to another, the modeling and implementation process present to be challenging tasks, as a unique general mathematical model to accommodate all related constraints does not exist [35] [1,3,9].As a result, different instances require different implementations and configurations in designing the algorithms.There are, however, a group of problems represented with a common XML structure but associated with different constraints and objectives [26].Some effort has also been made in the literature to construct relatively general frameworks [31,32].Therefore, in this work we have attempted to solve real world and benchmark NRPs because we believe that HSA can be applied to solve a wide range of NRPs.The descriptions of the two problems concerned are provided as follows.

The UKMMC Nurse Rostering Problem
To bridge the gap between academic research and real world practice, this work considers eight different rostering problem scenarios faced by UKMMC, see Table 6 in Section 4.1.UKMMC is a Malaysian public hospital with more than 1400 nurses working around the clock [36].In this section, the list of hard and soft constraints, the evaluation function and constraint weightings are discussed.For more details about the problem at UKMMC, we refer readers to our previous work in [16,36].

(i) Hard Constraints
For the UKMMC NRP, we have identified the following hard constraints: (HC1) The coverage demand for each shift type must be fulfilled.Under staffing is not allowed.(HC2) All nurses work at most one shift per day.(HC3) One senior nurse must be allocated for every shift type.(HC4) An isolated working day is prohibited.That is a working day with a day off before and after the day is not allowed.
(HC5) Within each 14 days, the maximum working days are 12 days whilst the minimum are 10 days.(HC6) Each nurse works no more than 4 consecutive working days.(HC7) Night shift must be in the form of 4 consecutive night shifts followed by two days off.

(ii) Soft Constraints
Soft constraints reflect the general preferences of staff nurses and hospital's requirements at UKMMC.The quality of the constructed duty roster is dependent on how far we can satisfy those soft constraints.The weights (importance) of soft constraints in the UKMMC NRP are described in Table 1.For the UKMMC dataset we have four desirable patterns (DPs).These patterns are the patterns that are not violating any of the hard constraints or soft constraints.The more the DPs are given to the nurses the more the nurses' preferences will be satisfied.These desirable patterns are MMMMo, EEEEo, NNNNooo and NNNNooE.

(iii) The Objective Function and Constraint Weightings
Mostly, the main goal of solving NRPs is to efficiently utilize the available staff nurses by producing a well-balanced duty roster that also satisfies nurses' preferences (in general) [37].
The objective function of this work is to minimize the total penalty of soft constraint violations while making sure all hard constraints are satisfied.Each soft constraint is associated with a weight that represents its importance.Constraints with higher weights are more important to be satisfied, thus cause higher penalty if violated.One of the issues regarding setting the weights of constraints in NRPs is that, there are no standard weights to be given for each soft constraint.This is due to the wide range of constraints that are different from one hospital to another.Therefore, like in [12,38], we have assigned weights for our soft constraints based on the consultation with the head nurses in different wards at UKMMC.Table 1 presents the weight of each soft constraint.

Benchmark NRP Problems
The second set of NRPs are taken from the NRP benchmark web site [32] to validate our results against the existing literature.Since there are too many NRP datasets from different universities and different hospitals around the world, testing all these datasets become a tedious and difficult task.The reasons behind choosing the datasets in this paper are as follows: (i) in the literature these datasets have been widely studied using other metaheuristic algorithms, (ii) the best known results are publicly available, and (iii) the various difficulties of these benchmark datasets with different number of nurses, days and shift types, etc., provide an excellent test bed for evaluating algorithm performance.
Each problem of the selected dataset can be seen as a new and different optimization problem rather than different instances with different size, see Table 13 in Section 4.2.This is mainly because each problem is derived from a different organization, with different constraints, rules and requirements.The common feature between these problems is that some constraints appear in most of the problems.Due to the variety of problem constraints, standard mathematical model for all instances does not exist [3].Therefore, the problem description, mathematical formation and the objective function of the considered problems are taken from [39] and the implementation was based on the framework introduced in [40].Please note that in the literature, no work has tested all problems at [32].Most of the algorithms are evaluated on a single or several problems at the web site.

THE HARMONY SEARCH ALGORITHM FOR NRPS
HSA is one of the population-based meta-heuristic algorithms, inspired by musical improvisation [41].In music performance, each musician plays one musical note at a time.
Those musical notes are combined together to form a harmony, measured by aesthetic standards.In optimization, each variable during the optimization process is assigned a value at a time; those values all together form a solution for the considered problem, evaluated by the objective function [33].
Similar to a group of musicians developing their harmonies iteratively, HSA improves solutions iteratively based on good candidate solutions from the initial population, i.e. the harmony memory [19].It carries out a stochastic random search on the solution, i.e. a vector of decision variables, via a number of improvisations.The harmony memory is updated between improvisations.At each improvisation, stored values of decision variables in the harmony memory are adapted according to a considering rate.Variable values in the solution are adjusted according to a pitch adjusting rate.HSA does not require any starting values of the decision variables nor does it require complex derivatives to adjust the variable values for the new generated solutions [29].Motivated by these features, this work adapts HSA for NRPs.The procedure of HSA has the following five main steps: Step 1: Initialize the parameters of HSA.
Step 5: Repeat steps 3 and 4 until reaching the stopping criteria.
Each of these mentioned steps in our proposed HSA will be discussed in details in the following subsections.

Initialize the Parameters of HSA
In step 1, HSA parameters are initialized as follows: 1. Harmony memory size (HMS) is the number of solutions that are stored in the HM.HMS is similar to the population size in genetic algorithms.
2. Harmony Memory Considering Rate (HMCR) is used during the improvisation process to decide whether the variables of the solution should take the value of any one in HM.HMCR takes a value in the range [0, 1].It is similar to the crossover rate in genetic algorithms.For example, if HMCR is 0.9 it means that the probability of choosing the value of the variable from HM is 90%; whilst the probability of choosing a value randomly from the domain of the variable is 10%, i.e. (1 -HMCR).In our case, the domain of the variable refers to all the possible shift patterns that HSA can choose from.Selecting a random value for the variable at probability of (1 -HMCR) is similar to the mutation operator in genetic algorithms.In this work, we investigate the suitable values for HSA parameters including HMS, HMCR, PAR and NI.

Build the Harmony Memory (HM)
In Step 2, a set of initial solutions of size HMS are generated to construct the HM.HM is represented by a matrix of two dimensions.Rows compromise a set of solutions x i (duty rosters), whilst columns compromise the variables of each solution (nurses).Each solution x i can be seen as a one dimensional array.The size of the array is the maximum number of nurses in the considered problem instance.For highly constrained NP-hard problems the solution space is very huge and the possible solutions vary significantly [42].One way to deal with this huge solution search space is to divide and conquer, i.e. decompose the problem into sub-problems and treat each part separately and then combine these parts in the final stage [37,43,44].In this work, the initial solutions for the UKMMC instances are generated by decomposing the problem into sub-problems [29][34].These sub-problems are generated and solved by the following steps: I. Generate all valid 2-day and 3-day shift patterns for all shift types (morning (M), evening (E), night (N) and day off (o)).See Tables 2 and 3 for all valid 2-day and 3-day shift patterns, respectively.This combination is based on the restriction list of one-week time or fewer numbers of days that affect one nurse only (see Figure 1).Table 4 shows some examples of one-week valid shift patterns after we combined two 2-day and 3-day shift patterns.Table 5 shows the possible one-week patterns.In the literature, shift patterns have been used to effectively construct rosters in highly constrained nurse scheduling problems [32,38,43].As for the benchmark instances, the set of initial solutions in HM is created by using a neighborhood operator which incrementally adds new shifts to the roster until all nurses have been scheduled [31] [32].

Improvise New Solutions
The diversification and intensification of the search in HSA are maintained in this step.
Parameters HMCR and PAR are the main factors in intensifying or diversifying the search for globally and locally improved solutions [45].In this step, new solutions (complete rosters) are constructed stochastically using one of the following three operators: (i) memory consideration (based on the HMCR) (ii) random consideration (based on 1-HMCR) and (iii) pitch adjustment (based on the PAR).
HMCR is the probability which decides whether to choose the shift pattern p i of the solution vector x i randomly from the HM, or from the shift patterns pool.The search with higher HMCR is guided more by HM, where the history and experience of the search process are stored.It thus helps to speed up the convergence by reducing the level of diversification and randomness in the search.Whereas, lower value of HMCR increases the diversification which, in turn, may cause a slow convergence due to the search jumps around potential candidate solutions.
If the new shift pattern of the solution x i new is selected from the HM, then the solution may be adjusted based on the PAR.The diversification is mainly controlled by the two parameters PAR and bandwidth.Higher values of these parameters lead the search to explore different areas in the solution space.Therefore, this will slow down the convergence of the algorithm.In contrast, lower values of the PAR and the bandwidth help in decreasing the degree of diversification.However, this may limit the exploration and lead to premature convergence where HSA is easily trapped into the local optima [23] [36].
The improvisation step in HSA is similar to reproduction in GAs that uses crossover and mutation operators [46].In HSA, however, the improvisation utilizes the full HM to construct the solution, while in GA new chromosomes are generated by crossover of two parents or Harmony memory size mutation.Operators in GA need to be carefully designed especially in highly constrained problems to avoid destroying building blocks of optimal solutions [34].Figure 5 presents the pseudo code of the improvisation process.Figure 6 shows an illustrative example of improvising the new solution.
Step In the example in Figure 6, two shift patterns 2 and 415 are firstly allocated to Nurse 1 in x new from the HM based on HMCR (see Figure 4).The bandwidth {5,-5} is applied which changes the index of the shift pattern in the first week from shift pattern 2 to 7. The resulting

Update the Harmony Memory
The solutions in HM are sorted in an ascending order based on their objective function values.If the new solution x i new is better than the worst one in HM, it will replace the worst solution in HM.Otherwise, x i new is discarded.

Check the Stopping Criteria
The evolution of solution improvisation and HM update (i.e.steps 3 and 4) is carried out until reaching the stopping condition.Normally the stopping criterion is a certain number of improvisations [19].In this work we have employed three stopping criteria.These are: (1) reaching the maximum number of improvisations, (2) no improvement happened after a certain number of improvisations, and (3) a solution with objective function value 0 (no soft constraint violations) is obtained.

COMPUTATIONAL EXPERIMENTS AND RESULTS
In this work, we have tested HSA over a real world problem and a set of benchmark problems in NRPs.The UKMMC dataset is collected from a large hospital in Malaysia.The benchmark dataset [32] is widely used by the scientific literature [31][32].Because there is no method tested on the UKMMC dataset, we conducted an empirical study of the impact of HSA parameters when solving the eight real world instances in UKMMC.We have also implemented a standard genetic algorithm to compare it with the HSA on the UKMMC dataset.The experiments were carried out on a Windows Vista 32-bit laptop with Intel 1.73 GHz and 2-GB RAM.

HSA for solving the UKMMC dataset
Finding proper balance between diversification and intensification is one of the important issues in devising meta-heuristic algorithms [29].A series of experiments were conducted to study the behavior of HSA with different parameter values for HMS, HMCR, PAR and NI to strike a balance between diversification and intensification of the HSA search.We have used the eight instances in the UKMMC dataset shown in Table 6 to test the proposed HSA and GA.

Harmony Memory Size (HMS)
We first examine the impact of HMS by a set of experiments.Four instances from the UKMMC dataset with different problem size have been chosen for these experiments.The two small instances (CICU and MD1) include 11 and 19 nurses, respectively.The medium instance (NICU) has 49 nurses and the large instance (ICU) includes 79 nurses.In this experiment test, we use the following parameter values: HMCR = 0.89, PAR = 0.2, bandwidth = (-5 or 5) and the number of improvisations NI=100.Table 7 presents the experimental results (average out of 30 runs) of HSA using different HMS parameter values.Figure 7 presents the plots of these results.Based on the experimental results in Table 7 and Figure 7, HMS = 80 shows to be the most suitable parameter value compared to other HMS values.Results also indicate that the bigger the HMS, the better is the chance to start the improving process of the candidate solutions with lower objective function values.This might be due to a larger number of solutions in HM provide more good shift patterns, which are more likely to be combined into good new solutions.However, larger values of HMS do not contribute to better results.This may be due to that during the evolution, information of high quality shift patterns have been stored and updated in HM.More patterns may contain redundant information, thus do not necessarily contribute to a better performance.Therefore, HMS = 80 is chosen for all tested instances.Note that when HMS = 1, HSA behaves as a local search based method, where HMCR does not play a role and PAR assists a local search with the bandwidth.

HMCR and PAR
In the literature, the recommended values range from 0.79 to 0.99 for HMCR and 0.1 to 0.3 for PAR [41,47].In this work, we examine several HMCR and PAR values as shown in Table 8 and Figure 8.We fix the number of improvisations NI to100 iterations.From Table 8, we found that best results were obtained when HMCR = 0.95 and PAR = 0.2.These are also the recommended parameter values in the literature [33][35] [37].For the bandwidth, we set the range (5, -5) as it changes the indexes of the shift patterns only.Based on the results, we set the HMCR as 0.95 and PAR as 0.2 for all tested instances (with regard to this dataset).

Number of Improvisations NI
In order to determine the suitable parameter value for the number of improvisations NI (i.e.number of iterations), we have studied the status of the candidate solutions in the HM during the run (see Table 9).These experiments help us to observe the behavior of the HM and to decide the suitable maximum number of NI. Figure 9 plots the results presented in Table 9.
It is noticed that a significant decrease takes place to the objective function values during the first 25000 iterations.Within 25000 and 50000 iterations, the amount of change becomes very small.After 45000 iterations there is no improvement at all in all instances.All that leads us to choose the number of iterations to be NI = 50000.

Comparison between GA and HSA
GA is a population based meta-heuristic algorithm [48] that mimics the process of natural evolution.Due to its many similar characteristics to HSA, GAs quite often has been compared with HSA [33].It works by managing a population of individuals which evolves by using three genetic operators: (i) selection, (ii) crossover, and (iii) mutation.
In this work, we have implemented the stochastic ranking based GA for NRPs proposed in [49] using the same parameter settings as follows: the number of individuals = 1000, crossover rate = 0.75 and mutation rate = 0.02.For the selection, we used tournament selection with stochastic ranking (tournament size = 7) and elitism.For the crossover operator, we used a single point crossover as in [49] and [50].The mutation operator is carried out by randomly changing one shift pattern for one nurse selected randomly.For each instance, we ran the basic GA for 20 times.To assure a fair comparison between GA and HSA, the stopping criteria for GA is similar to HSA as follows: 1) If the maximum number of function evaluations reach 50000 (80 individual * 625 generations, which is equal to NI in HSA, 2) If the value of objective function reaches 0, or 3) If no improvement occurs within 10000 generations (improvisations in HSA).Table 10 shows the best, the average, the worst, the median, the standard deviation of the objective function values in addition to the number of generated desirable patterns and the execution time.The comparison between the HSA and the basic GA in Table 10 shows that HSA outperformed GA on all tested instances of UKMMC.Due to the fact that NRPs are highly constrained problems, basic GA might struggle in getting good quality solution without using specialized operators (i.e.specialized repair mechanism and crossover operators).This is noticed by many researchers [51,52].This fact is experimentally supported in Table 10 where the basic GA fails to obtain good quality results for most of the tested instances.This is partially due to the drawbacks of the basic GA which relies on two parents only to produce the new offspring [34].
To investigate the performance differences between HSA and GA, a Wilcoxon test is carried out with 95% confidence level.A p-value less than 0.05 means there is a significant difference between these methods.The p-value of HSA versus GA is reported in Table 11, where HSA is statistically significant to GA on 6 out of 8 instances (i.e.p-value less than 0.05).The results also support the fact that the HSA outperformed GA on the majority of problem instances.

HSA for the benchmark NRPs dataset
In this section, the HSA is tested on the widely used benchmark instances in NRPs.These instances, together with their problem description and formulation are taken from (www.cs.nott.ac.uk/~tec/NRP/) [32].Table 12 shows the characteristics of the tested instances.To find out whether the performance of HSA is statistically different from existing metaheuristic algorithms (M1, M2, M3 and M4), we have performed a multiple comparison statistical test as follows: the Friedman and Iman-Davemport tests with a critical level of 0.05 are conducted to detect whether there are statistical differences between the results of these methods [55].The p-value of Friedman (p-value =0.000) and Iman-Davemport (p-value =0.000) are less than the critical level 0.05, indicating that a significant difference between the compared methods.Therefore, a post-hoc statistical test is used to detect the correct difference between the methods.Table 16 shows the average ranking (the smaller the better) produced by the Friedman test for each method.As can be seen, M3 ranked the first, followed by M2, HSA, M1 and M4.Table 17 summarizes the p-value of the Holm and Hochberg statistical tests [55] where M3 is the controlling algorithm.As can be seen, M3 is statistically better than M1, M4 and HSA (i.e., p-value less than 0.05) but does not outperform M2.The results also demonstrate that HSA results are different from M1 and M4.Overall, our results demonstrate that HSA produced good results compared to some existing methods.This may be due to the characteristic of HSA in striking a well-balanced diversification and intensification for highly complex problems.

CONCLUSIONS
This paper has investigated the harmony search algorithm for solving the nurse rostering problem.The proposed harmony search algorithm evolves upon the harmony memory which stores adaptively updated solutions during the evolution.The proposed algorithm has been evaluated on eight instances collected form a real world hospital UKMMC and 15 problem instances from a widely used nurse rostering problem benchmark in the literature.For the

Figure 1 .
Figure 1.Combine three shift patterns to form a one-week shift pattern Figures3 and 4present illustration examples of the construction of solution vectors and HM, respectively.Assume that there are 503 shift patterns.M, E, N and O represent morning shift, evening shift, night shift and day off, respectively.In Figure3, two shift patterns 2 and 415 are randomly selected from the shift patterns pool and the schedule (2,415) is used for the first and second week time slots, respectively, of Nurse 1 in the new solution.This process is repeated for all nurses, as shown in Figure4.HSA then calculates the penalty value for each solution vector and add them to the HM.

Figure 3 Figure 4
Figure 3 Example of constructing the solution vectors

3 Figure 5 Figure 6
Figure 6 Example of improvisation process in HSA

Figure 7
Figure 7 Comparison of different HMS parameter values on the UKMMC dataset

Figure 8
Figure 8 Results of using HSA with different parameter values of HMCR and PAR on UKMMC dataset

3 HMCR=Figure 9
Figure 9 Status of candidate solutions in HM during the run using HSA

Table 1
The weights of soft constraints 3. Pitch Adjusting Rate (PAR) is also used during the improvisation process to decide whether the variable of the solution should be changed to a neighbor value.PAR takes a value in the range [0, 1].The amount of change is determined by the bandwidth to move the solution from one neighbor to another.The value of the bandwidth is randomly chosen from its domain, and used to change one shift pattern for a nurse.For example, if PAR is 0.3 it means that the probability of changing the variable value is 30%; whilst 70%, i.e. (1 -PAR), is the probability of keeping the variable without any change.PAR is similar to a local search algorithm which accepts only improving solutions.4. The maximum number of improvisations (NI) in the search represents the number of iterations in HSA.

Table 2
All of 2-day valid shift patterns

Table 3
All of 3-day valid shift patterns Combine the generated 2-day and 3-day shift patterns to form one-week valid patterns.

Table 4
Example of one-week valid shift patterns

Table 5
The possible one-week valid patterns ,415) means the first week is assigned shift pattern 7 and the second week assigned shift pattern 415.For Nurse 2, two shift patterns (312,115) are selected from the HM without adjusting.Next Nurse 3 is randomly assigned two shift patterns from the shift patterns pool based on (1 -HMCR).This process is repeated until a complete solution is constructed.

Table 6
The instances of the UKMMC dataset

Table 7
Results of HSA with different parameter values of HMS

Table 8
Results of using HSA with different parameter values of HMCR and PAR

Table 9
Objective function values of candidate solutions in HM using HSA during the run

Table 10
Comparison results: HSA and GA on UKMMC dataset

Table 11 The
P-value of HSA versus GA

Table 12
The characteristics of the tested instances

Table 16
The average ranks of Friedman test

Table 17
The p-value of Holm and Hochberg tests for the compared methods