FAILURE MAP
← Case archive

FA-68064 / Traffic signal timing plans / Member archive

Shortway offset transition: shortening cycles are counted against the lengthening distance · case 04

Shortway offset transition returns a wrong result when shortening cycles are counted against the lengthening distance.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Input {cycle, current_offset, target_offset, lengthen_pct, shorten_pct}. The needed correction e = (target - current) mod cycle can be made by lengthening cycles by a total of e or shortening them by cycle - e. Per-cycle limits are floor(cycle*pct/100). Choose the direction needing fewer cycles (ties lengthen) and front-load the maximum adjustment each cycle. Return the list of transition cycle lengths ([] when already in step).

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[93, 93, 93, 93, 81][72, 72, 72, 77]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 ↗