An external CP-SAT solver solves the pinned scheduling instance under deterministic parameters. The model is pure feasibility, so the answer is one real schedule, decoded from the run's own solution values and displayed exactly as decoded.

highlighted = computed this step

Invocation

The invocation is cpsat_stream_solve solve employee_scheduling.jsonl --params num_search_workers:1,random_seed:1, with the solution values written to a temporary --sol file. Why: a single search worker and a fixed seed make the run deterministic, so the schedule quoted below is reproducible rather than anecdotal.

one worker, one seed, deterministic solve\text{one worker, one seed, deterministic solve}
Instance handed to the solverThe parsed dimensions are the solver's input; no schedule is shown yet.4 nurses, 3 days, 3 shifts, solver inputvaluenurses4days3shifts3booleans36coverage9at most one12load rules4min shifts2max shifts3

Solver result

The solver reports status OPTIMAL. Why: this model has no objective, so there is no objective value at all; OPTIMAL here means the solver proved this schedule feasible, and feasibility is the whole question. The output also carries timing, conflict, and branch counts; those fields are omitted here because they vary from run to run, and only the status and the solution values are deterministic.

status OPTIMAL, feasibility model\text{status OPTIMAL, feasibility model}
CP-SAT decoded scheduleOne row per nurse, one column per day; cells carry the shift label or the word off.decoded schedule, loads 2..3D1D2D3N1S3S2off2 shiftsN2S2S1S23 shiftsN3offS3S12 shiftsN4S1offS32 shifts

The decoded schedule

N1: S3 on D1, S2 on D2 and off on D3. N2: S2 on D1, S1 on D2 and S2 on D3. N3: off on D1, S3 on D2 and S1 on D3. N4: S1 on D1, off on D2 and S3 on D3. Why: these are the literal decoded solution values from the real solve, not a hand-picked example; the labels N1 through N4, D1 through D3, and S1 through S3 are the diagram's own labels.

decoded values, exactly as solved\text{decoded values, exactly as solved}
CP-SAT decoded scheduleOne row per nurse, one column per day; cells carry the shift label or the word off.decoded schedule, loads 2..3D1D2D3N1S3S2off2 shiftsN2S2S1S23 shiftsN3offS3S12 shiftsN4S1offS32 shifts

Diagram note

Each row is one nurse, N1 through N4, each column one day; a cell shows the shift label S1 through S3 or the word off, and the annotation at the end of each row is the derived load, recomputed from the schedule rather than authored. Pixel positions are rounded for layout; every number shown is exact.

one row per nurse, derived loads\text{one row per nurse, derived loads}
CP-SAT decoded scheduleOne row per nurse, one column per day; cells carry the shift label or the word off.decoded schedule, loads 2..3D1D2D3N1S3S2off2 shiftsN2S2S1S23 shiftsN3offS3S12 shiftsN4S1offS32 shifts