FA-67739 / Elevator dispatch scheduling / Member archive
Hospital code blue car selection: away cost · case 04
A car moving away is judged as close as a car heading to the call.
Case contract
Only cars in normal mode can answer a code blue at floor call. An idle car or one moving towards (or at) the call floor costs the floor distance. A car moving away first runs to its turn floor (the extreme of its calls and its floor in its direction) and back: |turn-floor| + |turn-call|. Lowest cost wins, ties to the lowest id. The winner cancels its car calls (reported sorted) and announces if it carries passengers.
Why this case matters
Lift group controllers make these decisions many times per minute; a wrong answer strands passengers, wastes trips or overrides a safety rule.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: car moving down away | {"announce": false, "cancelled_calls": [1, 6], "car": "H1"} | {"announce": false, "cancelled_calls": [], "car": "H2"} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗