FA-92938 / EV charging session scheduling / Member archive
Shared circuit current allocation: equal share rounding · case 03
The sum of commanded currents exceeds the circuit breaker limit.
Case contract
evs is a list of [id, max_a, priority]. An EV with max_a < 6 cannot be served. Eligible EVs are ordered by priority descending then id; each is admitted while 6*(admitted+1) <= limit_a. Admitted EVs are water-filled: repeatedly give floor(remaining/open) amps, fixing EVs whose max_a <= share at their max. Leftover amps go one each in admission order to EVs below max. Return [[id, amps]] for every EV sorted by id (0 = paused).
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: equal share rounding | [["EV0", 10], ["EV1", 10], ["EV2", 10], ["EV3", 10], ["EV4", 10]] | [["EV0", 9], ["EV1", 9], ["EV2", 10], ["EV3", 10], ["EV4", 10]] | 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 ↗