{"abstract":"Low-priority vehicles charge while high-priority vehicles are paused.","category":"EV charging session scheduling","checks":7,"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).","evaluation_group":"w2-ev_charging_session_scheduling-circuit-current-sharing","failed_approach":"Correcting the direction but breaking ties by id length reorders equal-priority vehicles.","family":"w2-ev_charging_session_scheduling-circuit-current-sharing-priority-ordering","id":"FA-92916","implementations":{"attempt":{"sha256":"1b93228b70ea2791adf89b3b568a598ff2bd80b75df9d0934c995cd07fe7e911","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(limit_a, evs):\n    elig = [e for e in evs if e[1] >= 6]\n    elig.sort(key=lambda e: (-e[2], -len(e[0])))\n    admitted = []\n    for e in elig:\n        if 6 * (len(admitted) + 1) <= limit_a:\n            admitted.append(e)\n    alloc = {e[0]: 0 for e in evs}\n    remaining = limit_a\n    open_ = list(admitted)\n    while open_:\n        share = remaining // len(open_)\n        capped = [e for e in open_ if e[1] <= share]\n        if not capped:\n            for e in open_:\n                alloc[e[0]] = share\n            remaining -= share * len(open_)\n            break\n        for e in capped:\n            alloc[e[0]] = e[1]\n            remaining -= e[1]\n            open_.remove(e)\n    for e in admitted:\n        if remaining <= 0:\n            break\n        if alloc[e[0]] < e[1]:\n            alloc[e[0]] += 1\n            remaining -= 1\n    return [[k, alloc[k]] for k in sorted(alloc)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [10, [['EV2', 10, 0], ['EV0', 6, 2], ['EV1', 16, 2], ['EV3', 16, 1]]],\n   [['EV0', 6], ['EV1', 0], ['EV2', 0], ['EV3', 0]]],\n  ['regression: priority ordering (partial repair)',\n   [16,\n    [['EV5', 8, 0], ['EV2', 8, 3], ['EV4', 6, 1], ['EV3', 6, 1], ['EV1', 5, 1], ['EV0', 10, 0]]],\n   [['EV0', 0], ['EV1', 0], ['EV2', 8], ['EV3', 6], ['EV4', 0], ['EV5', 0]]],\n  ['control 1', [32, [['EV0', 32, 3], ['EV1', 24, 3]]], [['EV0', 16], ['EV1', 16]]],\n  ['control 2', [24, [['EV0', 16, 2], ['EV1', 32, 2], ['EV2', 32, 0], ['EV3', 8, 1]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [32,\n    [['EV2', 32, 1], ['EV4', 32, 0], ['EV3', 6, 2], ['EV1', 32, 2], ['EV5', 24, 1],\n     ['EV0', 32, 3]]],\n   [['EV0', 7], ['EV1', 7], ['EV2', 6], ['EV3', 6], ['EV4', 0], ['EV5', 6]]],\n  ['regression: priority ordering (partial repair)',\n   [16, [['EV2', 8, 2], ['EV1', 32, 2], ['EV0', 6, 3]]], [['EV0', 6], ['EV1', 10], ['EV2', 0]]],\n  ['control 1',\n   [30,\n    [['EV1', 8, 3], ['EV4', 6, 2], ['EV0', 16, 0], ['EV2', 10, 3], ['EV3', 24, 1], ['EV5', 6, 2]]],\n   [['EV0', 0], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 6], ['EV5', 6]]],\n  ['control 2', [40, [['EV1', 5, 1], ['EV0', 32, 2]]], [['EV0', 32], ['EV1', 0]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [48, [['EV1', 16, 2], ['EV0', 16, 2], ['EV4', 32, 3], ['EV2', 24, 3], ['EV3', 24, 3]]],\n   [['EV0', 9], ['EV1', 9], ['EV2', 10], ['EV3', 10], ['EV4', 10]]],\n  ['regression: priority ordering (partial repair)',\n   [12, [['EV0', 16, 0], ['EV2', 16, 0], ['EV1', 32, 0]]], [['EV0', 6], ['EV1', 6], ['EV2', 0]]],\n  ['control 1', [18, [['EV2', 32, 0], ['EV0', 5, 2], ['EV1', 24, 3]]],\n   [['EV0', 0], ['EV1', 9], ['EV2', 9]]],\n  ['control 2', [16, [['EV0', 24, 3], ['EV1', 16, 0], ['EV2', 16, 2]]],\n   [['EV0', 8], ['EV1', 0], ['EV2', 8]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [18, [['EV2', 6, 0], ['EV1', 24, 1], ['EV3', 24, 0], ['EV0', 32, 2]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 0]]],\n  ['regression: priority ordering (partial repair)',\n   [30,\n    [['EV5', 24, 0], ['EV0', 6, 0], ['EV3', 10, 1], ['EV1', 8, 0], ['EV4', 6, 0], ['EV2', 6, 0]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 6], ['EV5', 0]]],\n  ['control 1', [16, [['EV1', 16, 2], ['EV0', 32, 3]]], [['EV0', 8], ['EV1', 8]]],\n  ['control 2',\n   [48,\n    [['EV3', 8, 0], ['EV1', 16, 0], ['EV4', 5, 0], ['EV2', 8, 0], ['EV5', 10, 0], ['EV0', 10, 3]]],\n   [['EV0', 10], ['EV1', 12], ['EV2', 8], ['EV3', 8], ['EV4', 0], ['EV5', 10]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [40, [['EV1', 24, 3], ['EV0', 6, 0], ['EV2', 32, 1], ['EV3', 32, 3]]],\n   [['EV0', 6], ['EV1', 12], ['EV2', 11], ['EV3', 11]]],\n  ['regression: priority ordering (partial repair)',\n   [24, [['EV4', 24, 2], ['EV0', 16, 3], ['EV2', 8, 2], ['EV3', 6, 2], ['EV1', 6, 2]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 0]]],\n  ['control 1', [40, [['EV2', 5, 0], ['EV0', 6, 2], ['EV3', 24, 2], ['EV1', 10, 3]]],\n   [['EV0', 6], ['EV1', 10], ['EV2', 0], ['EV3', 24]]],\n  ['control 2', [10, [['EV0', 10, 0]]], [['EV0', 10]]]]]\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":"83606ff2d54875040e2cf2e02e521f25055cda51c2dcac73b9edf2ff67bc3958","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(limit_a, evs):\n    elig = [e for e in evs if e[1] >= 6]\n    elig.sort(key=lambda e: (e[2], e[0]))\n    admitted = []\n    for e in elig:\n        if 6 * (len(admitted) + 1) <= limit_a:\n            admitted.append(e)\n    alloc = {e[0]: 0 for e in evs}\n    remaining = limit_a\n    open_ = list(admitted)\n    while open_:\n        share = remaining // len(open_)\n        capped = [e for e in open_ if e[1] <= share]\n        if not capped:\n            for e in open_:\n                alloc[e[0]] = share\n            remaining -= share * len(open_)\n            break\n        for e in capped:\n            alloc[e[0]] = e[1]\n            remaining -= e[1]\n            open_.remove(e)\n    for e in admitted:\n        if remaining <= 0:\n            break\n        if alloc[e[0]] < e[1]:\n            alloc[e[0]] += 1\n            remaining -= 1\n    return [[k, alloc[k]] for k in sorted(alloc)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [10, [['EV2', 10, 0], ['EV0', 6, 2], ['EV1', 16, 2], ['EV3', 16, 1]]],\n   [['EV0', 6], ['EV1', 0], ['EV2', 0], ['EV3', 0]]],\n  ['regression: priority ordering (partial repair)',\n   [16,\n    [['EV5', 8, 0], ['EV2', 8, 3], ['EV4', 6, 1], ['EV3', 6, 1], ['EV1', 5, 1], ['EV0', 10, 0]]],\n   [['EV0', 0], ['EV1', 0], ['EV2', 8], ['EV3', 6], ['EV4', 0], ['EV5', 0]]],\n  ['control 1', [32, [['EV0', 32, 3], ['EV1', 24, 3]]], [['EV0', 16], ['EV1', 16]]],\n  ['control 2', [24, [['EV0', 16, 2], ['EV1', 32, 2], ['EV2', 32, 0], ['EV3', 8, 1]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [32,\n    [['EV2', 32, 1], ['EV4', 32, 0], ['EV3', 6, 2], ['EV1', 32, 2], ['EV5', 24, 1],\n     ['EV0', 32, 3]]],\n   [['EV0', 7], ['EV1', 7], ['EV2', 6], ['EV3', 6], ['EV4', 0], ['EV5', 6]]],\n  ['regression: priority ordering (partial repair)',\n   [16, [['EV2', 8, 2], ['EV1', 32, 2], ['EV0', 6, 3]]], [['EV0', 6], ['EV1', 10], ['EV2', 0]]],\n  ['control 1',\n   [30,\n    [['EV1', 8, 3], ['EV4', 6, 2], ['EV0', 16, 0], ['EV2', 10, 3], ['EV3', 24, 1], ['EV5', 6, 2]]],\n   [['EV0', 0], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 6], ['EV5', 6]]],\n  ['control 2', [40, [['EV1', 5, 1], ['EV0', 32, 2]]], [['EV0', 32], ['EV1', 0]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [48, [['EV1', 16, 2], ['EV0', 16, 2], ['EV4', 32, 3], ['EV2', 24, 3], ['EV3', 24, 3]]],\n   [['EV0', 9], ['EV1', 9], ['EV2', 10], ['EV3', 10], ['EV4', 10]]],\n  ['regression: priority ordering (partial repair)',\n   [12, [['EV0', 16, 0], ['EV2', 16, 0], ['EV1', 32, 0]]], [['EV0', 6], ['EV1', 6], ['EV2', 0]]],\n  ['control 1', [18, [['EV2', 32, 0], ['EV0', 5, 2], ['EV1', 24, 3]]],\n   [['EV0', 0], ['EV1', 9], ['EV2', 9]]],\n  ['control 2', [16, [['EV0', 24, 3], ['EV1', 16, 0], ['EV2', 16, 2]]],\n   [['EV0', 8], ['EV1', 0], ['EV2', 8]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [18, [['EV2', 6, 0], ['EV1', 24, 1], ['EV3', 24, 0], ['EV0', 32, 2]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 0]]],\n  ['regression: priority ordering (partial repair)',\n   [30,\n    [['EV5', 24, 0], ['EV0', 6, 0], ['EV3', 10, 1], ['EV1', 8, 0], ['EV4', 6, 0], ['EV2', 6, 0]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 6], ['EV5', 0]]],\n  ['control 1', [16, [['EV1', 16, 2], ['EV0', 32, 3]]], [['EV0', 8], ['EV1', 8]]],\n  ['control 2',\n   [48,\n    [['EV3', 8, 0], ['EV1', 16, 0], ['EV4', 5, 0], ['EV2', 8, 0], ['EV5', 10, 0], ['EV0', 10, 3]]],\n   [['EV0', 10], ['EV1', 12], ['EV2', 8], ['EV3', 8], ['EV4', 0], ['EV5', 10]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [40, [['EV1', 24, 3], ['EV0', 6, 0], ['EV2', 32, 1], ['EV3', 32, 3]]],\n   [['EV0', 6], ['EV1', 12], ['EV2', 11], ['EV3', 11]]],\n  ['regression: priority ordering (partial repair)',\n   [24, [['EV4', 24, 2], ['EV0', 16, 3], ['EV2', 8, 2], ['EV3', 6, 2], ['EV1', 6, 2]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 0]]],\n  ['control 1', [40, [['EV2', 5, 0], ['EV0', 6, 2], ['EV3', 24, 2], ['EV1', 10, 3]]],\n   [['EV0', 6], ['EV1', 10], ['EV2', 0], ['EV3', 24]]],\n  ['control 2', [10, [['EV0', 10, 0]]], [['EV0', 10]]]]]\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":"9e215f175bad78c9a190cf2f432d3896f7b0b2ff2fc4defef4e129896e7a85d0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(limit_a, evs):\n    elig = [e for e in evs if e[1] >= 6]\n    elig.sort(key=lambda e: (-e[2], e[0]))\n    admitted = []\n    for e in elig:\n        if 6 * (len(admitted) + 1) <= limit_a:\n            admitted.append(e)\n    alloc = {e[0]: 0 for e in evs}\n    remaining = limit_a\n    open_ = list(admitted)\n    while open_:\n        share = remaining // len(open_)\n        capped = [e for e in open_ if e[1] <= share]\n        if not capped:\n            for e in open_:\n                alloc[e[0]] = share\n            remaining -= share * len(open_)\n            break\n        for e in capped:\n            alloc[e[0]] = e[1]\n            remaining -= e[1]\n            open_.remove(e)\n    for e in admitted:\n        if remaining <= 0:\n            break\n        if alloc[e[0]] < e[1]:\n            alloc[e[0]] += 1\n            remaining -= 1\n    return [[k, alloc[k]] for k in sorted(alloc)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [10, [['EV2', 10, 0], ['EV0', 6, 2], ['EV1', 16, 2], ['EV3', 16, 1]]],\n   [['EV0', 6], ['EV1', 0], ['EV2', 0], ['EV3', 0]]],\n  ['regression: priority ordering (partial repair)',\n   [16,\n    [['EV5', 8, 0], ['EV2', 8, 3], ['EV4', 6, 1], ['EV3', 6, 1], ['EV1', 5, 1], ['EV0', 10, 0]]],\n   [['EV0', 0], ['EV1', 0], ['EV2', 8], ['EV3', 6], ['EV4', 0], ['EV5', 0]]],\n  ['control 1', [32, [['EV0', 32, 3], ['EV1', 24, 3]]], [['EV0', 16], ['EV1', 16]]],\n  ['control 2', [24, [['EV0', 16, 2], ['EV1', 32, 2], ['EV2', 32, 0], ['EV3', 8, 1]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [32,\n    [['EV2', 32, 1], ['EV4', 32, 0], ['EV3', 6, 2], ['EV1', 32, 2], ['EV5', 24, 1],\n     ['EV0', 32, 3]]],\n   [['EV0', 7], ['EV1', 7], ['EV2', 6], ['EV3', 6], ['EV4', 0], ['EV5', 6]]],\n  ['regression: priority ordering (partial repair)',\n   [16, [['EV2', 8, 2], ['EV1', 32, 2], ['EV0', 6, 3]]], [['EV0', 6], ['EV1', 10], ['EV2', 0]]],\n  ['control 1',\n   [30,\n    [['EV1', 8, 3], ['EV4', 6, 2], ['EV0', 16, 0], ['EV2', 10, 3], ['EV3', 24, 1], ['EV5', 6, 2]]],\n   [['EV0', 0], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 6], ['EV5', 6]]],\n  ['control 2', [40, [['EV1', 5, 1], ['EV0', 32, 2]]], [['EV0', 32], ['EV1', 0]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [48, [['EV1', 16, 2], ['EV0', 16, 2], ['EV4', 32, 3], ['EV2', 24, 3], ['EV3', 24, 3]]],\n   [['EV0', 9], ['EV1', 9], ['EV2', 10], ['EV3', 10], ['EV4', 10]]],\n  ['regression: priority ordering (partial repair)',\n   [12, [['EV0', 16, 0], ['EV2', 16, 0], ['EV1', 32, 0]]], [['EV0', 6], ['EV1', 6], ['EV2', 0]]],\n  ['control 1', [18, [['EV2', 32, 0], ['EV0', 5, 2], ['EV1', 24, 3]]],\n   [['EV0', 0], ['EV1', 9], ['EV2', 9]]],\n  ['control 2', [16, [['EV0', 24, 3], ['EV1', 16, 0], ['EV2', 16, 2]]],\n   [['EV0', 8], ['EV1', 0], ['EV2', 8]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [18, [['EV2', 6, 0], ['EV1', 24, 1], ['EV3', 24, 0], ['EV0', 32, 2]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 0]]],\n  ['regression: priority ordering (partial repair)',\n   [30,\n    [['EV5', 24, 0], ['EV0', 6, 0], ['EV3', 10, 1], ['EV1', 8, 0], ['EV4', 6, 0], ['EV2', 6, 0]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 6], ['EV5', 0]]],\n  ['control 1', [16, [['EV1', 16, 2], ['EV0', 32, 3]]], [['EV0', 8], ['EV1', 8]]],\n  ['control 2',\n   [48,\n    [['EV3', 8, 0], ['EV1', 16, 0], ['EV4', 5, 0], ['EV2', 8, 0], ['EV5', 10, 0], ['EV0', 10, 3]]],\n   [['EV0', 10], ['EV1', 12], ['EV2', 8], ['EV3', 8], ['EV4', 0], ['EV5', 10]]]],\n [['boundary: exactly one minimum share', [6, [['A', 32, 0], ['B', 32, 0]]], [['A', 6], ['B', 0]]],\n  ['boundary: EV at 6 A maximum', [20, [['A', 6, 0], ['B', 32, 0]]], [['A', 6], ['B', 14]]],\n  ['boundary: no EVs', [32, []], []],\n  ['regression: priority ordering',\n   [40, [['EV1', 24, 3], ['EV0', 6, 0], ['EV2', 32, 1], ['EV3', 32, 3]]],\n   [['EV0', 6], ['EV1', 12], ['EV2', 11], ['EV3', 11]]],\n  ['regression: priority ordering (partial repair)',\n   [24, [['EV4', 24, 2], ['EV0', 16, 3], ['EV2', 8, 2], ['EV3', 6, 2], ['EV1', 6, 2]]],\n   [['EV0', 6], ['EV1', 6], ['EV2', 6], ['EV3', 6], ['EV4', 0]]],\n  ['control 1', [40, [['EV2', 5, 0], ['EV0', 6, 2], ['EV3', 24, 2], ['EV1', 10, 3]]],\n   [['EV0', 6], ['EV1', 10], ['EV2', 0], ['EV3', 24]]],\n  ['control 2', [10, [['EV0', 10, 0]]], [['EV0', 10]]]]]\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-circuit-current-sharing-priority-ordering","generated_at":"2026-09-29T14:51:50.397859+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":"Order by descending priority, ties by ascending id.","root_cause":"Eligible EVs are sorted by ascending priority.","sha256":"03054c0369e9dd2804992d16ae6b6ef3e6621cadb645796755a77a58ce3c641c","title":"Shared circuit current allocation: priority ordering · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.847,"exit_code":1,"observations":[{"actual":[["A",6],["B",0]],"check":"boundary: exactly one minimum share","expected":[["A",6],["B",0]],"passed":true},{"actual":[["A",6],["B",14]],"check":"boundary: EV at 6 A maximum","expected":[["A",6],["B",14]],"passed":true},{"actual":[],"check":"boundary: no EVs","expected":[],"passed":true},{"actual":[["EV0",6],["EV1",0],["EV2",0],["EV3",0]],"check":"regression: priority ordering","expected":[["EV0",6],["EV1",0],["EV2",0],["EV3",0]],"passed":true},{"actual":[["EV0",0],["EV1",0],["EV2",8],["EV3",0],["EV4",6],["EV5",0]],"check":"regression: priority ordering (partial repair)","expected":[["EV0",0],["EV1",0],["EV2",8],["EV3",6],["EV4",0],["EV5",0]],"passed":false},{"actual":[["EV0",16],["EV1",16]],"check":"control 1","expected":[["EV0",16],["EV1",16]],"passed":true},{"actual":[["EV0",6],["EV1",6],["EV2",6],["EV3",6]],"check":"control 2","expected":[["EV0",6],["EV1",6],["EV2",6],["EV3",6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: exactly one minimum share\", \"actual\": [[\"A\", 6], [\"B\", 0]], \"expected\": [[\"A\", 6], [\"B\", 0]], \"passed\": true}, {\"check\": \"boundary: EV at 6 A maximum\", \"actual\": [[\"A\", 6], [\"B\", 14]], \"expected\": [[\"A\", 6], [\"B\", 14]], \"passed\": true}, {\"check\": \"boundary: no EVs\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: priority ordering\", \"actual\": [[\"EV0\", 6], [\"EV1\", 0], [\"EV2\", 0], [\"EV3\", 0]], \"expected\": [[\"EV0\", 6], [\"EV1\", 0], [\"EV2\", 0], [\"EV3\", 0]], \"passed\": true}, {\"check\": \"regression: priority ordering (partial repair)\", \"actual\": [[\"EV0\", 0], [\"EV1\", 0], [\"EV2\", 8], [\"EV3\", 0], [\"EV4\", 6], [\"EV5\", 0]], \"expected\": [[\"EV0\", 0], [\"EV1\", 0], [\"EV2\", 8], [\"EV3\", 6], [\"EV4\", 0], [\"EV5\", 0]], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[\"EV0\", 16], [\"EV1\", 16]], \"expected\": [[\"EV0\", 16], [\"EV1\", 16]], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[\"EV0\", 6], [\"EV1\", 6], [\"EV2\", 6], [\"EV3\", 6]], \"expected\": [[\"EV0\", 6], [\"EV1\", 6], [\"EV2\", 6], [\"EV3\", 6]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.425,"exit_code":1,"observations":[{"actual":[["A",6],["B",0]],"check":"boundary: exactly one minimum share","expected":[["A",6],["B",0]],"passed":true},{"actual":[["A",6],["B",14]],"check":"boundary: EV at 6 A maximum","expected":[["A",6],["B",14]],"passed":true},{"actual":[],"check":"boundary: no EVs","expected":[],"passed":true},{"actual":[["EV0",0],["EV1",0],["EV2",10],["EV3",0]],"check":"regression: priority ordering","expected":[["EV0",6],["EV1",0],["EV2",0],["EV3",0]],"passed":false},{"actual":[["EV0",8],["EV1",0],["EV2",0],["EV3",0],["EV4",0],["EV5",8]],"check":"regression: priority ordering (partial repair)","expected":[["EV0",0],["EV1",0],["EV2",8],["EV3",6],["EV4",0],["EV5",0]],"passed":false},{"actual":[["EV0",16],["EV1",16]],"check":"control 1","expected":[["EV0",16],["EV1",16]],"passed":true},{"actual":[["EV0",6],["EV1",6],["EV2",6],["EV3",6]],"check":"control 2","expected":[["EV0",6],["EV1",6],["EV2",6],["EV3",6]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: exactly one minimum share\", \"actual\": [[\"A\", 6], [\"B\", 0]], \"expected\": [[\"A\", 6], [\"B\", 0]], \"passed\": true}, {\"check\": \"boundary: EV at 6 A maximum\", \"actual\": [[\"A\", 6], [\"B\", 14]], \"expected\": [[\"A\", 6], [\"B\", 14]], \"passed\": true}, {\"check\": \"boundary: no EVs\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: priority ordering\", \"actual\": [[\"EV0\", 0], [\"EV1\", 0], [\"EV2\", 10], [\"EV3\", 0]], \"expected\": [[\"EV0\", 6], [\"EV1\", 0], [\"EV2\", 0], [\"EV3\", 0]], \"passed\": false}, {\"check\": \"regression: priority ordering (partial repair)\", \"actual\": [[\"EV0\", 8], [\"EV1\", 0], [\"EV2\", 0], [\"EV3\", 0], [\"EV4\", 0], [\"EV5\", 8]], \"expected\": [[\"EV0\", 0], [\"EV1\", 0], [\"EV2\", 8], [\"EV3\", 6], [\"EV4\", 0], [\"EV5\", 0]], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[\"EV0\", 16], [\"EV1\", 16]], \"expected\": [[\"EV0\", 16], [\"EV1\", 16]], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[\"EV0\", 6], [\"EV1\", 6], [\"EV2\", 6], [\"EV3\", 6]], \"expected\": [[\"EV0\", 6], [\"EV1\", 6], [\"EV2\", 6], [\"EV3\", 6]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.483,"exit_code":0,"observations":[{"actual":[["A",6],["B",0]],"check":"boundary: exactly one minimum share","expected":[["A",6],["B",0]],"passed":true},{"actual":[["A",6],["B",14]],"check":"boundary: EV at 6 A maximum","expected":[["A",6],["B",14]],"passed":true},{"actual":[],"check":"boundary: no EVs","expected":[],"passed":true},{"actual":[["EV0",6],["EV1",0],["EV2",0],["EV3",0]],"check":"regression: priority ordering","expected":[["EV0",6],["EV1",0],["EV2",0],["EV3",0]],"passed":true},{"actual":[["EV0",0],["EV1",0],["EV2",8],["EV3",6],["EV4",0],["EV5",0]],"check":"regression: priority ordering (partial repair)","expected":[["EV0",0],["EV1",0],["EV2",8],["EV3",6],["EV4",0],["EV5",0]],"passed":true},{"actual":[["EV0",16],["EV1",16]],"check":"control 1","expected":[["EV0",16],["EV1",16]],"passed":true},{"actual":[["EV0",6],["EV1",6],["EV2",6],["EV3",6]],"check":"control 2","expected":[["EV0",6],["EV1",6],["EV2",6],["EV3",6]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: exactly one minimum share\", \"actual\": [[\"A\", 6], [\"B\", 0]], \"expected\": [[\"A\", 6], [\"B\", 0]], \"passed\": true}, {\"check\": \"boundary: EV at 6 A maximum\", \"actual\": [[\"A\", 6], [\"B\", 14]], \"expected\": [[\"A\", 6], [\"B\", 14]], \"passed\": true}, {\"check\": \"boundary: no EVs\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"regression: priority ordering\", \"actual\": [[\"EV0\", 6], [\"EV1\", 0], [\"EV2\", 0], [\"EV3\", 0]], \"expected\": [[\"EV0\", 6], [\"EV1\", 0], [\"EV2\", 0], [\"EV3\", 0]], \"passed\": true}, {\"check\": \"regression: priority ordering (partial repair)\", \"actual\": [[\"EV0\", 0], [\"EV1\", 0], [\"EV2\", 8], [\"EV3\", 6], [\"EV4\", 0], [\"EV5\", 0]], \"expected\": [[\"EV0\", 0], [\"EV1\", 0], [\"EV2\", 8], [\"EV3\", 6], [\"EV4\", 0], [\"EV5\", 0]], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [[\"EV0\", 16], [\"EV1\", 16]], \"expected\": [[\"EV0\", 16], [\"EV1\", 16]], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[\"EV0\", 6], [\"EV1\", 6], [\"EV2\", 6], [\"EV3\", 6]], \"expected\": [[\"EV0\", 6], [\"EV1\", 6], [\"EV2\", 6], [\"EV3\", 6]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}