{"abstract":"Finish times on 22 kW AC points assume the car can take all 22 kW.","category":"EV charging session scheduling","checks":7,"contract":"chargers are [id, kw, free_at]; kw > 22 is DC (usable only if dc_ok, full kw), otherwise AC limited to the vehicle onboard max_ac. vehicle is [need_kwh, depart, max_ac, dc_ok]. Finish = max(now, free_at) + ceil(need*60/power) minutes. Among chargers finishing by depart pick the lowest power, then earliest finish, then id; otherwise the earliest finish (then id) with status 'late'. Return [id, finish, status] or None when no charger is usable.","contract_signature":"chargers, vehicle, now","evaluation_group":"w2-ev_charging_session_scheduling-charger-matching","failed_approach":"Applying the onboard limit to DC instead of AC throttles DC sessions and leaves AC wrong.","family":"w2-ev_charging_session_scheduling-charger-matching-onboard-ac-charger-limit","id":"FA-93261","implementations":{"attempt":{"sha256":"10539def5bd0e2bec81178b87aefe745ee63b78a984e7fe3cf744f028f156725","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(chargers, vehicle, now):\n    need, depart, max_ac, dc_ok = vehicle\n    opts = []\n    for cid, kw, free_at in chargers:\n        if kw > 22:\n            if not dc_ok:\n                continue\n            pw = min(kw, max_ac)\n        else:\n            pw = min(kw, max_ac)\n        start = max(now, free_at)\n        finish = start + math.ceil(need * 60 / pw)\n        opts.append([pw, finish, cid])\n    if not opts:\n        return None\n    ok = [o for o in opts if o[1] <= depart]\n    if ok:\n        pw, finish, cid = min(ok)\n        return [cid, finish, 'ok']\n    pw, finish, cid = min(opts, key=lambda o: (o[1], o[2]))\n    return [cid, finish, 'late']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 150, 10], [2, 22, 120], [3, 150, 30], [4, 3.7, 120]], [20, 111, 3.7, False], 6],\n   [2, 445, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 150, 0], [2, 7.4, 10]], [45, 104, 7.4, True], 19], [1, 37, 'ok']],\n  ['control 1', [[[1, 22, 60]], [5, 244, 11, False], 8], [1, 88, 'ok']],\n  ['control 2', [[[1, 50, 0], [2, 50, 0]], [5, 160, 11, False], 39], None]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit', [[[1, 22, 120]], [20, 345, 3.7, True], 47],\n   [1, 445, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 150, 0], [2, 7.4, 120], [3, 50, 0]], [20, 67, 11, True], 8], [3, 32, 'ok']],\n  ['control 1', [[[1, 50, 0]], [45, 63, 7.4, True], 12], [1, 66, 'late']],\n  ['control 2',\n   [[[1, 7.4, 60], [2, 7.4, 10], [3, 22, 10], [4, 11, 120], [5, 50, 120]], [45, 353, 7.4, True],\n    45],\n   [5, 174, 'ok']]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 11, 60], [2, 150, 30], [3, 7.4, 0], [4, 3.7, 0], [5, 7.4, 60]], [10, 35, 3.7, False], 25],\n   [3, 188, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 150, 30], [2, 7.4, 60], [3, 22, 0]], [45, 136, 11, True], 41], [1, 59, 'ok']],\n  ['control 1', [[[1, 7.4, 10], [2, 7.4, 0]], [45, 88, 7.4, True], 40], [1, 405, 'late']],\n  ['control 2', [[[1, 3.7, 10], [2, 3.7, 120], [3, 11, 10], [4, 50, 0]], [5, 42, 7.4, True], 27],\n   [4, 33, 'ok']]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 50, 0], [2, 7.4, 0], [3, 7.4, 120], [4, 22, 10]], [45, 278, 3.7, True], 26],\n   [1, 80, 'ok']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 50, 60], [2, 50, 60]], [45, 130, 7.4, True], 48], [1, 114, 'ok']],\n  ['control 1', [[[1, 7.4, 60]], [30, 240, 3.7, True], 21], [1, 547, 'late']],\n  ['control 2', [[[1, 3.7, 60], [2, 3.7, 120], [3, 150, 30], [4, 150, 0]], [45, 67, 11, False], 57],\n   [1, 790, 'late']]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 22, 0], [2, 3.7, 10], [3, 50, 30]], [20, 64, 3.7, False], 19], [1, 344, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 50, 0], [2, 50, 30]], [10, 89, 7.4, True], 45], [1, 57, 'ok']],\n  ['control 1', [[[1, 50, 60], [2, 50, 60]], [45, 130, 7.4, True], 48], [1, 114, 'ok']],\n  ['control 2', [[[1, 150, 0], [2, 7.4, 10]], [10, 89, 3.7, True], 57], [1, 61, '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":"a99e4a0261af20595c8fe13492c5fb2c13324fc1380034aeef66fe3fd28f2c31","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(chargers, vehicle, now):\n    need, depart, max_ac, dc_ok = vehicle\n    opts = []\n    for cid, kw, free_at in chargers:\n        if kw > 22:\n            if not dc_ok:\n                continue\n            pw = kw\n        else:\n            pw = kw\n        start = max(now, free_at)\n        finish = start + math.ceil(need * 60 / pw)\n        opts.append([pw, finish, cid])\n    if not opts:\n        return None\n    ok = [o for o in opts if o[1] <= depart]\n    if ok:\n        pw, finish, cid = min(ok)\n        return [cid, finish, 'ok']\n    pw, finish, cid = min(opts, key=lambda o: (o[1], o[2]))\n    return [cid, finish, 'late']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 150, 10], [2, 22, 120], [3, 150, 30], [4, 3.7, 120]], [20, 111, 3.7, False], 6],\n   [2, 445, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 150, 0], [2, 7.4, 10]], [45, 104, 7.4, True], 19], [1, 37, 'ok']],\n  ['control 1', [[[1, 22, 60]], [5, 244, 11, False], 8], [1, 88, 'ok']],\n  ['control 2', [[[1, 50, 0], [2, 50, 0]], [5, 160, 11, False], 39], None]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit', [[[1, 22, 120]], [20, 345, 3.7, True], 47],\n   [1, 445, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 150, 0], [2, 7.4, 120], [3, 50, 0]], [20, 67, 11, True], 8], [3, 32, 'ok']],\n  ['control 1', [[[1, 50, 0]], [45, 63, 7.4, True], 12], [1, 66, 'late']],\n  ['control 2',\n   [[[1, 7.4, 60], [2, 7.4, 10], [3, 22, 10], [4, 11, 120], [5, 50, 120]], [45, 353, 7.4, True],\n    45],\n   [5, 174, 'ok']]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 11, 60], [2, 150, 30], [3, 7.4, 0], [4, 3.7, 0], [5, 7.4, 60]], [10, 35, 3.7, False], 25],\n   [3, 188, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 150, 30], [2, 7.4, 60], [3, 22, 0]], [45, 136, 11, True], 41], [1, 59, 'ok']],\n  ['control 1', [[[1, 7.4, 10], [2, 7.4, 0]], [45, 88, 7.4, True], 40], [1, 405, 'late']],\n  ['control 2', [[[1, 3.7, 10], [2, 3.7, 120], [3, 11, 10], [4, 50, 0]], [5, 42, 7.4, True], 27],\n   [4, 33, 'ok']]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 50, 0], [2, 7.4, 0], [3, 7.4, 120], [4, 22, 10]], [45, 278, 3.7, True], 26],\n   [1, 80, 'ok']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 50, 60], [2, 50, 60]], [45, 130, 7.4, True], 48], [1, 114, 'ok']],\n  ['control 1', [[[1, 7.4, 60]], [30, 240, 3.7, True], 21], [1, 547, 'late']],\n  ['control 2', [[[1, 3.7, 60], [2, 3.7, 120], [3, 150, 30], [4, 150, 0]], [45, 67, 11, False], 57],\n   [1, 790, 'late']]],\n [['boundary: 22 kW AC charger', [[[1, 22, 0]], [11, 300, 11, False], 0], [1, 60, 'ok']],\n  ['boundary: finish exactly at departure', [[[1, 7.4, 0]], [37, 300, 7.4, True], 0],\n   [1, 300, 'ok']],\n  ['boundary: only DC and no DC support', [[[1, 50, 0]], [10, 100, 11, False], 0], None],\n  ['regression: onboard AC charger limit',\n   [[[1, 22, 0], [2, 3.7, 10], [3, 50, 30]], [20, 64, 3.7, False], 19], [1, 344, 'late']],\n  ['regression: onboard AC charger limit (partial repair)',\n   [[[1, 50, 0], [2, 50, 30]], [10, 89, 7.4, True], 45], [1, 57, 'ok']],\n  ['control 1', [[[1, 50, 60], [2, 50, 60]], [45, 130, 7.4, True], 48], [1, 114, 'ok']],\n  ['control 2', [[[1, 150, 0], [2, 7.4, 10]], [10, 89, 3.7, True], 57], [1, 61, '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-charger-matching-onboard-ac-charger-limit","generated_at":"2026-09-29T14:51:53.603871+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.","root_cause":"The AC power ignores the vehicle onboard charger limit.","sha256":"46078fc1d72a57c2d612f1c9406b19ae7e5bc60e08b5b900d099b56b13bcda2d","title":"Arrival charger matching: onboard AC charger limit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.569,"exit_code":1,"observations":[{"actual":[1,60,"ok"],"check":"boundary: 22 kW AC charger","expected":[1,60,"ok"],"passed":true},{"actual":[1,300,"ok"],"check":"boundary: finish exactly at departure","expected":[1,300,"ok"],"passed":true},{"actual":null,"check":"boundary: only DC and no DC support","expected":null,"passed":true},{"actual":[2,445,"late"],"check":"regression: onboard AC charger limit","expected":[2,445,"late"],"passed":true},{"actual":[1,384,"late"],"check":"regression: onboard AC charger limit (partial repair)","expected":[1,37,"ok"],"passed":false},{"actual":[1,88,"ok"],"check":"control 1","expected":[1,88,"ok"],"passed":true},{"actual":null,"check":"control 2","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: 22 kW AC charger\", \"actual\": [1, 60, \"ok\"], \"expected\": [1, 60, \"ok\"], \"passed\": true}, {\"check\": \"boundary: finish exactly at departure\", \"actual\": [1, 300, \"ok\"], \"expected\": [1, 300, \"ok\"], \"passed\": true}, {\"check\": \"boundary: only DC and no DC support\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: onboard AC charger limit\", \"actual\": [2, 445, \"late\"], \"expected\": [2, 445, \"late\"], \"passed\": true}, {\"check\": \"regression: onboard AC charger limit (partial repair)\", \"actual\": [1, 384, \"late\"], \"expected\": [1, 37, \"ok\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [1, 88, \"ok\"], \"expected\": [1, 88, \"ok\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.922,"exit_code":1,"observations":[{"actual":[1,30,"ok"],"check":"boundary: 22 kW AC charger","expected":[1,60,"ok"],"passed":false},{"actual":[1,300,"ok"],"check":"boundary: finish exactly at departure","expected":[1,300,"ok"],"passed":true},{"actual":null,"check":"boundary: only DC and no DC support","expected":null,"passed":true},{"actual":[2,175,"late"],"check":"regression: onboard AC charger limit","expected":[2,445,"late"],"passed":false},{"actual":[1,37,"ok"],"check":"regression: onboard AC charger limit (partial repair)","expected":[1,37,"ok"],"passed":true},{"actual":[1,74,"ok"],"check":"control 1","expected":[1,88,"ok"],"passed":false},{"actual":null,"check":"control 2","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: 22 kW AC charger\", \"actual\": [1, 30, \"ok\"], \"expected\": [1, 60, \"ok\"], \"passed\": false}, {\"check\": \"boundary: finish exactly at departure\", \"actual\": [1, 300, \"ok\"], \"expected\": [1, 300, \"ok\"], \"passed\": true}, {\"check\": \"boundary: only DC and no DC support\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression: onboard AC charger limit\", \"actual\": [2, 175, \"late\"], \"expected\": [2, 445, \"late\"], \"passed\": false}, {\"check\": \"regression: onboard AC charger limit (partial repair)\", \"actual\": [1, 37, \"ok\"], \"expected\": [1, 37, \"ok\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [1, 74, \"ok\"], \"expected\": [1, 88, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}