The Situation
It is a Sunday afternoon in January in a small New Hampshire town.
The medical director of a six-physician emergency group, who also works the day shifts Monday through Thursday, takes a call from Physician 1. An out-of-state family emergency requires an immediate flight. Physician 1 will miss all of next week.
The department runs single-physician coverage around the clock in three eight-hour blocks:
- Day: 7:00 a.m. – 3:00 p.m.
- Evening: 3:00 p.m. – 11:00 p.m.
- Night: 11:00 p.m. – 7:00 a.m.
Physician 1’s absence blows four holes in a schedule that was published a month ago and that five families have planned around: Monday night, Tuesday night, Wednesday night, and the Saturday day shift.
On paper, the fix looks like basic arithmetic. Four open shifts divided among five working doctors works out to less than one extra shift each. But when the director opens the hospital scheduling module and tries a swap, the logic used to schedule shifts identifies conflicts.
Fast forward to 9:00 p.m. The director is still staring at a spreadsheet, trapped in a mathematical dead end.
Where Calendars Collide
The arithmetic fails because a published schedule is not a blank canvas. Each doctor already has shifts on the books, mandatory recovery clocks running, and family commitments that keep the group functioning.
Testing the five available physicians against the four vacant shifts creates twenty possible pairings. Sixteen fail before personal preferences even enter the equation:
- The director works days Monday through Thursday. Taking Monday, Tuesday, or Wednesday night leaves only eight hours of rest before or after a day shift. The director is eligible only for Saturday day.
- Physician 2 finishes a three-night block at 7:00 a.m. Monday. Mandatory recovery rules out Monday and Tuesday nights. Physician 2 can work Wednesday night, which links into scheduled Thursday and Friday night shifts, but cannot work Saturday day because the Friday night shift ends at 7:00 a.m. Saturday.
- Physician 3 works evenings Monday through Wednesday. Taking a night shift directly after an evening means sixteen consecutive hours on duty. Physician 3 is out for all three weeknights, leaving only Saturday day open.
- Physician 4 is off Monday through Wednesday. With Physician 3 working evenings, Physician 4 taking those nights leaves their children home alone between 3:00 p.m. and 11:00 p.m. Physician 4 is out for all three nights. Saturday day is also blocked, because Physician 4 already has a Saturday night shift starting eight hours later.
- Physician 5 is free Monday through Wednesday and works evenings Thursday through Sunday. Physician 5 can take Monday night, since rest ends at 7:00 a.m. Thursday. Taking Tuesday or Wednesday night pushes recovery past the start of Thursday evening. Saturday day is blocked by the winter morning rule and an existing Saturday evening shift.
In this scenario, there is no “workable” solution. Taking inventory of each physician’s availability equates to one candidate for Monday night, one for Wednesday night, two for Saturday day.
Tuesday night has zero.
The Collision Card
| Physician | Status in week 2 | Nights Monday to Wednesday | Saturday day |
|---|---|---|---|
| Medical director | Days Monday through Thursday | Out: an 11 p.m. start leaves eight hours of rest | Eligible |
| Physician 2 | Finished a three-night block at 7 a.m. Monday | Monday and Tuesday out, since recovery runs to 7 a.m. Wednesday; Wednesday eligible, joining that physician's own Thursday and Friday nights as a three-night block | Out: a Friday night shift ends at 7 a.m. Saturday |
| Physician 3 | Evenings Monday through Wednesday | Out: a night straight after an evening is sixteen continuous hours | Eligible |
| Physician 4 | Free Monday through Wednesday | Out: with Physician 3 on evenings, their children would be alone between Physician 4 leaving and Physician 3 returning | Out: already works Saturday night, eight hours after a day shift would end |
| Physician 5 | Free Monday through Wednesday, evenings Thursday through Sunday | Monday eligible, since recovery ends at 7 a.m. Thursday; Tuesday and Wednesday out, because either pushes recovery past a 3 p.m. Thursday evening shift | Out: the winter 7 a.m. rule, and already works Saturday evening |
The Constraints
The rules that decide this week are human ones, and none of them live in a policy manual.
Physicians 3 and 4 are married with school-age kids. One of them is home every evening and night between 3:00 p.m. and 7:00 a.m. Nobody in the group has ever broken that rule. Physician 5 lives forty-five minutes out on a back road and never gets a 7:00 a.m. start between December and March. In a single-coverage ER, the night doctor cannot leave until relief walks through the door, and a snowbound car turns an eight-hour night shift into a ten-hour slog for someone else. Extra shifts get offered by phone in an unwritten order, and whoever said yes most recently gets asked last.
The softer agreements carry a cost when they crack. Each physician is contracted for seven shifts per two-week block. An eighth shift costs extra-shift pay and burns through goodwill. The group prefers to rotate forward from days to evenings to nights, which is easier on sleep than rotating backward, and nobody works more than three evenings in a row.
The real headache is six people trying to figure out who has to break a promise to keep the doors open.
The Constraint Card
| Constraint | Type | Source | Cost of violation |
|---|---|---|---|
| One emergency physician on site at all hours | Hard | Law and regulation (context) | Regulatory exposure, patient safety risk, ambulance diversion |
| One physician per shift, no overlaps | Hard | Physics | Impossible to execute |
| 16 hours off between shifts | Hard | Policy | Fatigue-related error risk, breach of group policy |
| 48 hours off after the last night of a block | Hard | Policy | Circadian strain, error risk, breach of group policy |
| 7 shifts per physician per two-week block | Soft | Policy (contract) | Extra-shift pay, accumulated fatigue, goodwill |
| Forward rotation, from days to evenings to nights | Soft | Culture (physician preference) | Poorer sleep recovery |
| No more than 3 consecutive evenings | Soft | Culture | Lost family evenings, morale |
| Married pair: one parent home 3 p.m. to 7 a.m. | Hidden | Culture | Childcare failure, quiet refusal of the schedule |
| No 7 a.m. winter starts for the distant physician | Hidden | Physics and culture | Late handoff, night physician held over |
| Extra shifts offered in an unwritten order | Hidden | Culture | Perceived unfairness, the same people always saying yes |
How an Optimization Solver Sees It
A constraint solver works through the week the same way the director did on Sunday evening, only it checks every combination without missing one. It spots that Tuesday night is an empty set and moves straight to the ripple effects.
The solver lays the workable repairs side by side, showing the exact trade-offs: overtime costs, backward circadian rotations, and disrupted plans.
The choice between them stays with the director.
What the Software Cannot Decide
The hardest judgment sits upstream of the schedule: whether the married pair’s rule should be written down at all.
Encoding it means the system holds a private fact about a family's childcare. Leaving it out means the system keeps proposing schedules that people will reject. Putting it in writing also exposes that colleagues without that protection absorb more nights, and the group has to confront whether it accepts that arrangement in the open.
The commute rule brings the same friction. Does it stay a fixed winter ban or become a weather-dependent preference? If it flexes with the forecast, someone has to own the call on a January morning when the roads are clear.
Then there is the cost trade-off. Calling in an outside temp doctor costs a fortune and drops an unfamiliar face alone into a small emergency room in the middle of the night, which brings a whole different kind of risk.
If a storm or another absence wiped out every legal path, someone in authority would have to break the forty-eight-hour recovery rule by name, accepting that safety risk on the record. Software should never make that call.
The Question for the Reader
A schedule that has run for years usually carries at least one rule living only in the head of the person who builds it, like the married pair or the back-road commute here.
When a sudden absence leaves a slot that nobody can fill cleanly, how does your team decide whose week absorbs the second hit, and who signs off on that choice?
The Constraint Ledger arrives weekly with one real scheduling collision, worked through to the decisions that stay with people. Subscribe on Substack.
The Constraint Ledger is written by the team at Calgebra (calgebra.com), which builds scheduling optimization solutions.