FAILURE MAP
← Case archive

FA-68240 / Traffic signal timing plans / Member archive

Loop detector count and occupancy binning: occupied time is measured from vehicle arrival rather than bin start · case 05

Loop detector count and occupancy binning returns a wrong result when occupied time is measured from vehicle arrival rather than bin start.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input {interval s, bins, events: [[on, off]] seconds relative to period start (on may be negative), max_presence, no_activity}. A vehicle is counted in the bin of its on time if inside the period; occupied time is split across bins by overlap; occupancy percent is floor(occupied*100/interval). Status is 'stuck-on' if any presence lasts >= max_presence, 'no-activity' if there are no events and the period (bins*interval) is >= no_activity, else 'ok'. Return {counts, occ_pct, status}.

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
timing oracle 0{"counts": [1, 0, 0, 0], "occ_pct": [100, 200, 300, 400], "status": "stuck-on"}{"counts": [1, 0, 0, 0], "occ_pct": [100, 100, 100, 100], "status": "stuck-on"}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 ↗