Rostering (inrc2)
The Second International Nurse Rostering Competition (INRC-II), stated as a manifest rather than as code. This exists to answer one question honestly: how do we compare? Our own rostering.yaml carries weights chosen for a demo — 0.5 here, 0.3 there — so its soft score is in OUR units and cannot be set beside anyone else's number. The competition defines its objective exactly, and the finalists' scores are published against it. Scoring in those units is the only way a comparison means anything. It is also a test of the engine. If INRC-II can be expressed here without a line of Python, "manifest driven" is true; if it needs a special case, it is not. Every weight below is quoted from the specification (INRC2.pdf, section 3), not remembered.
Objectives#
What the solver optimizes. Enabled objectives are weighed together.
| Objective | What it means | Direction | On by default | Weight |
|---|---|---|---|---|
INRC-II total costminimize_total_cost | The competition ranks on the summed weighted soft-constraint cost. It is the soft band itself, so there is no separate term to compute. | Yes | 1.0 |
Constraints#
A hard constraint must hold or the problem is infeasible; a soft one adds a penalty when broken.
| Constraint | What it requires | Kind | On by default |
|---|---|---|---|
H1 Single assignment per daysingle_assignment_per_day | A nurse works at most one shift per day — she cannot be in two places at the same time. That is IMPOSSIBLE rather than merely disallowed, which is what makes it eligibility: the pair is removed from the domain, not penalised within it. An hours threshold is the other kind — uncomfortable, and perfectly possible — so it stays hard. | eligibility | Yes |
H4 Skill matchingskill_match | "A shift of a given skill must necessarily be fulfilled by a nurse having that skill." HARD, and enforced by nothing until now: the shifts carried the skill they require and the nurses carried the skills they hold, and no rule joined them. 227 of 601 assignments on n030w4 were illegal. | eligibility | Yes |
H2 Under-staffingmin_coverage | Minimum coverage per shift. HARD in INRC-II; the optimal target is a separate SOFT rule below, and conflating the two is what made an earlier loader report all three instances infeasible. | hard | Yes |
H3 Forbidden shift type successionsshift_succession | Declared HARD by the competition. Five of the six bans are incidentally caught by an 11-hour rest rule, which is what let the gap hide: Day then Early leaves 14 hours of rest and is forbidden anyway. | hard | Yes |
S1 Insufficient staffing for optimal coverageoptimal_coverage | "Each missing nurse is penalised according to the weight provided. Extra nurses above the optimal value are not considered in the cost." The second sentence matters: this is a floor, never a ceiling. | soft | Yes |
S2 Consecutive assignments (working days)consecutive_working_days | "Each extra or missing day is multiplied by the corresponding weight." Weight 30 for consecutive working days. | soft | Yes |
S2 Consecutive days offconsecutive_days_off | soft | Yes | |
S4 Complete week-endcomplete_weekends | "Nurses with complete weekend value set to true must work both week-end days or none." | soft | Yes |
S6 Total working week-endsmax_weekends_worked | Distinct weekends worked against each nurse's own contract. Counting distinct weekends rather than weekend shifts is the point. | soft | Yes |
S5 Total assignments (minimum)min_total_assignments | soft | Yes | |
S5 Total assignments (maximum)max_total_assignments | soft | Yes | |
S3 Preferencesshift_off_requests | Weight 10 in the specification. The weekly files carry per-nurse shift-off requests ('Any' expands to every type); the loader projects them to absolute (day, type) slots, and the allow-list complement makes the pair contract judge them: a slot the nurse asked off is simply not among the acceptable ones. | soft | Yes |
S2 Consecutive assignments (shift type)consecutive_shift_type | Weight 15 in the specification. Runs measured per SHIFT TYPE, each type judged against its OWN bounds (Night 3..5 where Day is 2..28), which is why the bounds ride on the groups rather than the rule. | soft | Yes |