Solver as a Service
Sign Up Now →Sign Up Now

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.

Previewproblem type inrc2manifest 1.0

Objectives#

What the solver optimizes. Enabled objectives are weighed together.

ObjectiveWhat it meansDirectionOn by defaultWeight
INRC-II total cost
minimize_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.Yes1.0

Constraints#

A hard constraint must hold or the problem is infeasible; a soft one adds a penalty when broken.

ConstraintWhat it requiresKindOn by default
H1 Single assignment per day
single_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.eligibilityYes
H4 Skill matching
skill_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.eligibilityYes
H2 Under-staffing
min_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.hardYes
H3 Forbidden shift type successions
shift_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.hardYes
S1 Insufficient staffing for optimal coverage
optimal_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.softYes
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.softYes
S2 Consecutive days off
consecutive_days_off
softYes
S4 Complete week-end
complete_weekends
"Nurses with complete weekend value set to true must work both week-end days or none."softYes
S6 Total working week-ends
max_weekends_worked
Distinct weekends worked against each nurse's own contract. Counting distinct weekends rather than weekend shifts is the point.softYes
S5 Total assignments (minimum)
min_total_assignments
softYes
S5 Total assignments (maximum)
max_total_assignments
softYes
S3 Preferences
shift_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.softYes
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.softYes