FA-67760 / Elevator dispatch scheduling / Member archive
Traffic pattern detection with hysteresis: percentage arithmetic · case 05
The up-peak share is always 0 or 100 percent, or rounds up across the threshold.
Case contract
Per 5-minute window, total = lobby_up + other_up + down. up% = lobby_up*100//total and down% = to_lobby*100//total (0 if total is 0). An active peak ends when its percentage falls below 40 or total < 10. From interfloor (including just after a peak ended) a window with total >= 10 enters up-peak at up% >= 60, else down-peak at down% >= 60. Output the mode per window.
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: quiet window ends a peak | ["interfloor", "interfloor"] | ["up-peak", "interfloor"] | 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 ↗