{"abstract":"Finish times are computed as if a busy charger were free now, or as if an idle one started in the past.","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":"Ignoring free_at promises busy chargers immediately.","family":"w2-ev_charging_session_scheduling-charger-matching-charger-availability-start","id":"FA-93266","implementations":{"attempt":{"sha256":"f3ecf136fca4bf06a98633a16fbf8cf2a42118f194ceaef2eca082e3521ec2f8","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 = now\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: charger availability start',\n   [[[1, 11, 0], [2, 150, 120], [3, 22, 10], [4, 3.7, 0]], [5, 101, 7.4, False], 31],\n   [1, 72, 'ok']],\n  ['regression: charger availability start (partial repair)',\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  ['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: charger availability start',\n   [[[1, 150, 0], [2, 7.4, 120], [3, 50, 0]], [20, 67, 11, True], 8], [3, 32, 'ok']],\n  ['regression: charger availability start (partial repair)',\n   [[[1, 22, 120]], [20, 345, 3.7, True], 47], [1, 445, 'late']],\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: charger availability start',\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: charger availability start (partial repair)',\n   [[[1, 22, 120], [2, 7.4, 30]], [45, 240, 3.7, False], 22], [2, 760, 'late']],\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: charger availability start',\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: charger availability start (partial repair)',\n   [[[1, 7.4, 120]], [20, 342, 11, True], 40], [1, 283, '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: charger availability start', [[[1, 3.7, 0]], [45, 358, 3.7, False], 15],\n   [1, 745, 'late']],\n  ['regression: charger availability start (partial repair)',\n   [[[1, 22, 120], [2, 7.4, 0]], [20, 121, 11, True], 24], [2, 187, 'late']],\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":"08096459e1bb9d81718835ac0663e4d665d15620a9057abeab783180ff73fc97","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 = 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: charger availability start',\n   [[[1, 11, 0], [2, 150, 120], [3, 22, 10], [4, 3.7, 0]], [5, 101, 7.4, False], 31],\n   [1, 72, 'ok']],\n  ['regression: charger availability start (partial repair)',\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  ['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: charger availability start',\n   [[[1, 150, 0], [2, 7.4, 120], [3, 50, 0]], [20, 67, 11, True], 8], [3, 32, 'ok']],\n  ['regression: charger availability start (partial repair)',\n   [[[1, 22, 120]], [20, 345, 3.7, True], 47], [1, 445, 'late']],\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: charger availability start',\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: charger availability start (partial repair)',\n   [[[1, 22, 120], [2, 7.4, 30]], [45, 240, 3.7, False], 22], [2, 760, 'late']],\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: charger availability start',\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: charger availability start (partial repair)',\n   [[[1, 7.4, 120]], [20, 342, 11, True], 40], [1, 283, '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: charger availability start', [[[1, 3.7, 0]], [45, 358, 3.7, False], 15],\n   [1, 745, 'late']],\n  ['regression: charger availability start (partial repair)',\n   [[[1, 22, 120], [2, 7.4, 0]], [20, 121, 11, True], 24], [2, 187, 'late']],\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-charger-availability-start","generated_at":"2026-09-29T14:51:53.615209+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 session start ignores the current time.","sha256":"00f7fbf721b7789d8719651613b9c153fd90a1dd7d30e851db31034cea36d99b","title":"Arrival charger matching: charger availability start · 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.749,"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,72,"ok"],"check":"regression: charger availability start","expected":[1,72,"ok"],"passed":true},{"actual":[2,331,"late"],"check":"regression: charger availability start (partial repair)","expected":[2,445,"late"],"passed":false},{"actual":[1,36,"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, 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: charger availability start\", \"actual\": [1, 72, \"ok\"], \"expected\": [1, 72, \"ok\"], \"passed\": true}, {\"check\": \"regression: charger availability start (partial repair)\", \"actual\": [2, 331, \"late\"], \"expected\": [2, 445, \"late\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [1, 36, \"ok\"], \"expected\": [1, 88, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.141,"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":[4,82,"ok"],"check":"regression: charger availability start","expected":[1,72,"ok"],"passed":false},{"actual":[2,445,"late"],"check":"regression: charger availability start (partial repair)","expected":[2,445,"late"],"passed":true},{"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: charger availability start\", \"actual\": [4, 82, \"ok\"], \"expected\": [1, 72, \"ok\"], \"passed\": false}, {\"check\": \"regression: charger availability start (partial repair)\", \"actual\": [2, 445, \"late\"], \"expected\": [2, 445, \"late\"], \"passed\": true}, {\"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."}}