FAILURE MAP
← Case archive

FA-92868 / EV charging session scheduling / Member archive

Time-of-use cheapest slot plan: pre-horizon arrival clipping · case 03

A car that plugged in before the tariff horizon is planned into slots at the end of the day.

Member previewVariant 3 · 3 implementations · 7 checks per implementation

Case contract

prices[i] is the tariff in cents/kWh of 15-minute slot i. The car is present for slots arrive..depart-1 (depart exclusive) clipped to the tariff horizon; arrive may be negative. Each slot delivers at most max_w//4 Wh. Fill the cheapest slots first (equal price: earlier slot first), the last slot partially. Return [[slot, wh] sorted by slot, cost in millicents (sum wh*price), unmet wh]. need_wh<=0 or max_w<=0 returns [[], 0, max(need_wh,0)].

Why this case matters

Depot, workplace and public EV chargers schedule sessions against prices, circuit limits and departure deadlines; a wrong decision silently strands a driver or overloads a feeder.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: pre-horizon arrival clipping[[[-1, 1850], [0, 1850], [1, 1850], [3, 1450]], 121500, 0][[[0, 1850], [1, 1850], [2, 1450], [3, 1850]], 128750, 0]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 ↗