Skip to main content

Nurse Rostering

Parallel Machine Scheduling

Healthcare · Inpatient · Offline-op

Assigning weekly shifts to nursing staff, modeled as Pm||Cmax. Nurses are parallel machines, shifts are jobs, and the objective is to minimize the maximum workload across all nurses — ensuring balanced, fair rosters.

Where This Decision Fits

Healthcare sector decision chain

Strategic Planning Capacity & budgets
Staff Planning Nurse rostering
Patient Flow Admissions & scheduling
Supply Chain Pharmacy & equipment

The Problem

Mapping nurse rostering to parallel machine scheduling

A hospital ward must assign a set of shifts across a 7-day week to a pool of nurses. Each shift has an acuity load (effective hours weighted by patient complexity). The goal is to minimize the maximum total workload (Cmax) across all nurses, ensuring no single nurse is overloaded while others remain underutilized. Additional constraints limit maximum shifts per nurse and prohibit back-to-back shifts.

Healthcare Domain Scheduling Element Example
Nurse Machine (parallel) Nurse Alvarez, Senior ICU
Shift Job Day 3 Night Shift (10h)
Acuity hours Processing time (pj) Night = 12h weighted load
Max shifts / nurse Machine capacity constraint ≤ 5 shifts per 7-day cycle
Balanced workload Objective: min Cmax Most-loaded nurse’s total
$$P_m \,\|\, C_{\max} \quad\text{with}\quad |S(i)| \leq K \;\;\forall i$$

This slice of the problem is NP-hard (strongly for $m \geq 3$ machines; reduces from PARTITION). LPT is a $\tfrac{4}{3} - \tfrac{1}{3m}$-approximation (Graham, 1969). For theory, see the Scheduling family.

But: Pm  Cmax is a simplification. It captures workload balance across nurses but ignores the structure that defines real nurse rostering — shift types (morning / evening / night), skill matching, legal rest, coverage by time-of-day, weekend patterns, and preferences. The full problem is the Nurse Rostering Problem (NRP), an ILP/CSP surveyed by Burke et al. (2004), Ernst et al. (2004), and Van den Bergh et al. (2013). See the next section.

The Canonical NRP Formulation

What the healthcare-OR literature actually solves

The Nurse Rostering Problem (NRP) is a Mixed-Integer Linear Program over a planning horizon (typically 4–6 weeks). Shift types, skill classes, legal rest, coverage requirements, and preference/fairness objectives all appear explicitly.

Sets & indices

SymbolMeaning
$i \in N$Nurse, with skill class $c(i) \in C$
$d \in D$Day in the planning horizon
$s \in S$Shift type (e.g., morning, evening, night)
$w \in W$Weekend index (Sat–Sun pair)

Parameters

SymbolMeaning
$r_{d,s,c}$Required nurses of skill class $c$ on day $d$, shift $s$ (coverage target)
$q_{i,s}$$1$ if nurse $i$ is qualified to work shift $s$, else $0$
$M_i$Maximum shifts nurse $i$ can work over the horizon
$L_i$Minimum shifts (contractual floor)
$\pi_{i,d,s}$Preference weight — $+1$ wants, $-1$ avoids, $0$ neutral
$h_{s,s'}$$1$ if shift $s$ on day $d$ followed by $s'$ on $d{+}1$ violates rest, else $0$

Decision variables

Primary assignment · binary
$$x_{i,d,s} \in \{0,1\}, \quad x_{i,d,s} = 1 \;\text{iff nurse } i \text{ works shift } s \text{ on day } d$$
Auxiliary · soft-violation slacks
$$u_{d,s,c} \geq 0 \;\text{(understaffing)}, \quad v_i \geq 0 \;\text{(workload deviation)}, \quad f_i \geq 0 \;\text{(preference penalty)}$$

Objective

Weighted soft-constraint violation · minimize
$$\min \; \omega_{u}\!\!\sum_{d,s,c} u_{d,s,c} \;+\; \omega_{v}\!\!\sum_i v_i \;+\; \omega_{f}\!\!\sum_i f_i$$

Hard constraints

Coverage (with soft understaffing)
$$\sum_{i : c(i)=c} x_{i,d,s} \;+\; u_{d,s,c} \;\geq\; r_{d,s,c} \quad \forall\, d,\,s,\,c$$
One shift per day
$$\sum_{s \in S} x_{i,d,s} \;\leq\; 1 \quad \forall\, i,\,d$$
Skill eligibility
$$x_{i,d,s} \;\leq\; q_{i,s} \quad \forall\, i,\,d,\,s$$
Workload bounds
$$L_i \;\leq\; \sum_{d,s} x_{i,d,s} \;\leq\; M_i \quad \forall\, i$$
Rest between consecutive days (e.g., no night → morning)
$$x_{i,d,s} + x_{i,d+1,s'} \;\leq\; 1 \quad \forall\, i,\,d,\,(s,s') : h_{s,s'}=1$$
Maximum consecutive working days (example: at most $k$ of any $k{+}1$)
$$\sum_{\tau=d}^{d+k}\!\sum_{s} x_{i,\tau,s} \;\leq\; k \quad \forall\, i,\,d$$

Soft constraints (linked to objective slacks)

Workload fairness · deviation from target
$$\left|\;\sum_{d,s} x_{i,d,s} - T_i\;\right| \;\leq\; v_i \quad \forall\, i$$
Preference satisfaction
$$f_i \;\geq\; \sum_{d,s} \max\!\big(0,\; -\pi_{i,d,s}\cdot x_{i,d,s}\big) \quad \forall\, i$$

The resulting ILP is NP-hard (Burke et al., 2004) and typically solved with commercial MIP solvers for small wards, or with hybrid metaheuristics (tabu search, VNS, ILP + LNS) for large hospitals. Real deployments additionally model: weekend-block patterns, forbidden shift sequences, employment-contract personalization, and inter-ward sharing.

 Emergency-Department staff rostering with service leveling

A frontier extension relevant to ED operations: replace the deterministic coverage target $r_{d,s,c}$ with a service-level constraint tied to time-varying patient arrival intensity $\lambda(t)$. The staffing profile is sized so that the probability of a patient waiting more than some threshold $\tau$ is bounded below a target (e.g., 90% within 30 min). This couples rostering with queueing theory / simulation. See Erhard et al. (2018) for the physician-scheduling analogue and Brunner & Bard (2013) for the stochastic physician case.

Interactive Solver

Choose a scenario, review data, then solve and compare algorithms

Roster Builder

Phase 2 · Staff Planning

Solution Algorithms

Three approaches from scheduling theory

Key Insight

LPT (Longest Processing Time first) assigns the longest remaining shift to the least-loaded nurse. This single sorting step — processing shifts in descending order of acuity — dramatically improves workload balance compared to arbitrary assignment. Graham (1969) proved LPT achieves a 4/3 − 1/(3m) approximation ratio for Pm||Cmax.

LPT — Longest Processing Time

4/3-approximation · O(n log n) · Greedy

1

Sort Shifts Descending

Order all shifts by acuity load from highest to lowest. Night shifts (12h) come first, then morning (10h), then evening (9h).

2

Assign to Least-Loaded Nurse

For each shift in sorted order, assign it to the nurse with the smallest current total workload. If tied, assign to the nurse with fewer shifts.

3

Enforce Constraints

Skip any nurse who has reached max shifts or would create a back-to-back violation. Move to next least-loaded eligible nurse.

MULTIFIT — Binary Search + FFD

1.22-approximation · O(n log n · log(psum)) · Bin-Packing Reduction

1

Set Bounds

Lower bound L = ⌈total_acuity / m⌉. Upper bound U = max acuity shift + L. These bracket the optimal Cmax.

2

Binary Search on Target

Try mid = (L + U) / 2 as the target maximum load. Use First Fit Decreasing (FFD): sort shifts descending, assign each to the first nurse whose load + shift ≤ target.

3

Converge

If FFD fits all shifts into m nurses within target, tighten U = mid. Otherwise, loosen L = mid. Repeat until U − L < 0.5.

List Scheduling — Baseline

2 − 1/m approximation · O(n log m) · Greedy

1

Process in Given Order

Take shifts in their natural order (Day 1 Morning, Day 1 Evening, Day 1 Night, Day 2 Morning, …) without sorting.

2

Assign to Least-Loaded Nurse

Each shift goes to the nurse with the smallest current load (same greedy step as LPT, but input order differs).

3

No Pre-Processing

The lack of sorting means large shifts may appear late, causing imbalance. This baseline demonstrates why LPT’s sort step matters.

Real-World Complexity

Why hospital rostering goes far beyond Pm||Cmax

Labor Law Compliance

Working time directives mandate maximum weekly hours, minimum rest between shifts (e.g., 11h in the EU), and overtime caps. Violations incur legal penalties and endanger patient safety.

Skill & Certification Constraints

ICU, cardiac, pediatric, and general wards require specific certifications. A feasible roster must match skill supply to unit demand, not just balance hours.

Nurse Preferences

Preferred days off, shift-type preferences (no nights), seniority-based priority, and part-time contracts add soft constraints that affect retention and morale.

Fatigue & Safety

Consecutive night shifts increase error rates. Circadian disruption models penalize rapid rotation patterns. Research links fatigue to medication errors and patient falls.

Continuity of Care

Patients benefit from seeing the same nurse across shifts. Continuity constraints assign nurses to consistent patient groups, adding assignment dependencies across days.

References

Nurse rostering canon · Pm  Cmax scheduling theory · physician / ED extensions

Burke, E. K., De Causmaecker, P., Vanden Berghe, G., & Van Landeghem, H. (2004). Canonical survey “The state of the art of nurse rostering.” Journal of Scheduling, 7(6), 441–499. doi:10.1023/B:JOSH.0000046076.75950.0b — the reference point for this page; defines the NRP, its variants, and the solution-method landscape.
Ernst, A. T., Jiang, H., Krishnamoorthy, M., & Sier, D. (2004). Survey “Staff scheduling and rostering: A review of applications, methods and models.” European Journal of Operational Research, 153(1), 3–27. doi:10.1016/S0377-2217(03)00095-X — broader staff-scheduling review that frames nurse rostering within personnel OR.
De Causmaecker, P., & Vanden Berghe, G. (2011). Taxonomy “A categorisation of nurse rostering problems.” Journal of Scheduling, 14(1), 3–16. doi:10.1007/s10951-010-0211-z
Van den Bergh, J., Beliën, J., De Bruecker, P., Demeulemeester, E., & De Boeck, L. (2013). Survey “Personnel scheduling: A literature review.” European Journal of Operational Research, 226(3), 367–385. doi:10.1016/j.ejor.2012.11.029
Cheang, B., Li, H., Lim, A., & Rodrigues, B. (2003). Survey “Nurse rostering problems — a bibliographic survey.” European Journal of Operational Research, 151(3), 447–460. doi:10.1016/S0377-2217(03)00021-3
Rocha, M., Oliveira, J. F., & Carravilla, M. A. (2013). Applied “Cyclic staff scheduling: Optimization models for some real-life problems.” Journal of Scheduling, 16(2), 231–242. doi:10.1007/s10951-012-0299-4
Erhard, M., Schoenfelder, J., Fügener, A., & Brunner, J. O. (2018). Physician scheduling “State of the art in physician scheduling.” European Journal of Operational Research, 265(1), 1–18. doi:10.1016/j.ejor.2017.06.037 — the closest sibling survey; physician and ED-physician rostering share the NRP backbone but add on-call, specialization, and service-leveling.
Brunner, J. O., & Bard, J. F. (2013). Applied “Flexible weekly tour scheduling for postal service workers using a branch and price.” Journal of Scheduling, 16(1), 129–149. doi:10.1007/s10951-012-0288-7 — branch-and-price methodology applicable to ED physician tour scheduling with service-leveling.
Graham, R. L., Lawler, E. L., Lenstra, J. K., & Rinnooy Kan, A. H. G. (1979). Seminal “Optimization and approximation in deterministic sequencing and scheduling: A survey.” Annals of Discrete Mathematics, 5, 287–326. doi:10.1016/S0167-5060(08)70356-X — the scheduling-notation foundation; cited for the Pm  Cmax workload-balancing slice.
Hulshof, P. J. H., Kortbeek, N., Boucherie, R. J., Hans, E. W., & Bakker, P. J. M. (2012). Taxonomy “Taxonomic classification of planning decisions in health care: A structured review of the state of the art in OR/MS.” Health Systems, 1(2), 129–175. doi:10.1057/hs.2012.18 — positions nurse rostering at Inpatient × Offline-operational (staff-to-shift assignment).

Explore More Applications

View All Applications
All data on this page is illustrative and intended for educational purposes only. No real patient or employee data is used.
Healthcare