FA-67730 / Elevator dispatch scheduling / Member archive
Double-deck car stop planning: shaft reach limits · case 05
Stops are planned where one of the decks would leave the shaft.
Case contract
A double-deck car has a lower deck and an upper deck one floor above it; the car position is the lower deck floor. With lower_odd the lower deck serves odd destinations and the upper deck even ones (reversed otherwise). A destination served by the upper deck needs car position dest-1. Positions must lie in 1..top-1 (the lower deck never reaches the top floor); unreachable destinations are rejected. Return sorted unique stop positions, deck per destination and rejected destinations in input order.
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: top floor by the lower deck | {"deck_of": {"21": "lower"}, "rejected": [], "stops": [21]} | {"deck_of": {}, "rejected": [21], "stops": []} | 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 ↗