The Nurse Scheduling Problem in Real-Life


The aim of this paper is to study the scheduling process for two types of nursing teams, regular teams from care units and the float team that covers for shortages in the hospital. When managers address this problem, they either use a manual approach or have to invest in expensive commercial tool. We propose a simple heuristic approach, flexible and easy enough to be implemented on spreadsheets, and requiring almost no investment. The approach leads to streamlined process and higher-quality schedules for nurses. The multi-objective model and heuristics are presented, and additional analysis is performed to compare the performance of the approach. We show that our approach compares very well with an optimization software (CPLEX solver) and may be implemented at no cost. It addresses the lack of choice between either manual solution method or a commercial package at a high cost.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6


  1. 1.

    Aickelin, U., and Dowsland, K.A., An indirect genetic algorithm for a nurse scheduling problem. Comput. Oper. Res. 31:761–778, 2004.

    Article  MATH  Google Scholar 

  2. 2.

    Aickelin, U., Burke, E.K., Li, J., An estimation of distribution algorithm with intelligent local search for rule-based nurse rostering. J. Oper. Res. Soc. 58:1574–1585, 2007.

    Article  MATH  Google Scholar 

  3. 3.

    Bard, J.F., and Purnomo, H.W., Hospital-wide reactive scheduling of nurses with preference considerations. IIE Trans. 37:589–608, 2005a.

    Article  Google Scholar 

  4. 4.

    Bard, J.F., and Purnomo, H.W., Short-term nurse scheduling in response to daily fluctuations in supply and demand. Health Care Manag. Sci. 31:315–324, 2005b.

    Article  Google Scholar 

  5. 5.

    Bard, J.F., and Purnomo, H.W., Cyclic preference scheduling of nurses using a lagrangian-based heuristic. J. Sched. 10:5–23, 2007.

    Article  MATH  MathSciNet  Google Scholar 

  6. 6.

    Berrada, I., Ferland, J.A., Michelon, P., A multi-objective approach to nurse scheduling with both hard and soft constraints. Socio Econ. Plan. Sci. 30:183–193, 1996.

    Article  Google Scholar 

  7. 7.

    Burke, E.K., De Causmaecker, P., Vanden Berghe, G., Novel meta-heuristic approaches to nurse rostering problems in belgian hospitals. Handb. Sched. algorithm. model. Perform. Anal. 18:1–44, 2004.

    Google Scholar 

  8. 8.

    Burke, E.K., De Causmaecker, P., Petrovic, S., Vanden Berghe, G., Metaheuristics for handling time interval coverage constraint in nurse scheduling. Appl. Artif. Intell. 20:743–766, 2006.

    Article  Google Scholar 

  9. 9.

    Burke, E.K., Curtois, T., Qu, R., Vanden Berghe, G., A scatter search methodology for the nurse rostering problem. J. Oper. Res. Soc. 61:1667–1679, 2010.

    Article  Google Scholar 

  10. 10.

    Clark, A.R., and Walker, H., Nurse rescheduling with shift preferences and minimal disruption. J. Appl. Oper. Res. 3:148–162, 2011.

    Google Scholar 

  11. 11.

    Dowsland, K.A., and Thompson, J.M., Solving a nurse scheduling problem with knapsacks, networks and tabu search. J. Oper. Res. Soc. 51:825–833, 2000.

    Article  MATH  Google Scholar 

  12. 12.

    Ferland, J.A., Berrada, I., Nabli, I., Ahiod, B., Michelon, P., Gascon, V., Gagné, E., Generalized assignment type goal programming problem: Application to nurse scheduling. J. Heuristics 7:391–413, 2001.

    Article  MATH  Google Scholar 

  13. 13.

    Glover, F., and Laguna, M., Tabu Search. Boston: Kluwer Academic Publishers, 1997.

    Google Scholar 

  14. 14.

    IBM Ilog cplex optimization studio (2014).

  15. 15.

    Kellogg, D.L., and Walczak, S., Nurse scheduling: from academia to implementation or not Interfaces 37(4):355–369, 2007.

    Article  Google Scholar 

  16. 16.

    Maenhout, B., and Vanhoucke, M., New computational results for the nurse scheduling problem: a scatter search algorithm. In: Evolutionary Computation in Combinatorial Optimization, pp. 159–170: Springer, 2006.

  17. 17.

    Maenhout, B., and Vanhoucke, M., An electromagnetic meta-heuristic for the nurse scheduling problem. J. Heuristics 13:359–385, 2007.

    Article  Google Scholar 

  18. 18.

    Valouxis, C., and Housos, E., Hybrid optimization techniques for the workshift and rest assignment of nursing personnel. Artif. Intell. Med. 20:155–175, 2000.

    Article  Google Scholar 

  19. 19.

    Van den Bergh, J., Jeroen, B., Bruecker Philippe, D., Erik, D., Boeck Liesje, D., Personnel scheduling: A literature review. Eur. J. Oper. Res. 226:367–385, 2013.

    Article  MATH  Google Scholar 

  20. 20.

    Welton, J.M., Fisher, M.H., DeGrace, S., Zone-Smith, L., Hospital nursing costs, billing, and reimbursement. Nurs. Econ. 24:239–45, 2006.

    Google Scholar 

  21. 21.

    Wong, T., Xu, M., Chin, K., A two-stage heuristic approach for nurse scheduling problem: A case study in an emergency department. Comput. Oper. Res. 51:99–110, 2014.

    Article  MathSciNet  Google Scholar 

  22. 22.

    Yilmaz, E., A mathematical programming model for scheduling of nurses’ labor shifts. J. Med. Syst. 36(2): 491–496 , 2012.

    Article  Google Scholar 

Download references

Author information



Corresponding author

Correspondence to Antoine Legrain.

Additional information

Conflict of interests

The authors declare that they have no conflict of interest.

This article is part of the Topical Collection on Systems-Level Quality Improvement


Appendix: A Mathematical model

This section presents in detail the mathematical model.

We define the following sets.

N :

set of nurses considered;

N R N :

set of head nurses;

J :

set of days in the period (28 days with j = 1 referring to a Sunday);

K :

set of 8-hour shifts for each day: Night, Day and Evening.

We use the following parameters.

f i j :

typical schedule of nurse i for each day j: 0 (no work) and +1 (work) ;

A i :

matrix of days-off for nurse i (a i j =0 for work or +1 for a day-off on day j);

\(\bar {A} = \mathbb {1}-A\),:

(complementary matrix of A);

p i j :

preferences of nurse i expressed as −1 (no work), 0 (no preference), and +1 (work) for each day

j :

(preferences are related to days, not shifts);

D j k :

quota requirement for nurses for day j and shift k;

Q i k :

available shift k for nurse i (=1 if the shift is available, 0 otherwise);

T :

maximum number of days worked by a nurse in one week;

m i :

length of final work sequence in previous period for nurse i.

We introduce the following parameter costs.

c + :

cost of over-covering;

c :

cost of under-covering;

β i :

cost of not satisfying a preference for nurse i;

γ i k :

cost of switching assignment;

r i :

benefit from satisfying typical schedule for nurse i (aggregation of seniority, experience, skills, etc.).

To determine the most accurate value for these parameters, we have used the scheduler’s insight and his personal judgment when developing the schedules to evaluate the priorities between the objectives.

The decision variables are as follows.

x i j k :

1 if nurse i is assigned shift k on day j and 0 otherwise;

\(z_{jk}^{+}\) :

Over-coverage of day j in shift k;

\(z_{jk}^{-}\) :

Under-coverage of day j in shift k;

\(y_{ijk}^{+}\) :

auxiliary variable, positive part of \(((\bar {a}_{ij} x_{ijk} -\bar {a}_{ij+1} x_{ij+1,k})\);

\(y_{ijk}^{-}\) :

auxiliary variable, negative part of \((\bar {a}_{ij} x_{ijk} -\bar {a}_{ij+1} x_{ij+1,k})\).

We present the model using the three types of constraints: quota requirement, work rules and alternating shifts.

$$ \sum\limits_{i \in N_{R}} x_{ijDay} \geq 1, \qquad \forall j \in J $$

Constraints (1) ensure that at least one head nurse is present during day shifts.

$$\begin{array}{@{}rcl@{}} z_{jk}^{+} \geq \sum\limits_{i \in N} \bar{a}_{ij} x_{ijk} - D_{jk} &\qquad \forall j \in J,\forall k\in K & \end{array} $$
$$\begin{array}{@{}rcl@{}} z_{jk}^{-} \geq D_{jk} - \sum\limits_{i \in N} \bar{a}_{ij} x_{ijk} &\qquad \forall j \in J,\forall k \in K & \end{array} $$

Constraints (2) and (3) measure the over-coverage and the under-coverage (the gap between the quota requirement and the actual workforce); the days off are not taken into account (\(\bar {a}_{ij} = 0\)).

$$ x_{\textit{ijk}} \leq Q_{\textit{ik}}, \qquad \forall i \in N,\forall j \in J,\forall k \in K $$

Constraints (4) ensure that nurses are assigned only to shifts that they are allowed to work.

$$\begin{array}{@{}rcl@{}} \sum\limits_{k \in K} x_{\textit{ijk}} = 1, &\; \forall i \in N,\forall j \in J & \end{array} $$
$$\begin{array}{@{}rcl@{}} x_{\textit{ijDay}} + x_{\textit{ij}+1\textit{Night}} \leq 1,&\; \forall i \in N,\forall j=1,...,27 & \end{array} $$
$$\begin{array}{@{}rcl@{}} x_{\textit{ijEvening}} + x_{\textit{ij}+1\textit{Night}} + x_{\textit{ij}+1\textit{Day}} \leq 1, &\; \forall i \in N,\forall j=1,...,27 & \end{array} $$

Constraints (5) ensure that each nurse works at most one shift per day; constraints (6) and (7) impose a minimum break between two shifts.

$$\begin{array}{@{}rcl@{}} \sum\limits_{j=b}^{b+6} \sum\limits_{k \in K} x_{\textit{ijk}} \leq T, &\; \forall i \in N, b=1,8,15,22 & \end{array} $$
$$\begin{array}{@{}rcl@{}} \sum\limits_{j=b}^{b+5} \sum\limits_{k \in K} x_{\textit{ijk}} \leq T, &\; \forall i \in N, b=6,...,23 & \end{array} $$
$$\begin{array}{@{}rcl@{}} \sum\limits_{j=b}^{b+5-m_{i}} \sum\limits_{k \in K} x_{\textit{ijk}} \leq T-m_{i}, &\; \forall i \in N,\forall i \in N, b=1,...,5 & \end{array} $$

Constraints (8) ensure the maximum number of work days in one week. Constraints (9) set the maximum number of work days to T during six consecutive days while constraints (10) ensure the same rules for the beginning of the month (we take into account the number of work days at the end of the last month).

$$ \sum\limits_{j=b}^{b+13} \sum\limits_{k \in K} x_{\textit{ijk}} \leq \sum\limits_{j=b}^{b+13} f_{\textit{ij}}, \qquad \forall i \in N, b=1,15 $$

Constraints (11) ensure nurses to work in two weeks exactly the same number of shifts than in their typical schedule.

$$ \sum\limits_{k \in K} x_{\textit{ijk}} = f_{\textit{ij}}, \qquad \forall i \in N, j=1,7,8,14,15,21,22,28 $$

Constraints (12) ensure they work only the weekend assigned in their typical schedule. Finally to consider days-off, constraints (13) set x i j k =1 for one shift for a day off. Even if these constraints seem to assign a shift to the nurse, we consider it to be a dummy shift to keep using the same model. This shift will can therefore be counted in the previous constraints such as the collective agreements that assign T shifts per nurse per week. One can refer to constraints (2) and (3) to understand these dummy shifts are not considered in the covering constraints.

$$ \sum\limits_{k \in K} x_{\textit{ijk}} = 1, \qquad \forall (i,j) \in \{(i,j)|i \in N, j \in J, a_{\textit{ij}}=1\} $$
$$ y_{\textit{ijk}}^{+} - y_{\textit{ijk}}^{-} =\bar{a}_{\textit{ij}} x_{\textit{ijk}} - \bar{a}_{\textit{ij}+1}x_{\textit{ij}+1,k}, \quad \forall i \in N, j=1, ...,27, \forall k \in K $$

Constraints (14) define the variables \(y^{+}_{ijk}\) and \(y^{-}_{ijk}\). \(y^{+}_{ijk} - y^{-}_{ijk}\) is equal to 1 or -1 if the nurse i does not work on the same shift the day j and j+1. We have added this variable since we need to minimize the number of alternating shifts.

$$\begin{array}{@{}rcl@{}} &&\min \sum\limits_{j = 1}^{27} \sum\limits_{i \in N} \sum\limits_{k\in K} \gamma_{\textit{ik}}* (y_{\textit{ijk}}^{+} + y_{\textit{ijk}}^{-}) \\ &&{\kern15pt} + \sum\limits_{j \in J} \sum\limits_{k\in K} [c^{+} (z_{\textit{jk}}^{+})^{2} + c^{-} (z_{jk}^{-})^{2} \\ &&{\kern15pt} - \sum\limits_{i \in N} (\beta_{i} p_{\textit{ij}} x_{\textit{ijk}} - r_{i} f_{\textit{ij}} x_{\textit{ijk}})] \end{array} $$

subject to:

$$\begin{array}{@{}rcl@{}} \text{Constraints}&& \; (1) - (14) \\ x_{\textit{ijk}} \in \{0,1\}&&\; \forall i \in N,\forall j \in J,\forall k \in K \end{array} $$
$$\begin{array}{@{}rcl@{}} z_{\textit{jk}}^{+}, z_{\textit{jk}}^{-} \in \mathrm{R^{+}}&&\; \forall j \in J,\forall k \in K \end{array} $$
$$\begin{array}{@{}rcl@{}} y_{\textit{ijk}}^{+}, y_{\textit{ijk}}^{-} \in \mathrm{R^{+}}&& \;\forall i\in N, \forall j=1,...,27, \forall k \in K \end{array} $$

The objective function (15) has three terms. The first specifies that rotation from one shift to another is minimized. The second is a quadratic term that imposes a rapidly increasing penalty as the solution deviates from the quota requirements; it will try to avoid situations where, for example, there is one over-coverage of two nurses instead of two over-coverages of one nurse. The third ensures that the preferences are maximized and equity is respected. Finally constraints (16), (17), and (18) ensure that the relevant variables are binary or nonnegative.

This model reflects exactly the problem for the regular team. For the float team, γ i k =0 since nurses do not rotate over shifts and constraints (1) is removed since no head nurse is mandatory. As there is no rotation, the model of the float team can be solved separately for each shift.

B Heuristic

This section presents heuristics for the regular team and the float team problems. Algorithm 1 presents the heuristic for the regular team. The initial schedule should contain the preferences and days-off. To balance the deficit between shifts, we calculate a score using the following formula:

$$\begin{array}{@{}rcl@{}} \textit{SCORE}&=& |G_{\textit{Night}}-G_{\textit{Day}} |+|G_{\textit{Night}}-G_{\textit{Evening}} |\\ &&+|G_{\textit{Day}}-G_{\textit{Evening}}| \end{array} $$

where G s h i f t represents the monthly gap between the quota and the number of nurses assigned to a shift. Using this score, flip movements as illustrated in Fig. 4 are performed first for the nurses eligible to shift rotation and then the set of nurses in general. Compared to the current approach used by the scheduler, the algorithm reproduces the same movements in a larger neighborhood. The flip movements are performed not in a one-week period but with the whole horizon, for all nurses with a fixed schedule (such as head nurses), and are restrained to two weeks due to a hard constraint on number of days worked every 14 days. These movements are very performant and are used in most heuristic methods when applied to large scale problems.


Algorithm 2 presents the heuristic developed for the float team. It uses permutations to minimize the objective function. A permutation \(\pi _{j_{1},j_{2}}^{i}\) permutes days j 1 and j 2 for nurse i. π i represents the set of authorized permutations.


A permutation \(\pi _{j_{1},j_{2}}^{i}\) is authorized if it respects \(x_{j1}^{i} + x_{j2}^{i} = 1\) as well as the load to be assigned (8)–(11), and is similar to the flip movement illustrated in Fig. 4. Once again, shifts can be moved only within a two-week period, from a non-working shift to a working shift. The idea behind heuristic is to keep the same movement that the clerk is currently making. We just evaluate each movement quantitatively; that is why our heuristic performs well on measurable objectives.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Legrain, A., Bouarab, H. & Lahrichi, N. The Nurse Scheduling Problem in Real-Life. J Med Syst 39, 160 (2015).

Download citation


  • Health service
  • Scheduling
  • Manpower planning
  • Optimization