FAILURE MAP
← Case archive

FA-68257 / Traffic signal timing plans / Member archive

Loop detector count and occupancy binning: vehicles present before period start are counted in the last bin · case 02

Loop detector count and occupancy binning returns a wrong result when vehicles present before period start are counted in the last bin.

Member previewVariant 2 · 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 1{"counts": [1, 2], "occ_pct": [8, 6], "status": "ok"}{"counts": [1, 1], "occ_pct": [8, 6], "status": "ok"}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 ↗