FA-68184 / Traffic signal timing plans / Member archive
Railroad preemption entry timing: pedestrian time and minimum green are added · case 04
Railroad preemption entry timing returns a wrong result when pedestrian time and minimum green are added.
Case contract
Input {state: green|yellow|red (red = all-red clearance), elapsed, min_green, preempt_min_green, yellow, red, fdw, ped: none|walk|fdw, ped_elapsed, ped_truncate, track_current}. If the track clearance phase is already green the answer is [0, 0]. In all-red the remaining red is timed; in yellow the remaining yellow and full red are timed. In green the hold is the larger of the remaining preempt minimum green (not the normal minimum) and the pedestrian time: walk is abandoned and FDW is timed in full, or skipped when ped_truncate; an active FDW completes its remainder unless truncated. Return [seconds until track clearance green, green hold].
Why this case matters
Signal timing arithmetic is exact and integer or rational; a wrong rule silently produces unsafe or inefficient timing plans.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| timing oracle 0 | [17, 13] | [13, 9] | 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 ↗