Minutes that late boats spent waiting, by cause. Every waiting minute of every boat is classified by replaying the schedule: is it night, is the lock closed or busy, is the chamber being turned, is the pool above too low, can any keeper reach the lock?
Close a lock for a while or hold a boat back, then press Re-plan. The page runs the same solver as solve.js (a shorter search, about 8 seconds) and checks the new plan with the same rules engine.
A canal climbs a hill in steps. Each flat stretch of water is a pool; a lock is a stone chamber with a gate at each end that joins one pool to the next one up.
Going up: the chamber must be low (level with the pool below). The boat sails in, the keeper shuts the gate and lets water in from the pool above; the boat floats up and sails out at the top. Going down is the reverse: the chamber must be high, and emptying it lets water out into the pool below.
If the chamber is at the wrong level, the keeper first has to fill or empty it with nobody inside: an empty turn. A chamber holds two narrowboats or one barge, so boats that travel together save whole lock cycles.
Water. Filling lock n takes a chamber-full out of the pool above it; emptying it pours that water into the pool below. A pool may never drop below its minimum, so going up sometimes means waiting while water is sent down from the summit, where a feeder stream adds water every minute. Full pools spill over a weir into the next pool down.
Keepers. Ada, Bert and Cass each work one lock at a time and have to walk the towpath between locks. With nine locks and three keepers, keepers are the scarcest thing on the canal.
Hours. Locks work 06:00–22:00 each day; an operation must start and finish inside those hours. Some locks close for maintenance.
Score. Each boat's lateness (minutes after its deadline) is multiplied by its priority (1–3) and added up: the weighted lateness. Less is better; water drawn breaks ties.
Keyboard: space play/pause, ←/→ step 5 minutes.