Abstract
In the variant of the well studied nurse rostering problem proposed in the Second International Nurse Rostering Competition, multiple stages have to be solved sequentially which are dependent on each other. We propose an integer programming model for this problem and show that a set of newly developed extensions in the form of additional constraints to deal with the incomplete information can significantly improve the quality of the generated solutions. We compare our solution approaches with the results obtained in the competition and show that the extended model achieves results competitive with the competition finalists.
1 Introduction
The automated generation of high quality staff schedules, in particular for hospitals, has been an important problem for over 40 years. Multiple variants and solution approaches exist [to be found e.g. in surveys by Ernst etÂ al. (2004) and den Bergh etÂ al. (2013)]. A survey focused on rostering problems in hospitals specifically was published by Burke etÂ al. (2004).
Ceschia etÂ al. (2015) proposed a variant of the Nurse Rostering Problem for the Second International Nurse Rostering Competition (INRCII). In contrast to previous problem variants, a multistage formulation is used, where solutions for individual weeks have to be produced by the solver sequentially, without information about the requirements of later weeks. Salassa and Vanden Berghe (2012) denoted such a setting as a stepping horizon approach.
This multistage setting poses two unique challenges for solvers: The dependencies between weeks make it necessary to take the solutions of previous weeks into account during the evaluation of the quality of a schedule. Publications treating this issue are by Glass and Knight (2010), Salassa and Vanden Berghe (2012) and Smet etÂ al. (2016), who developed and formalized various strategies to consistently include the results of previous stages in the evaluation of the current schedule. Their findings have largely been included in the rules for constraint evaluation of the INRCII.
Further, and not explored in the previously mentioned papers, is the fact that due to the incomplete information during all weeks but the last, the generated solution can no longer be guaranteed to be optimal even if each week is solved to optimality. More so, a naive model that is not adapted to this setting will produce imbalanced schedules that incur large penalties in later weeks as options are restricted excessively by the solutions of the previous weeks. It is therefore necessary to allow for the existence of future scheduling periods already during the solution of the current stage. While e.g. Salassa and Vanden Berghe (2012) successfully improve their results by regarding the solutions of past stages, they do not include any special mechanisms to account for the upcoming future stages. To the best of our knowledge, the same holds for the other works dealing with such multistage settings.
There have been 15 submissions to the INRCII, with seven of these advancing to the final round. The results for all participants are available on the competition website,^{Footnote 1} while information about some solution approaches (Dang etÂ al. 2016; Kheiri etÂ al. 2016; Jin etÂ al. 2016; RÃ¶mer and Mellouli 2016) has been published as extended abstracts in the proceedings of PATAT2016. In particular, the winners of the competition used integer programming (IP) with a networkflowbased formulation (RÃ¶mer and Mellouli 2016). One other publication dealing with this problem is by Santos etÂ al. (2015), who used a weighted constraint satisfaction approach.
Several IP formulations have been previously used for nurse rostering problems, including the problem proposed in the First International Nurse Rostering Competition (INRC2010) (Haspeslagh etÂ al. 2014). For this (singlestage) problem, Santos etÂ al. (2016) provided an IP formulation and proposed techniques to improve the performance of IP solvers based on this formulation, by providing good dual and primal bounds. Valouxis etÂ al. (2012) proposed a two phase approach for the INRC2010 problem. Integer programming formulations were proposed in both phases to assign nurses to working days and to shift types. A branch and price algorithm has been proposed for solving INRC2010 instances in Burke and Curtois (2014). In this competition, also several heuristic and hybrid algorithms have been applied to the instances. We refer the reader to Haspeslagh etÂ al. (2014) for a comparison of different approaches. IP has also been used for other nurse rostering problems [e.g. Burke etÂ al. (2010), Brucker etÂ al. (2011)].
In this article, we investigate solving a new nurse rostering problem (proposed in the INRCII) by Integer Programming. As in this problem a multistage formulation is used, the application of previous IP approaches is not sufficient to obtain good solutions that take into consideration future scheduling periods. Therefore, novel formulations are needed to cope with this new problem. We first propose a basic IP formulation (Sect. 3) for the INRCII problem (as defined in Sect. 2). Our main contribution is the extension of this model with new additional constraints to account for the multistage setting (see Sect. 4). To the best of our knowledge this extension presents an original contribution to the literature.
We evaluate our formulations in Sect. 5, using the instances provided for the INRCII and show that the additional constraints significantly improve the quality of the generated solutions. We also compare our model with the results of the finalists in the INRCII. In this comparison, the results of the extended (IP) model are competitive (slightly better than the median).
This paper is an extension of work previously published in the proceedings of the 2016 conference on the Practice and Theory of Automated Timetabling Mischek and Musliu (2016), which was further based on the first authorâ€™s masterâ€™s thesis [see Mischek (2016)].
2 Problem definition
In this section, we give a short overview of the problem used in the INRCII. A detailed description of the problem structure and all constraints can be found in the competition rules (Ceschia etÂ al. 2015).
Instances are of either 4 or 8 weeks duration. For each week, a schedule has to be found by the solver, using only the information provided in a global scenario file, containing information about the nurses and their contracts, week data about the requirements of the current week and a history with data concerning the last assignments of the previous weeks and some global counters. Information about the following weeks, in particular about the covering requirements, is not available until the solution for the current week has been fixed by the solver.
In the following, a work stretch denotes a period of consecutive working days for a nurse. Rest stretch and shift stretch are analogously defined for periods of consecutive days off and assignments to the same shift, respectively.
There are four hard constraints that have to be fulfilled by any solution to be regarded as feasible:

H1. Single assignment per day: Each nurse can only work a single shift using a single skill per day.

H2. Understaffing: The minimum number of nurses required for each shift and skill must be present.

H3. Shift type successions: Nurses must not have shifts on two consecutive days that form a forbidden sequence.

H4. Missing required skill: Nurses can only cover assignments for which they have the required skill.
Further, seven soft constraints are defined. Solutions should try to satisfy these constraints, but violating them only results in a penalty to the quality of the solution (weights are listed in the description of each constraint).

S1. Insufficient staffing for optimal coverage (30): The number of nurses assigned to each shift and skill should not be smaller than the optimum staffing. The penalty is multiplied by the number of missing nurses.

S2. Consecutive assignments (15/30): The length of each shift stretch (weight 15) and work stretch (weight 30) should be within the bounds defined for the shift type resp. the contract of the involved nurse. The penalty is multiplied by the number of missing or surplus assignments.

S3. Consecutive days off (30): As before, the length of each rest stretch should be within the bounds defined in each nurseâ€™s contract. The penalty is multiplied by the number of missing or surplus days off.

S4. Preferences (10): The requests of nurses for shifts (or days) off should be respected.

S5. Complete weekend (30): Nurses with the completeweekend constraint in their contract should either work both days of the weekend or none.

S6. Total assignments (20): Over the whole planning horizon, each nurseâ€™s assignments should be within the bounds defined in their contract.

S7. Total working weekends (30): Over the whole planning horizon, each nurse should not work more than the maximum number of weekends defined in their contract.
The complete information necessary to evaluate constraints S6 and S7 is available only after the solution for the last week has been fixed, although they should of course be respected by solvers during all weeks. All sequence constraints (H3, S2, S3) also use the border data from the solution for the previous week (this is provided in the history file).
3 Basic model
3.1 Parameters
The first set of parameters contains values that stay the same over the whole planning horizon. These values are stored in the scenario file:
 N :

Â Â Â set of nurses
 S :

Â Â Â set of shifts
 K :

Â Â Â set of skills
 W:

Â Â Â number of weeks
 \(a^{[+/]}_n\) :

Â Â Â maximum/minimum assignments for nurse n across planning horizon
 \(w^{[+/]}_n\) :

Â Â Â maximum/minimum consecutive working days for nurse n
 \(f^{[+/]}_n\) :

Â Â Â maximum/minimum consecutive days off for nurse n
 \(t^+_n\) :

Â Â Â maximum number of working weekends for nurse n across planning horizon
 \(b_n\) :

Â Â Â boolean, 1 iff either both days of a weekend should be worked by nurse n, or none
 \(\kappa _{nk}\) :

Â Â Â boolean, 1 iff nurse n has skill k
 \(\sigma ^{[+/]}_s\) :

Â Â Â maximum/minimum consecutive assignments of shift s
 \(u_{st}\) :

Â Â Â boolean, 1 iff shift t may be assigned the day after an assignment of shift s
The next set of parameters is defined for each week.
 w :

Â Â Â number of the current week
 \(c^d_{sk}\) :

Â Â Â minimum cover requirements for day d, shift s and skill k
 \(o^d_{sk}\) :

Â Â Â optimum cover requirements for day d, shift s and skill k
 \(r^d_{ns}\) :

Â Â Â boolean, 1 iff nurse n requested not to work in shift s on day d (\(s=0\) is dayoff request)
Finally, these parameters specify values depending on the schedule of the previous week. This history is given for the first week and calculated from the solution of the last week for all subsequent weeks.
 \(l^{id}_n\) :

Â Â Â id of last shift worked by nurse n in previous week (0 if day off)
 \(l_{ns}\) :

Â Â Â consecutive shifts of type s worked by nurse n at the end of the previous week (0 if \(s \not = l^{id}_n\))
 \(l^{w}_n\) :

Â Â Â consecutive working days for nurse n at the end of the previous week (0 if \(l^{id}_n = 0 \))
 \(l^{f}_n\) :

Â Â Â consecutive days off for nurse n at the end of the previous week (0 if \(l^{id}_n \not = 0 \))
 \(a^{tot}_n\) :

Â Â Â total number of assignments for nurse n so far
 \(t^{tot}_n\) :

Â Â Â total number of weekends worked by nurse n so far
3.2 Decision variables
 \(x^d_{nsk} \in \{0, 1\}\) :

\(\forall n \in N, s \in S, k \in K, d \in \{1...7\}\)
 \(W_n \in \{0,1\}\) :

\(\forall n \in N\)
\(x^d_{nsk} = 1\) if nurse n is assigned to shift s using skill k on day d, and 0 otherwise.
The \(W_n\) variable indicates that nurse n works at least one day of the weekend.
The violation of soft constraints is measured using either nonnegative or boolean surplus variables:
 \(C^{S1}_{skd}\) :

Â Â Â \(\ge 0\) missing nurses for optimal coverage of shift s, skill k on day d
 \(C^{S2a}_{nsd}\) :

Â Â Â \(\ge 0\) missing days in the block of shifts s starting on day d for nurse n
 \(C^{S2b}_{nsd}\) :

Â Â Â \(\in \{0,1\} \) 1 iff shift s of nurse n on day d violates maximum consecutive shifts
 \(C^{S2c}_{nd}\) :

Â Â Â \(\ge 0\) missing days in the work block of nurse n starting on day d
 \(C^{S2d}_{nd}\) :

Â Â Â \(\in \{0,1\}\) 1 iff work of nurse n on day d violates maximum consecutive work days
 \(C^{S3a}_{nd}\) :

Â Â Â \(\ge 0\) missing days in the free block of nurse n starting on day d
 \(C^{S3b}_{nd}\) :

Â Â Â \(\in \{0,1\}\) 1 iff day off of nurse n on day d violates maximum consecutive days off
 \(C^{S4}_{nd}\) :

Â Â Â \(\in \{0,1\}\) 1 iff assignment on day d violates a request of nurse n
 \(C^{S5}_{n}\) :

Â Â Â \(\in \{0,1\}\) 1 iff nurse n violates complete weekend constraint
 \(C^{S6}_{n}\) :

Â Â Â \(\ge 0\) number of total shifts outside the allowed bounds for nurse n
 \(C^{S7}_{n}\) :

Â Â Â \(\ge 0\) number of weekends worked above the maximum by nurse n
3.3 Objective function
The objective function is the weighted sum over all violations of each soft constraint:
3.4 Constraints
The following (in)equalities model the hard constraints, as described above.
For constraint H3, any forbidden shift sequence (\(u_{s_1s_2} = 0 \)) must not be assigned to the same nurse on consecutive days. This must be ensured both within the week (a) and at the boundary of this week with the previous one (i.e. on the first day of the week, b).
The remaining inequalities deal with the soft constraints. Each inequality can be deactivated by setting the appropriate surplus variable to a value greater than zero, which results in a corresponding penalty in the objective function.
S2 actually contains various different constraints that have to be modeled separately: consecutive assignments of the same shift (min (a)/ max (b)) and of work in general (min (c) / max (d)), both during and at the start of the week.
For the minimum consecutive shifts constraints, all patterns that compose a sequence shorter than the required length are prevented. For example, if the minimum number of consecutive night shifts (N) is 4, the patterns {xNx, xNNx, xNNNx}, where x is any other shift or a day off, should not appear.
Since each pattern incurs a penalty proportional to the number of missing assignments, (in the example, xNx would incur a penalty of 45, while xNNNx would incur a penalty of 15) the surplus variables are weighted correspondingly, to ensure that a value of at least the number of missing assignments is necessary to deactivate the constraint.
Equations 8 and 9 model the case where a stretch starts at the beginning of the week or towards the end of the previous week.
The maximum consecutive shifts constraints is modeled like this: For each shift s with a maximum of \(\sigma ^+_s\) consecutive assignments, each block of \(\sigma ^+_s + 1\) days must contain at least one day where s is not assigned. Note that contrary to the situation for S2a, violations of this constraint by more than one shift assignment result in multiple matches of the pattern and therefore it suffices to use boolean surplus variables.
As before, equations 10 model the case where a shift block started in the previous week.
The inequalities modelling the maximum and minimum length of work stretches (S2c, S2d) function analogously to those for shift stretches. The only difference is that an assignment to any shift counts towards the length of the work stretch.
S3 similarily contains two independent constraints: the minimum (a) and maximum (b) number of consecutive days off, again both during and at the start of the week.
The equations modelling these constraints are again analoguous to those from constraints S2c and S2d, except that days of work and days off were swapped.
To model nurse requests for shifts or days off, any assignment to an unwanted shift incurs the penalty.
For the complete weekends constraint, first the additional helper variables \(W_n\) are set if the nurse n works either of the days on the weekend. Equations 24 then ensure that if \(W_n\) is set, and the complete weekend constraint is present for the nurse, both days of the weekend should have work assigned.
The constraint S6 (number of total assignments) is modeled slightly differently from the description given by Ceschia etÂ al. (2015). Originally, these constraints were evaluated only after the schedules of all weeks were fixed. In our model, the penalties are calculated immediately and added to the objective function value of the week in which they arise. This does not change the overall quality of the whole schedule, so results are still comparable, although the intermediate quality value of the individual weeks might be different.
The equations for constraint S7 (maximum number of weekends worked) use the variable \(W_n\), set in equations 23.
4 Model extensions
While the basic model described in Sect. 3 yields feasible solutions that are optimal for each week (if given enough time), the connections between weeks are mostly ignored. Because the weeks are solved individually, solutions are favored that give slightly better results in earlier weeks, at the cost of having potentially much larger penalties in later weeks.
In order to take this into account and improve the overall solution quality, we propose the following extensions to the model, in the form of additional (soft) constraints.
4.1 Overstaffing
Looking at the total number of shifts for each nurse, one can see that nearly all nurses exceed their maximum number of assignments (compare Fig. 1), except for nurses with a full time contract. Even these nurses mostly have all their available shifts assigned.
This is despite the fact that the total number of assignments is much larger than the amount needed to cover all shifts at the optimal level (1180 assigned versus 1029 needed for optimal staffing levels in the example instance).
However, since there is no penalty on overstaffing, there is no pressure to avoid unnecessary assignments. Indeed, in some cases it can seem advantageous to assign shifts above the optimal staffing levels in order to fulfil sequence constraints or the complete weekend constraints (S7).
However, as soon as the available assignments are used up, high penalties are unavoidable as other constraints (in particular cover constraints and sequence constraints) still have to be fulfilled.
This can also be seen from Fig. 2: In earlier weeks, far more shifts are assigned to nurses than necessary, while in later weeks, constraints S6 force solutions to be closer to the required staffing levels.
To avoid this situation, we introduced a new constraint penalizing overstaffing:

S8*. Overstaffing: The number of nurses assigned to each shift and skill per day should not exceed the optimal coverage levels.
This constraint can be added to the basic IP model with the following inequalities:
where \(C^{S8*}_{skd}\) is a new surplus variable.
4.2 Average assignments
While the overstaffing constraints already reduce the number of excess assignments over the maximum, they do not differentiate between nurses with different contracts. As a result, nurses with parttime or halftime contracts have the same schedules as those with fulltime contracts in the earlier weeks. Consequently, they are not available in later weeks without penalties, as their contracts are already maxed out.
Ideally, nurses should be employed according to their contracts during all weeks, with fulltime nurses having more assignments per week than other nurses. In part this is already done implicitly, because nurses with shorter contracts usually also have shorter work stretch lengths and longer rest stretch lengths.
To ensure that each nurse will be available until the last stage, their assignments should be distributed evenly across all stages.

S6*. Average assignments: The total number of assignments up to the current week must be within the bounds defined in the contract, multiplied by the fraction of weeks that have already passed.
This extension generalizes constraints S6 to earlier weeks.
To give an example, if a nurse has a minimum of 10 assignments and a maximum of 22, then after stage 4 (of 8), they should have between 5 and 11 shifts assigned. Assuming that they already had 7 shifts assigned in stages 1â€“3, this constraint would require them to have between 0 and 4 assignments in stage 4.
If these constraints are satisfied during all weeks, it can be guaranteed that also constraints S6 are satisfied for the whole schedule.
The following inequalities model these constraints:
\(C^{S6*}_n\) are again new surplus variables.
Here, fractional limits are rounded such that the limits are always integer numbers and the solutions satisfying S6* always also satisfy S6. We also experimented with different rounding schemes, but this did not influence the quality of the generated solutions.
An alternative version of constraints S6* can be formulated as

S6*b. Average assignments: In each week, the remaining assignments (not yet used in previous weeks) should be divided equally among all remaining weeks.
Continuing the example above, the nurse in question would have between 3 and 15 assignments left to distribute over 5 weeks (stages 4â€“8). This means that according to constraint S6*b, they should have between \(\frac{3}{5}\) (rounded up to 1) and 3 shifts assigned during stage 4.
The difference between these two formulations becomes visible in case of an imbalance in preceding stages (i.e. too many or too few assignments): S6* tries to restore the balance (which might require unusual work or rest stretches), while S6*b ignores a global balance and works exclusively with the assignments remaining for the current and future stages. A further discussion of these two formulations can be found in Sect. 5.
4.3 Average working weekends
The same argument as above also applies to constraints S7, the maximum number of total weekends. Just like assignments in general, also weekends should not be used up in the early stages, but distributed across all weeks to preserve options.
Therefore, an analoguous constraint S7* can be defined:

S7*. Average working weekends: In each week, the still available working weekends (not yet used in previous weeks) should be divided equally among all remaining weeks.
with the corresponding inequalities
Note that since there is at most one working weekend per week and nurse, and the maximum number of working weekends is less than the number of weeks, the limit set for each week will either be 0 or 1.
4.4 Next week restrictions
In addition to the global constraints, solutions for different stages influence each other also at the boundary between weeks.
Since the staffing requirements for the next week are unknown in each stage, leaving more options to schedule nurses without conflicts is beneficial. If there are only few good assignments for the nurses with a certain skill, satisfying the cover constraints might become difficult if they do not match one of those options.
A common way for schedules to restrict the options for the next stage is via the sequence constraints. For example, let the minimum number of consecutive night shifts (\(\sigma ^_{\text {N}}\)) be 4 and the proposed solution for this week end with a single night shift on Sunday for a nurse (and any other shift or a day off on Saturday, compare Fig. 3). Then we already know that any assignment for this nurse from Monday to Wednesday that is not a night shift, will inevitably incur a penalty (and depending on the rest of the schedule, assigning only night shifts on these three days could result in penalties of its own).
As another example, if the maximum number of consecutive night shifts is 5 and the proposed solution already contains a shift stretch of at least 5 night shifts in the days leading up to Sunday, this means that assigning a further night shift on Monday of the next week would incur a penalty for exceeding the maximum length.
The same reasoning applies to work and rest stretches.

S9*. Restriction of next weekâ€™s assignments: Options for next weekâ€™s schedule should not be restricted. The penalty is calculated as the total number of shifts that cannot be assigned in the next week without violating at least one sequence constraint.
The equations to model this constraint are split into restrictions from shift (a), work (b) and rest (c) stretches, each regarding the minimum and maximum stretch length and with their own set of surplus variables.
Equations 34 detect blocks of the same shift s at the end of the week with a length b below the minimum shift sequence length (constraint S2a). If such a block is found, this means that for the first \(\sigma ^_s  b\) days of the next week, neither a day off, nor any of the other \(S \setminus \{s\}\) shifts can be assigned without penalty. In the equation, the left hand side of the inequality sums to \(b+1\) in such a case. To still satisfy the constraint, the surplus variable \(C^{S9* {}a}_{n}\) must be assigned a value \(\ge S(\sigma ^_sb)\), resulting in a corresponding penalty in the objective function.
The case, where a long shift stretch of shift s blocks an assignment of s to the first day of the following week, is covered by Eq. 36. Any block of shift s at the end of the week with a length of at least \(\sigma ^+_s\) violates the corresponding inequality, unless compensated for by a surplus variable.
The restrictions on work (b) and rest (c) stretches work analogously, except that the weights of the surplus variables differ according to the number of blocked assignments.
4.5 Unresolvable patterns
In the solutions generated for various instances, we found that violations of sequence constraints most commonly appeared at the boundaries between weeks. In many cases, this is the result of patterns similar to those shown in Fig. 4.
In general, not checking the feasibility of completing a multishift work stretch in the next week can lead to situations where the last shift stretch can not be extended to the minimum length without violating the maximum work stretch length.
This leads to the following additional constraint:

S10*. Unresolvable Patterns: For work stretches at the end of the week, there should be a way to complete them in the next week without violating either the maximum work stretch length or the minimum shift stretch length.
Assume a stretch of shift s is assigned to nurse n at the end of the week. Then an unresolvable pattern has the following structure: First, a block of at least \(w^+_n\sigma ^_s\) shifts (that can be any type except a day off) is scheduled (A), followed by a single shift that is not s (B). Then, the remaining b days up to the end of the week are filled with assignments to shift s (C), where \(b < \sigma ^_s\).
To avoid a violation of the minimum shift stretch length, at least \(\sigma ^_s  b\) more days of shift s would be required at the start of the next week. However, together with parts (A) and (B), this would bring the total work stretch length to at least \((w^+_n\sigma ^_s) + 1 + b + (\sigma ^_s  b) = w^+_n + 1\), which exceeds the maximum work stretch length \(w^+_n\). The different parts are visualized in Fig. 5
Equations 40 detect and penalize these patterns through the use of a further set of surplus variables.
4.6 Objective function
To have an impact on the generated solutions, the surplus variables for the added constraints have to be included in the objective function. The objective function \(f'\) for the extended model is therefore
where \(W^{S8*}\), \(W^{S6*}\), \(W^{S7*}\), \(W^{S9*}\) and \(W^{S10*}\) are the weights of their corresponding constraints.
After a solution has been fixed, the actual penalty has to be recalculated using the objective function of the basic model f, to ensure that the penalties from the additional constraints of the extended model are not included in the final result.
Obviously, all constraints introduced in this section should be ignored in the last week, as there is no further week to influence.
5 Experimental results
All algorithms were implemented in Java 7, and we used the IBM ILOG CPLEX solver,^{Footnote 2} version 12.6.3, to solve the IP models. All experiments were performed on an Intel Xeon 2.33GHz PC, using a single thread. The time limit was set to the time alloted by the benchmarking script^{Footnote 3} provided for the INRCII (on our machine, between 1 and 9 minutes per stage, depending on the instance size).
We trained the parameters of our models using the parametertuning framework irace (LÃ³pezIbÃ¡Ã±ez etÂ al. 2011), over the set of late instances^{Footnote 4} published for the INRCII. The models were then evaluated on the set of hidden instances.^{Footnote 5}
5.1 Model extensions
We first evaluated the impact of adding each extension to the basic IP model individually. Due to the similarity in structure and purpose, constraints S6* (Average Assignments) and S7* (Average Weekends) are grouped together. For this comparison, the weight of each additional constraint was set to a value of 1 to ensure that the focus of the optimization still remains on the original constraints. The only exception is constraint S10* (Unresolvable patterns), since a violation of this constraint directly results in a violation of at least one shift stretch length constraint in the next week and thus warrants a weight of 15 (as if the violation had already occured).
Figure 6 shows that each extension improves the quality of the solutions, with the largest impact achieved by S6*/S7* and S8*, those extensions dealing with the two global constraints S6 and S7.
Considering the two variants of S6*, there is next to no difference between the performance of S6* and S6*b.
The solution quality can further be improved by combining multiple extensions. A combination of S6* (and S7*), S8* and S10* produced the best results, each of the extensions further reducing the penalties of the generated solutions. This will be denoted as the extended model.
Adding also constraints S9* increased the penalties again, even when S9* was assigned a much lower weight than the other extensions. This is probably connected to the fact that solving models including constraints S9* took nearly twice as long on average and thus optimal solutions could not be found for many stages. However, this cannot be the only reason, as results for models without S9* are also better even for instances where each stage could be solved to optimality.
To find optimal weights for the extensions S6*/S7* and S8* (the weight for S10* corresponds directly to the weight of the shifts stretch length constraints), we used IRACE. Both \(W^{S6*} (=W^{S7*})\) and \(W^{S8*}\) were varied between 0 and 20, with a precision of one significant digit after the decimal point. IRACE was run in parallel on 4 cores with a limit of 5000 iterations.
The best values reported by IRACE are \(W^{S6*} = 9.9\) and \(W^{S8*} = 11.9\). The two next best configurations are very similar and further experiments showed that the results do not vary significantly under small variations of the weights.
Considering solution times, CPLEX was able to solve most weeks to optimality, even for the larger instances. Over the whole set of hidden instances, using the extended model, an optimal solution could be found for 274 out of 360 weeks. The average gap between the best solution found and the final lower bound for the remaining 86 weeks was only 1.90%, indicating that substantial improvements are not to be expected even with much longer running times.
5.2 Final results
For the final evaluation, the extended model was used, with weights for the extensions as shown on Table 1. The exact results can be found on Table 2, see also Fig. 7 for comparison.
Due to the extensions, the penalty incurred by the generated solutions is reduced by about 40% on average, in some cases even to less than half the penalty of the basic model. Further, there is no instance, where the extended model produced results that were not at least 20% better than those of the basic model.
Compared to those of the finalists in the INRCII, the results of the extended model are competitive (slightly better than the median), although no new best known solutions could be found. The average rank over all instances is 3.45, placing our results firmly into the top half of the finalists.
6 Conclusions
In this paper, we have proposed and evaluated several original extensions of standard IP formulations for nurse rostering problems in order to deal with multistage settings, as described for the INRCII.
We have shown that our extensions significantly improve upon the results of the basic model and achieve competitive results compared to the finalists in the competition.
The fact that our model could be solved to (near) optimality in most cases, even under the strict time limits imposed by the challenge, indicates that major improvements cannot be expected from varying solution techniques alone. Instead, future research should be focused on further modifications of the model to distribute the penalties more equally between weeks and avoid blocking options for later weeks. Techniques that try to predict the requirements of yet unknown weeks or distinguish between nurses of different skill sets and contracts could result in even better models.
Notes
References
Brucker, P., Qu, R., & Burke, E. (2011). Personnel scheduling: Models and complexity. European Journal of Operational Research, 210(3), 467â€“473.
Burke, E. K., Causmaecker, P. D., Vanden Berghe, G., & Landeghem, H. V. (2004). The state of the art of nurse rostering. Journal of Scheduling 7(6), 441â€“499. http://dx.doi.org/10.1023/B:JOSH.0000046076.75950.0b.
Burke, E. K., & Curtois, T. (2014). New approaches to nurse rostering benchmark instances. European Journal of Operational Research, 237(1), 71â€“81. doi:10.1016/j.ejor.2014.01.039.
Burke, E. K., Li, J., & Qu, R. (2010). A hybrid model of integer programming and variable neighbourhood search for highlyconstrained nurse rostering problems. European Journal of Operational Research 203(2), 484â€“493. http://www.sciencedirect.com/science/article/pii/S0377221709005396.
Ceschia, S., Thanh, N. D. T., Causmaecker, P. D., Haspeslagh, S., & Schaerf, A. (2015). Second international nurse rostering competition (INRCII)â€”Problem description and rules. CoRR abs/1501.04177. http://arxiv.org/abs/1501.04177.
Dang, N. T. T., Ceschia, S., Schaerf, A., De Causmaecker, P., & Haspeslagh, S. (2016). Solving the multistage nurse rostering problem. In Proceedings of the 11th international conference of the practice and theory of automated timetabling (pp. 473â€“475).
den Bergh, J. V., BeliÃ«n, J., Bruecker, P. D., Demeulemeester, E., Boeck, L. D. (2013). Personnel scheduling: A literature review. European Journal of Operational Research 226(3), 367â€“385. http://www.sciencedirect.com/science/article/pii/S0377221712008776.
Ernst, A., Jiang, H., Krishnamoorthy, M., & Sier, D. (2004). Staff scheduling and rostering: A review of applications, methods and models. European Journal of Operational Research 153(1), 3â€“27. http://www.sciencedirect.com/science/article/pii/S037722170300095X, timetabling and rostering.
Glass, C. A., Knight, R. A. (2010). The nurse rostering problem: A critical appraisal of the problem structure. European Journal of Operational Research 202(2), 379â€“389. doi:10.1016/j.ejor.2009.05.046.
Haspeslagh, S., Causmaecker, P. D., Schaerf, A., & StÃ¸levik, M. (2014). The first international nurse rostering competition 2010. Annals of Operations, 218(1), 221â€“236. doi:10.1007/s1047901210620.
Jin, H., Post, G., & van der Veen, E. (2016). Ortecâ€™s contribution to the second international nurse rostering competition. In Proceedings of the 11th international conference on the practice and theory of automated timetabling (pp. 499â€“501).
Kheiri, A., Ã–zcan, E., Lewis, R., & Thompson, J. (2016). A sequencebased selection hyperheuristic: A case study in nurse rostering. In 11th International conference on the practice and theory of automated timetabling (PATAT â€™16) (pp. 503â€“505).
LÃ³pezIbÃ¡Ã±ez, M., DuboisLacoste, J., StÃ¼tzle, T., Birattari, M. (2011) The irace package, iterated race for automatic algorithm configuration. Technical Report TR/IRIDIA/2011004, IRIDIA, UniversitÃ© Libre de Bruxelles, Belgium. http://iridia.ulb.ac.be/IridiaTrSeries/IridiaTr2011004.pdf.
Mischek, F. (2016). Exact and heuristic approaches for a multistage nurse rostering problem. Masterâ€™s thesis, Technische UniversitÃ¤t Wien.
Mischek, F., Musliu, N. (2016). Integer programming and heuristic approaches for a multistage nurse rostering problem. In PATAT 2016: Proceedings of the 11th international conference of the practice and theory of automated timetabling, PATAT
RÃ¶mer, M., & Mellouli, T. (2016). A direct MILP approach based on stateexpanded network flows and anticipation for multistage nurse rostering under uncertainty. In Proceedings of the 11th international conference on the practice and theory of automated timetabling (pp. 549â€“551).
Salassa, F., Vanden Berghe, G. (2012). A stepping horizon view on nurse rostering. In Proceedings of the 9th international conference on the practice and theory of automated timetabling (pp. 161â€“173).
Santos, D., Fernandes, P., Cardoso, H. L., & Oliveira, E. (2015). A weighted constraint optimization approach to the nurse scheduling problem. In 2015 IEEE 18th international conference on computational science and engineering (CSE) (pp. 233â€“239). doi:10.1109/CSE.2015.46.
Santos, H. G., Toffolo, T. A. M., Gomes, R. A. M., & Ribas, S. (2016). Integer programming techniques for the nurse rostering problem. Annals of Operations, 239(1), 225â€“251. doi:10.1007/s1047901415946.
Smet, P., Salassa, F., & Vanden Berghe, G. (2016). Local and global constraint consistency in personnel rostering. KU Leuven: Technical Report.
Valouxis, C., Gogos, C., Goulas, G., Alefragis, P., & Housos, E. (2012). A systematic two phase approach for the nurse rostering problem. European Journal of Operational Research, 219(2), 425â€“433. doi:10.1016/j.ejor.2011.12.042.
Acknowledgements
Open access funding provided by Austrian Science Fund (FWF). This work was supported by the Austrian Science Fund (FWF): P24814N23.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Mischek, F., Musliu, N. Integer programming model extensions for a multistage nurse rostering problem. Ann Oper Res 275, 123â€“143 (2019). https://doi.org/10.1007/s104790172623z
Published:
Issue Date:
DOI: https://doi.org/10.1007/s104790172623z
Keywords
 Nurse rostering
 INRCII
 Integer programming