{"abstract":"Cars finish short of their target because charging starts too late.","category":"EV charging session scheduling","checks":7,"contract":"Minutes. The battery must receive need_wh; the charger draws rate_w at eff_pct percent efficiency, so duration = ceil(need_wh*6000/(rate_w*eff_pct)) minutes. Latest start = depart - buffer_min - duration, rounded down to a 15-minute boundary. If that is before now, start now with status 'late'. need_wh <= 0 returns [None, now, 'done']; rate_w or eff_pct <= 0 returns [None, None, 'no-power']. Return [start, finish, status].","evaluation_group":"w2-ev_charging_session_scheduling-ready-by-latest-start","failed_approach":"Ignoring efficiency altogether still underestimates duration below 100 percent.","family":"w2-ev_charging_session_scheduling-ready-by-latest-start-efficiency-direction","id":"FA-93036","implementations":{"attempt":{"sha256":"bc72f055c5bb2166d07c0fce586afee1c4c75dd93105db82bf630111ef671495","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(now, depart, need_wh, rate_w, eff_pct, buffer_min):\n    if need_wh <= 0:\n        return [None, now, 'done']\n    if rate_w <= 0 or eff_pct <= 0:\n        return [None, None, 'no-power']\n    dur = -(-need_wh * 60 // rate_w)\n    latest = depart - buffer_min - dur\n    latest -= latest % 15\n    if latest < now:\n        return [now, now + dur, 'late']\n    return [latest, latest + dur, 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [153, 434, 2000, 11000, 85, 30], [390, 403, 'ok']],\n  ['regression: efficiency direction (partial repair)', [387, 1026, 30000, 11000, 95, 30],\n   [810, 983, 'ok']],\n  ['control 1', [117, 637, 11000, 11000, 95, 10], [555, 619, 'ok']],\n  ['control 2', [448, 1142, 0, 3700, 85, 0], [None, 448, 'done']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [351, 1109, 18000, 3700, 95, 15], [780, 1088, 'ok']],\n  ['regression: efficiency direction (partial repair)', [153, 726, 30000, 3700, 85, 0],\n   [153, 726, 'late']],\n  ['control 1', [416, 1003, 5000, 0, 85, 15], [None, None, 'no-power']],\n  ['control 2', [221, 503, 5000, 0, 85, 30], [None, None, 'no-power']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [84, 334, 30000, 7400, 95, 30], [84, 341, 'late']],\n  ['regression: efficiency direction (partial repair)', [12, 862, 30000, 11000, 95, 15],\n   [660, 833, 'ok']],\n  ['control 1', [381, 632, 18000, 3700, 95, 30], [381, 689, 'late']],\n  ['control 2', [19, 584, 30000, 11000, 90, 15], [375, 557, 'ok']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [496, 868, 11000, 3700, 95, 30], [645, 833, 'ok']],\n  ['regression: efficiency direction (partial repair)', [342, 397, 18000, 11000, 95, 10],\n   [342, 446, 'late']],\n  ['control 1', [66, 229, 11000, 0, 90, 15], [None, None, 'no-power']],\n  ['control 2', [44, 377, 2000, 0, 100, 0], [None, None, 'no-power']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [522, 1168, 30000, 3700, 85, 30], [555, 1128, 'ok']],\n  ['regression: efficiency direction (partial repair)', [546, 1243, 11000, 7400, 85, 30],\n   [1095, 1200, 'ok']],\n  ['control 1', [342, 397, 18000, 11000, 95, 10], [342, 446, 'late']],\n  ['control 2', [577, 1400, 11000, 7400, 85, 15], [1275, 1380, 'ok']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"f97b8041385c614042761c0af114a9b1a0dd090f6fbe40fd21c36d856547f9d2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(now, depart, need_wh, rate_w, eff_pct, buffer_min):\n    if need_wh <= 0:\n        return [None, now, 'done']\n    if rate_w <= 0 or eff_pct <= 0:\n        return [None, None, 'no-power']\n    dur = -(-need_wh * 60 * eff_pct // (rate_w * 100))\n    latest = depart - buffer_min - dur\n    latest -= latest % 15\n    if latest < now:\n        return [now, now + dur, 'late']\n    return [latest, latest + dur, 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [153, 434, 2000, 11000, 85, 30], [390, 403, 'ok']],\n  ['regression: efficiency direction (partial repair)', [387, 1026, 30000, 11000, 95, 30],\n   [810, 983, 'ok']],\n  ['control 1', [117, 637, 11000, 11000, 95, 10], [555, 619, 'ok']],\n  ['control 2', [448, 1142, 0, 3700, 85, 0], [None, 448, 'done']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [351, 1109, 18000, 3700, 95, 15], [780, 1088, 'ok']],\n  ['regression: efficiency direction (partial repair)', [153, 726, 30000, 3700, 85, 0],\n   [153, 726, 'late']],\n  ['control 1', [416, 1003, 5000, 0, 85, 15], [None, None, 'no-power']],\n  ['control 2', [221, 503, 5000, 0, 85, 30], [None, None, 'no-power']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [84, 334, 30000, 7400, 95, 30], [84, 341, 'late']],\n  ['regression: efficiency direction (partial repair)', [12, 862, 30000, 11000, 95, 15],\n   [660, 833, 'ok']],\n  ['control 1', [381, 632, 18000, 3700, 95, 30], [381, 689, 'late']],\n  ['control 2', [19, 584, 30000, 11000, 90, 15], [375, 557, 'ok']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [496, 868, 11000, 3700, 95, 30], [645, 833, 'ok']],\n  ['regression: efficiency direction (partial repair)', [342, 397, 18000, 11000, 95, 10],\n   [342, 446, 'late']],\n  ['control 1', [66, 229, 11000, 0, 90, 15], [None, None, 'no-power']],\n  ['control 2', [44, 377, 2000, 0, 100, 0], [None, None, 'no-power']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [522, 1168, 30000, 3700, 85, 30], [555, 1128, 'ok']],\n  ['regression: efficiency direction (partial repair)', [546, 1243, 11000, 7400, 85, 30],\n   [1095, 1200, 'ok']],\n  ['control 1', [342, 397, 18000, 11000, 95, 10], [342, 446, 'late']],\n  ['control 2', [577, 1400, 11000, 7400, 85, 15], [1275, 1380, 'ok']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"7355d8749cbb056c92fd491eccfe20c2d4f4c79f14c8cf04159651dbe4b70243","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(now, depart, need_wh, rate_w, eff_pct, buffer_min):\n    if need_wh <= 0:\n        return [None, now, 'done']\n    if rate_w <= 0 or eff_pct <= 0:\n        return [None, None, 'no-power']\n    dur = -(-need_wh * 6000 // (rate_w * eff_pct))\n    latest = depart - buffer_min - dur\n    latest -= latest % 15\n    if latest < now:\n        return [now, now + dur, 'late']\n    return [latest, latest + dur, 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [153, 434, 2000, 11000, 85, 30], [390, 403, 'ok']],\n  ['regression: efficiency direction (partial repair)', [387, 1026, 30000, 11000, 95, 30],\n   [810, 983, 'ok']],\n  ['control 1', [117, 637, 11000, 11000, 95, 10], [555, 619, 'ok']],\n  ['control 2', [448, 1142, 0, 3700, 85, 0], [None, 448, 'done']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [351, 1109, 18000, 3700, 95, 15], [780, 1088, 'ok']],\n  ['regression: efficiency direction (partial repair)', [153, 726, 30000, 3700, 85, 0],\n   [153, 726, 'late']],\n  ['control 1', [416, 1003, 5000, 0, 85, 15], [None, None, 'no-power']],\n  ['control 2', [221, 503, 5000, 0, 85, 30], [None, None, 'no-power']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [84, 334, 30000, 7400, 95, 30], [84, 341, 'late']],\n  ['regression: efficiency direction (partial repair)', [12, 862, 30000, 11000, 95, 15],\n   [660, 833, 'ok']],\n  ['control 1', [381, 632, 18000, 3700, 95, 30], [381, 689, 'late']],\n  ['control 2', [19, 584, 30000, 11000, 90, 15], [375, 557, 'ok']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [496, 868, 11000, 3700, 95, 30], [645, 833, 'ok']],\n  ['regression: efficiency direction (partial repair)', [342, 397, 18000, 11000, 95, 10],\n   [342, 446, 'late']],\n  ['control 1', [66, 229, 11000, 0, 90, 15], [None, None, 'no-power']],\n  ['control 2', [44, 377, 2000, 0, 100, 0], [None, None, 'no-power']]],\n [['boundary: nothing to charge', [100, 400, 0, 0, 90, 10], [None, 100, 'done']],\n  ['boundary: latest start exactly now', [300, 390, 7400, 7400, 100, 0], [330, 390, 'ok']],\n  ['boundary: no charger power', [100, 400, 5000, 0, 90, 10], [None, None, 'no-power']],\n  ['regression: efficiency direction', [522, 1168, 30000, 3700, 85, 30], [555, 1128, 'ok']],\n  ['regression: efficiency direction (partial repair)', [546, 1243, 11000, 7400, 85, 30],\n   [1095, 1200, 'ok']],\n  ['control 1', [342, 397, 18000, 11000, 95, 10], [342, 446, 'late']],\n  ['control 2', [577, 1400, 11000, 7400, 85, 15], [1275, 1380, 'ok']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic stipulated toy contract for teaching; no claim of conformance with any standard, vendor protocol or production controller. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-ev_charging_session_scheduling-ready-by-latest-start-efficiency-direction","generated_at":"2026-09-29T14:51:51.418022+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","repair":"Divide by efficiency: duration = ceil(need*6000/(rate*eff)).","root_cause":"Charger efficiency multiplies the energy instead of dividing it, underestimating duration.","sha256":"ccdd0c4c608086f7013437c06c6871fc2a93eaec52a7052e14e08f7725f90e71","title":"Ready-by departure latest start: efficiency direction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.508,"exit_code":1,"observations":[{"actual":[null,100,"done"],"check":"boundary: nothing to charge","expected":[null,100,"done"],"passed":true},{"actual":[330,390,"ok"],"check":"boundary: latest start exactly now","expected":[330,390,"ok"],"passed":true},{"actual":[null,null,"no-power"],"check":"boundary: no charger power","expected":[null,null,"no-power"],"passed":true},{"actual":[390,401,"ok"],"check":"regression: efficiency direction","expected":[390,403,"ok"],"passed":false},{"actual":[825,989,"ok"],"check":"regression: efficiency direction (partial repair)","expected":[810,983,"ok"],"passed":false},{"actual":[555,615,"ok"],"check":"control 1","expected":[555,619,"ok"],"passed":false},{"actual":[null,448,"done"],"check":"control 2","expected":[null,448,"done"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: nothing to charge\", \"actual\": [null, 100, \"done\"], \"expected\": [null, 100, \"done\"], \"passed\": true}, {\"check\": \"boundary: latest start exactly now\", \"actual\": [330, 390, \"ok\"], \"expected\": [330, 390, \"ok\"], \"passed\": true}, {\"check\": \"boundary: no charger power\", \"actual\": [null, null, \"no-power\"], \"expected\": [null, null, \"no-power\"], \"passed\": true}, {\"check\": \"regression: efficiency direction\", \"actual\": [390, 401, \"ok\"], \"expected\": [390, 403, \"ok\"], \"passed\": false}, {\"check\": \"regression: efficiency direction (partial repair)\", \"actual\": [825, 989, \"ok\"], \"expected\": [810, 983, \"ok\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [555, 615, \"ok\"], \"expected\": [555, 619, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [null, 448, \"done\"], \"expected\": [null, 448, \"done\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.401,"exit_code":1,"observations":[{"actual":[null,100,"done"],"check":"boundary: nothing to charge","expected":[null,100,"done"],"passed":true},{"actual":[330,390,"ok"],"check":"boundary: latest start exactly now","expected":[330,390,"ok"],"passed":true},{"actual":[null,null,"no-power"],"check":"boundary: no charger power","expected":[null,null,"no-power"],"passed":true},{"actual":[390,400,"ok"],"check":"regression: efficiency direction","expected":[390,403,"ok"],"passed":false},{"actual":[840,996,"ok"],"check":"regression: efficiency direction (partial repair)","expected":[810,983,"ok"],"passed":false},{"actual":[570,627,"ok"],"check":"control 1","expected":[555,619,"ok"],"passed":false},{"actual":[null,448,"done"],"check":"control 2","expected":[null,448,"done"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: nothing to charge\", \"actual\": [null, 100, \"done\"], \"expected\": [null, 100, \"done\"], \"passed\": true}, {\"check\": \"boundary: latest start exactly now\", \"actual\": [330, 390, \"ok\"], \"expected\": [330, 390, \"ok\"], \"passed\": true}, {\"check\": \"boundary: no charger power\", \"actual\": [null, null, \"no-power\"], \"expected\": [null, null, \"no-power\"], \"passed\": true}, {\"check\": \"regression: efficiency direction\", \"actual\": [390, 400, \"ok\"], \"expected\": [390, 403, \"ok\"], \"passed\": false}, {\"check\": \"regression: efficiency direction (partial repair)\", \"actual\": [840, 996, \"ok\"], \"expected\": [810, 983, \"ok\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [570, 627, \"ok\"], \"expected\": [555, 619, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [null, 448, \"done\"], \"expected\": [null, 448, \"done\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.411,"exit_code":0,"observations":[{"actual":[null,100,"done"],"check":"boundary: nothing to charge","expected":[null,100,"done"],"passed":true},{"actual":[330,390,"ok"],"check":"boundary: latest start exactly now","expected":[330,390,"ok"],"passed":true},{"actual":[null,null,"no-power"],"check":"boundary: no charger power","expected":[null,null,"no-power"],"passed":true},{"actual":[390,403,"ok"],"check":"regression: efficiency direction","expected":[390,403,"ok"],"passed":true},{"actual":[810,983,"ok"],"check":"regression: efficiency direction (partial repair)","expected":[810,983,"ok"],"passed":true},{"actual":[555,619,"ok"],"check":"control 1","expected":[555,619,"ok"],"passed":true},{"actual":[null,448,"done"],"check":"control 2","expected":[null,448,"done"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: nothing to charge\", \"actual\": [null, 100, \"done\"], \"expected\": [null, 100, \"done\"], \"passed\": true}, {\"check\": \"boundary: latest start exactly now\", \"actual\": [330, 390, \"ok\"], \"expected\": [330, 390, \"ok\"], \"passed\": true}, {\"check\": \"boundary: no charger power\", \"actual\": [null, null, \"no-power\"], \"expected\": [null, null, \"no-power\"], \"passed\": true}, {\"check\": \"regression: efficiency direction\", \"actual\": [390, 403, \"ok\"], \"expected\": [390, 403, \"ok\"], \"passed\": true}, {\"check\": \"regression: efficiency direction (partial repair)\", \"actual\": [810, 983, \"ok\"], \"expected\": [810, 983, \"ok\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [555, 619, \"ok\"], \"expected\": [555, 619, \"ok\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [null, 448, \"done\"], \"expected\": [null, 448, \"done\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}