FAILURE MAP
← Case archive

FA-92859 / EV charging session scheduling / Member archive

Time-of-use cheapest slot plan: partial final slot · case 04

The plan delivers more energy than requested and bills the overshoot.

Member previewVariant 4 · 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
boundary: departure beyond tariff horizon[[[1, 1850], [2, 1850], [3, 1850]], 74000, -550][[[1, 1850], [2, 1850], [3, 1300]], 63000, 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 ↗