{"abstract":"Short-stay vehicles take fast DC chargers that slower AC points could serve in time.","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":"Ranking by power alone leaves equal-power ties in list order.","family":"w2-ev_charging_session_scheduling-charger-matching-feasible-charger-preference","id":"FA-93281","implementations":{"attempt":{"sha256":"8f6dbe16a150fa461fb2f69236b1039e2bbfafc4ff1196bb4d4ab0df28c4d074","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 = 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, key=lambda o: o[0])\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: feasible charger preference',\n   [[[1, 3.7, 30], [2, 3.7, 60], [3, 11, 30], [4, 22, 120]], [10, 332, 11, True], 57],\n   [1, 220, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 50, 30], [2, 22, 30], [3, 50, 120], [4, 22, 0]], [5, 150, 7.4, True], 10], [4, 51, '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: feasible charger preference',\n   [[[1, 150, 0], [2, 7.4, 120], [3, 50, 0]], [20, 67, 11, True], 8], [3, 32, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 3.7, 10], [2, 7.4, 0], [3, 50, 60], [4, 50, 30], [5, 7.4, 10]], [20, 252, 3.7, True], 34],\n   [4, 58, '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: feasible charger preference',\n   [[[1, 150, 0], [2, 7.4, 30], [3, 7.4, 0], [4, 3.7, 60], [5, 7.4, 60]], [5, 300, 3.7, True], 48],\n   [2, 130, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 150, 120], [2, 50, 0], [3, 50, 10], [4, 22, 60], [5, 22, 0]], [20, 374, 7.4, True], 19],\n   [5, 182, '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: feasible charger preference',\n   [[[1, 22, 120], [2, 7.4, 10], [3, 50, 60], [4, 7.4, 0]], [20, 375, 7.4, True], 37],\n   [2, 200, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 150, 0], [2, 150, 10], [3, 22, 30], [4, 7.4, 10]], [10, 278, 7.4, False], 17],\n   [4, 99, '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: feasible charger preference',\n   [[[1, 50, 60], [2, 11, 0], [3, 7.4, 0]], [45, 352, 11, True], 50], [2, 296, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 50, 30], [2, 50, 60], [3, 50, 0]], [10, 216, 3.7, True], 29], [3, 41, '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":"bf6fd0f98e95111182603fca23c107f42fc5d030954c3b932f3549bef8e5ffa0","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 = 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, key=lambda o: (o[1], o[2]))\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: feasible charger preference',\n   [[[1, 3.7, 30], [2, 3.7, 60], [3, 11, 30], [4, 22, 120]], [10, 332, 11, True], 57],\n   [1, 220, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 50, 30], [2, 22, 30], [3, 50, 120], [4, 22, 0]], [5, 150, 7.4, True], 10], [4, 51, '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: feasible charger preference',\n   [[[1, 150, 0], [2, 7.4, 120], [3, 50, 0]], [20, 67, 11, True], 8], [3, 32, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 3.7, 10], [2, 7.4, 0], [3, 50, 60], [4, 50, 30], [5, 7.4, 10]], [20, 252, 3.7, True], 34],\n   [4, 58, '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: feasible charger preference',\n   [[[1, 150, 0], [2, 7.4, 30], [3, 7.4, 0], [4, 3.7, 60], [5, 7.4, 60]], [5, 300, 3.7, True], 48],\n   [2, 130, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 150, 120], [2, 50, 0], [3, 50, 10], [4, 22, 60], [5, 22, 0]], [20, 374, 7.4, True], 19],\n   [5, 182, '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: feasible charger preference',\n   [[[1, 22, 120], [2, 7.4, 10], [3, 50, 60], [4, 7.4, 0]], [20, 375, 7.4, True], 37],\n   [2, 200, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 150, 0], [2, 150, 10], [3, 22, 30], [4, 7.4, 10]], [10, 278, 7.4, False], 17],\n   [4, 99, '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: feasible charger preference',\n   [[[1, 50, 60], [2, 11, 0], [3, 7.4, 0]], [45, 352, 11, True], 50], [2, 296, 'ok']],\n  ['regression: feasible charger preference (partial repair)',\n   [[[1, 50, 30], [2, 50, 60], [3, 50, 0]], [10, 216, 3.7, True], 29], [3, 41, '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-feasible-charger-preference","generated_at":"2026-09-29T14:51:53.680046+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":"Feasible chargers are ranked by finish time instead of lowest sufficient power.","sha256":"bb1b0ef8ac7384d4f75e411d8049dda98d30fffbf5667ad961ba7c97fb67d950","title":"Arrival charger matching: feasible charger preference · 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":42.071,"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":[1,220,"ok"],"check":"regression: feasible charger preference","expected":[1,220,"ok"],"passed":true},{"actual":[2,71,"ok"],"check":"regression: feasible charger preference (partial repair)","expected":[4,51,"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: feasible charger preference\", \"actual\": [1, 220, \"ok\"], \"expected\": [1, 220, \"ok\"], \"passed\": true}, {\"check\": \"regression: feasible charger preference (partial repair)\", \"actual\": [2, 71, \"ok\"], \"expected\": [4, 51, \"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.436,"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":[3,112,"ok"],"check":"regression: feasible charger preference","expected":[1,220,"ok"],"passed":false},{"actual":[1,36,"ok"],"check":"regression: feasible charger preference (partial repair)","expected":[4,51,"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: feasible charger preference\", \"actual\": [3, 112, \"ok\"], \"expected\": [1, 220, \"ok\"], \"passed\": false}, {\"check\": \"regression: feasible charger preference (partial repair)\", \"actual\": [1, 36, \"ok\"], \"expected\": [4, 51, \"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"}},"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."}}