Bake-Ops — the vacation problem
A bakery is about to close for two weeks. Everything on the shelf keeps selling until the door shuts, then nothing gets made until it opens again. What has to come out of the oven first — and how much? Move the sliders.
Bake nothing and 32 lines hit zero before you reopen — the earliest on day 0.
The rule: bake enough to do two things at once — don’t run out while the doors are shut, and come back to at least half of each flavor’s floor. Whichever need is larger sets the bake, rounded up to a whole batch. Reopening to an empty shelf is its own failure: you have nothing to sell while the first batch cures.
Working model of a live system. The arithmetic is lifted from bake_forecast() on the bakery’s Raspberry Pi, unchanged — including the two-block recency weighting where the last 14 days count double, the half-unit deadband, and lines with no measurable demand dropping out entirely rather than showing as zero. The sales history, stock levels and floors here are synthetic. Real product velocities are commercially revealing and stay on the Pi.