1. Introduction
The problem of staff scheduling has been studied extensively over the past several decades [
1]. It has been recognized as an important problem in academic and industrial fields. In today’s fast-paced business environment, corporations have attempted to achieve two goals to gain a competitive advantage: improving customer satisfaction and reducing costs. Staff scheduling problem requires achieving both these goals. Personnel scheduling is especially complex when we consider both shift scheduling and day-off scheduling for organizations that operate seven days a week (e.g., airlines, hotels, call centers, and hospitals). Furthermore, when demand fluctuates over small intervals compared to the shift length, a generic allocation model becomes less useful for personnel scheduling, and an advanced model for allocation that includes overlapping shifts is needed. Thus, most personnel scheduling problems are non-deterministic polynomial-time-hard (NP-hard) problems for which various solution methods including mathematical models and heuristic approaches have been proposed.
Nurse rostering problems (NRPs) have been proven to be NP-hard; they are composed of many soft constraints that result in additional penalties when violated, along with a few hard constraints [
2,
3,
4]. Ernst et al. [
5] conducted a comprehensive review of the main research direction and solving method for such problems for facilitating companies that attempt to distribute their operations in ways that are cost effective, observant of industrial regulations, and attentive to individuals’ work preferences. Cheang et al. [
6] conducted a review of the literature on modeling and solution methodologies for NRPs that highlighted the specificity of the solution approaches and availability of benchmark problems for the various basic models of NRPs. Van den Bergh et al. [
1] reviewed the literature on staff scheduling problems and identified various perspectives from which the existing literature could be classified and published work in the relevant fields of interest could be traced. They also identified trends and areas for future research. Ernst et al. [
7] reviewed the rostering problem in specific application areas, as well as models and algorithms that have been reported in the literature for the solution to this problem; they also surveyed commonly used methods for solving the rostering problem. Burke et al. [
8] described and critically evaluated solution approaches that span the interdisciplinary spectrum, from operation research techniques to artificial intelligence methods, and surveyed the strengths and weaknesses of the literature in outlining the key issues that must be addressed in future nurse rostering research.
Over the years, researchers have used various techniques to implement solutions for NRPs, including exact methods, metaheuristic approaches, and others. Exact methods have been used successfully to find complete solutions [
9,
10]. Unfortunately, such deterministic solutions require a great deal of computational time and resources to handle the many constraints involved. Thus, this approach is somewhat limited. Metaheuristic approaches that produce relatively good solutions within reasonable computational time frames are well known to be effective methods.
Examples of the use of metaheuristics to solve NRPs include application of genetic algorithms [
11,
12,
13], simulated annealing [
14], tabu search [
15], and ant colony optimization [
16].
In contrast to applications of a single metaheuristic, methods that combine two and more metaheuristics have also been introduced. Bai et al. [
17] proposed an approach that combined a genetic algorithm and simulated annealing. In their study, simulated annealing was used as the local search method within a genetic algorithm procedure. Burke et al. [
18] hybridized a steepest-descent improvement with a genetic algorithm and demonstrated that this hybridization was an adequate approach for solving NRPs. Awadallah et al. [
19] proposed a hybridized approach for the application of the hill climbing optimization method to an artificial bee colony. In this approach, the process of the employed bee operator is replaced by that of the hill-climbing optimizer. The performance of the proposed method was evaluated by comparing with other hybridization approaches published in the literature.
Most previous studies on this subject have focused on solving NRPs by combining population-based metaheuristics (P-metas) for global search and either single-solution-based metaheuristics (S-metas) or local optimizers for local search [
20,
21,
22]. Based on the advantage of the hybrid methods proposed in the literature [
23,
24], we propose a hybrid approach that involves the use of harmony search (HS) and artificial immune systems (AIS), both of which are well-known P-metas.
The advantages of a hybrid approach involving HS and AIS in solving optimization problems include the fact that HS is an emerging algorithm for swarm intelligence optimization and heuristic global search algorithms. This approach generates a new individual via cooperation among individuals, and its local searching ability is enhanced by fine-tuning the mechanism employed in HS. Although the use of HS may be suitable because it is simple, robust, and converges rapidly, it only updates when the solution generated is not better than the worst solution in the existing harmony memory (HM) pool during the current iteration.
AISs are universal optimal algorithms that impose few constraint conditions in an optimization problem. The use of AIS has yielded significant progress in many fields, such as function optimization, machine learning, pattern recognition, image disposal, and combinatorial optimization. However, AIS also has some shortcomings such as low convergence speed and prematurity. Recent studies have shown that the combination of AIS and other searching algorithms, especially random searching algorithms, can greatly improve the performance of AIS [
25,
26].
To the best of our knowledge, little research has been conducted on the application of AIS to the solution of NRPs, and few studies have mentioned the application of HS [
27,
28,
29]. Awadallah et al. [
27] evaluated only specific instances defined in the 2010 International Nurse Rostering Competition. Their study did not investigate how HS would perform for large or complex NRP instances. To overcome this limitation, Hadwan et al. [
28] used a real dataset from a large hospital in Malaysia to assess the performance of HS and evaluated nurse rostering benchmark problems using their advanced nurse rostering model (ANROM) [
30].
We compared the results of previous research on ANROM with our proposed method to demonstrate the efficiency and effectiveness of the proposed method in producing high-quality solutions in shorter amounts of time.
The remainder of this paper is organized as follows. The basic explanation and definition of NRPs is presented in
Section 2, and HS and AIS for NRPs are presented in
Section 3. The procedure for hybridization and combination of HS and AIS in solving NRPs is presented in detail in
Section 4. The computational experiments conducted and their results are discussed in
Section 5. Conclusions and future research directions are presented in
Section 6.
2. Problem Definition
NRPs involve producing a periodic (weekly, fortnightly, or monthly) duty roster for nursing staff that is subject to a variety of hard and soft constraints such as legal regulations, personnel policies, nurse preferences, and other requirements specific to a given hospital. In addition, a schedule avoiding difficult-to-follow shift patterns should be constructed and the work contract of each employee should be respected as much as possible. The term “work contract” refers to the agreement signed between the nurse and the hospital, which addresses requests for days or shifts on and off, working on weekends, maximum acceptable consecutive workdays, etc. Some work contract elements can be considered as legal requirements. It is worth considering the fairness of the problem from the work contracts perspective. For example, contract violations should be distributed evenly among all available nursing staff.
We studied various instances of NRPs based on the ANROM, one of the representative benchmark datasets of NRPs, and we demonstrated the superiority of the proposed algorithm using these benchmark data. ANROM, which was first implemented in a hospital in 1995, was the initial version, but the system evolved to deal with new and more complex real-world problems that appear continually. More than 40 hospitals in Belgium, some of which contain approximately 100 wards, replaced their time-consuming manual scheduling with this system. Although the problem is user-defined to a large extent, the software must be efficient in different settings. Each specific hospital ward should be able to formulate its problem within the restrictions of the model described in the following sections.
The constraints of NRPs can be divided into two classes: hard constraints and soft constraints; hard constraints are those that must always be satisfied. To address real-world hospital situations, ANROM considers the following set of hard constraints: a maximum of one assignment per shift type per day, which precludes the assignment of the same shift to a member of the ward more than once per day; and personnel requirements, which are usually expressed in terms of the minimum number of personnel required and the preferred number of personnel to meet the patients’ needs. ANROM considers a high number of soft constraints, as shown in
Table 1. They should preferably be satisfied, but violations can be tolerated when penalties are included in the evaluation function. The main goal of this study was to minimize the sum of the penalties that occur when soft constraints are violated and hard constraints are satisfied through experiments conducted using ANROM data.
Table 1 presents the types of constraints indicated by each problem.
4. Hybrid and Cooperative Strategies Using Harmony Search and Artificial Immune Systems
4.1. Why We Hybridize and Cooperate HS and AIS
In achieving combinatorial optimization using metaheuristic algorithms, a major concern is how to maintain the balance between two major components: diversification and intensification. These two components seem to contradict each other, but their balanced combination is crucially important to the success of obtaining a qualified solution. Proper diversification guarantees that the search in the solution space can effectively explore as many locations and regions as possible. It also ensures that the evolving system will not be trapped at biased local optima. If the diversification is too strong, it may explore too many locations in a stochastic manner and subsequently slow the convergence of the algorithm. Conversely, appropriate intensification exploits the history and experience of the search process. It also permits the convergence to be accelerated when necessary by reducing randomness and limiting diversification.
To reconcile these two conflicting components, hybrid methods using P-meta and S-meta heuristics have been used in many studies. P-metaheuristics are utilized to search among the diverse solutions in the solution space in the first and subsequent iterations. S-metaheuristics are used in the final iteration to generate solutions in the neighborhood of current ones discovered using the P-metaheuristics.
In traditional HS, a new harmony vector is generated using three rules, namely HMC, RS, and PA. A decision variable of harmony vectors is selected based on either an HMC rule with a probability of HMCR or an RS rule with a probability of 1-HMCR. A PA rule with a probability of (HMCR PAR) is then utilized to change the values of the decision variables from the HMC. Except for the PA rule, application of an HMC rule for the generation of a new harmony from the existing HMS and RS rules that generate a new harmony randomly is difficult for balancing intensification and diversification.
Many studies have attempted to develop advanced harmony searchers to maintain a balance between intensification and diversification. A typical and popular method is the improved harmony search (IHS) algorithm introduced by Mahdavi et al. [
42], which employs enhanced fine-tuning characteristics and an enhanced HS convergence rate. As shown in Equations (1) and (2), the algorithm’s performance is improved by dynamically increasing the pitch adjusting rate and the bandwidth (BW) as the iteration progresses.
Although effective control of BW can be useful in balancing intensification and diversification, the characteristics of sequential optimization with main constraints such as NRPs result in the limited application of BW because of the possibility of generating worse solutions. The application of fine-tuning by PAR also has some drawbacks in early iterations in which the value of PAR is low. In spite of the critical importance of the PA rule in balancing exploitation and exploration, low values of PAR in early iterations forces premature convergence.
Highly reliable harmony search (HRHS) has been proposed by Taherinejad [
43] to overcome a critical issue in IHS that may result in premature convergence in early iterations. As shown in Equation (3), HRHS guarantees diversification of good solutions that are generated in early iterations by increasing the probability of generation of neighbor solutions and vice versa. HRHS still has major drawbacks in the final iteration, where the value of PAR is close to zero and may result in stagnation in convergence of the algorithm.
Subsequently, effectively maintaining the balance between exploration and exploitation is difficult for dynamically changing PAR.
Another problem of HS is that the solution generated using the three rules is updated only when its value is better than the worst of the existing solutions. Thus, if the solution generated is not better, the existing HM does nothing. Even if a new harmony is better than the worst solution, only a new harmony is added to the existing HM. This is the weakness of HS in achieving the desired results from diversification. Hence, a new harmony is highly dependent on the solution characteristics of each harmony that consists of the existing HM. When premature convergence occurs, the HS method is limited in that it continually searches only local solutions. To overcome some of the limitations mentioned earlier, we propose two methods for combining HS and AIS. Determining how and when to update the existing HM is essential to the success of this approach.
4.2. How We Hybridize and Cooperate HS and AIS
The first method, “Hybrid harmony search with artificial immune systems” (HHSAIS), and its procedure are shown in
Figure 4. The existing HM is updated whenever a new harmony generated by three rules is not better than the worst harmony. A new harmony not being better than the worst harmony means that the current HM may be composed of similar solutions, and this makes it extremely difficult to search the solution space thoroughly. In such a case, the insertion and support of AIS with cloning and mutation can help renew the existing HM.
The second approach involves good solutions that are reproduced from both HS and AIS being handed over to the opposite population during iterations while each population of the two algorithms is maintained separately. We refer to this as the cooperative harmony search and artificial immune systems (CHSAIS) approach. CHSAIS is a way to update each existing population of HS and AIS through the injection of the opposite metaheuristics. Its core differences, compared with HHSAIS, are the sequential execution of HS and AIS and the exchange of good solution(s) generated from each other. The good solution that is generated in HS procedure is transferred to the AIS procedure to generate better solutions through the clonal and mutation operation. Conversely, the good solutions from the AIS procedure are delivered to the HM procedure to update the existing HM pool and help improve the new harmony.
By combining these two algorithms, we expect that the population of each metaheuristic during its iterations will be updated through the injection of solution(s) generated by the other party and that in the generation of a solution in the next iteration of each algorithm, the combination of the existing population and the injected good solution will have a higher probability of achieving a better solution.
Figure 5 illustrates the procedure for applying CHSAIS.
5. Computational Experiments
NRP benchmarking problems were defined and addressed for the purposes of validating and demonstrating the applicability of the two proposed hybrid strategies using HS and AIS. For this purpose, four algorithms were applied: HS, IHS, HHSAIS, and CHSAIS. The experiments were programmed in the C# language and carried out using a personal computer with an Intel G500 2.60-GHz processor with 4 GB of RAM and a Windows 7 operating system. As shown in
Table 2, a total 18 cases—3–5 cases for each algorithm—were considered.
Cases 1 to 5 of HS were performed by changing HMCR and PAR. Cases 6 to 8 were performed by changing HMCR while performing IHS within the range of 0.1–0.9 of PAR. Cases 9 to 13 and 14 to 18 were performed by change the AIS parameters while applying HHSAIS and CHSAIS, respectively, as for Case 6. Each experimental case was replicated 30 times for each benchmarking set within the maximum number of iterations, which was set to 50,000 for all runs. The HMS, HS, and AIS population sizes were set to 10, 30, and 50, respectively, based on the number of nurses.
The experimental results are summarized in
Table 3,
Table 4,
Table 5 and
Table 6 in terms of the best, mean, and worst values, standard deviations, and running times for the various cases considered. The best and mean values for each case are highlighted in bold.
Table 7 shows that among the best cases for each of the four algorithms, the two proposed algorithms, HHSAIS and CHSAIS, yield results that are superior to those achieved by the HS and IHS algorithms, respectively.
Figure 6a–c presents the typical solution history graphs by iteration for the four algorithms and for the BCV-5.4.1, BCV-7.10.1, and BCV-3.46.1 benchmarking sets. It can be observed that the evolution curves of the CHSAIS algorithm descend much faster and reach better solution than those of the other algorithms.
A comparison of the results with those reported in the literature shows that the CHSAIS algorithm proposed in this paper usually yields better results than either HS and IHS alone. The results summarized in
Table 8 show that CHSAIS yields competitive results in some instances. For the BCV-1.8.1, BCV-A12.1, and BCV-A12.2 cases, we obtained better results than the algorithms reported in the literature. For the BCV-4.13.1, BCV-5.4.1, BCV-7.10.1, and BCV-8.13.1 cases, CHSAIS yields the same best known results as the other methods. In the cases of BCV-2.46.1, BCV-3.46.2, and BCV-6.13.1, the results are slightly worse than the best known results. The average results for CHSAIS were compared to those reported in the literature. As the results show, CHSAIS matched the best average results obtained by other approaches in four instances and achieved better average results for six of eleven instances.
In addition, we did experiments with INRC 2010 instances [
45] for comparing among our proposed and previous works.
Table 9 show the gaps among the results of our proposed and previous works published previously. The results lead that our proposed is superior over the other ones in solving the NRP.
Table 10 shows the comparative results between CHSAIS and general GA. As you can see, despite the various changes of parameters of GA, the results lead to our algorithm being superior to all cases of GA. Because of having randomness during iterations, the corresponding
t-test was conducted to assess the statistical significance is determined by the
p-value.
6. Conclusions
In this paper, two strategies in applying two population based metaheuristics, named HHSAIS and CHSAIS, is designed. We approach HHSAIS to solve NRP because, even though the new solution generated from HS procedure is not better than the worst existing HM, we expect that AIS can make it a better solution by searching neighbor solutions through cloning and mutation operator. Unlike local search, which provides pure exploitation without exploration, the hybridization of HS and AIS can be better harmony in dealing with the NPR’s nature of the search space for the highly constrained optimization problem.
The proposed methods were applied in combination with general HS procedures to newly updated HM and sequential executions of HS and AIS, with solution exchanges. We evaluated the various methods in terms of instances of NRP benchmarking collected from ANROM.
The experimental results using HHSAIS demonstrate justification of our beliefs. Second is CHSAIS, which is cooperative of HS and AIS. In this approach, both algorithms operate individually and solutions generated from each algorithm are exchanged in the opposite population every iteration. Through this approach, we expect that, even if the computation time is longer than HS alone and CHSAIS, it has significant advantages as the solutions are swapped between each other from opposite algorithm, thus can actively explore different search space regions. Clearly, the CHSAIS matched the best average results obtained by other approaches in four instances and achieved better average results for six of eleven instances by other comparative methods. The fact that the proposed CHSAIS has the ability to explore the solution search space of the NPR in different ways to generate desired solutions could be an exploratory for researchers in the future.
In future research, we will test the superiority of our algorithm by applying it to real hospital data and we will attempt to generalize our algorithm to solve various combinatorial and sequential optimization problems.