{"abstract":"With a flat tariff the plan charges at the end of the stay instead of as early as possible.","category":"EV charging session scheduling","checks":7,"contract":"prices[i] is the tariff in cents/kWh of 15-minute slot i. The car is present for slots arrive..depart-1 (depart exclusive) clipped to the tariff horizon; arrive may be negative. Each slot delivers at most max_w//4 Wh. Fill the cheapest slots first (equal price: earlier slot first), the last slot partially. Return [[slot, wh] sorted by slot, cost in millicents (sum wh*price), unmet wh]. need_wh<=0 or max_w<=0 returns [[], 0, max(need_wh,0)].","evaluation_group":"w2-ev_charging_session_scheduling-tou-cheapest-slots","failed_approach":"Reversing a descending stable sort still orders tied slots latest-first.","family":"w2-ev_charging_session_scheduling-tou-cheapest-slots-equal-price-tie-break","id":"FA-92846","implementations":{"attempt":{"sha256":"f82f410ca0fa137cbe4e6924cf0e521362befdcfd6f81d22ce88507783ea339d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(prices, arrive, depart, need_wh, max_w):\n    if need_wh <= 0 or max_w <= 0:\n        return [[], 0, max(need_wh, 0)]\n    slot_wh = max_w // 4\n    lo = max(arrive, 0)\n    hi = min(depart, len(prices))\n    window = list(range(lo, hi))\n    ranked = sorted(window, key=lambda s: -prices[s])[::-1]\n    plan = []\n    left = need_wh\n    for s in ranked:\n        if left <= 0:\n            break\n        take = min(slot_wh, left)\n        plan.append([s, take])\n        left -= take\n    plan.sort()\n    cost = sum(wh * prices[s] for s, wh in plan)\n    return [plan, cost, left]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 10, 8, 25, 30, 10, 20, 10, 8, 10, 10, 25, 25], 3, 16, 1500, 3700],\n   [[[5, 575], [8, 925]], 13150, 0]],\n  ['regression: equal-price tie-break (partial repair)', [[30, 8, 15, 8, 20], -3, 4, 4000, 11000],\n   [[[1, 2750], [3, 1250]], 32000, 0]],\n  ['control 1', [[25, 30, 20, 12, 12], 2, 2, 20000, 11000], [[], 0, 20000]],\n  ['control 2', [[8, 15, 12, 10, 8, 25, 12, 8, 8, 20, 20, 25, 12, 8], -3, 15, 7000, 3700],\n   [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break', [[30, 10, 8, 15, 12, 12, 30, 25, 12], -1, 8, 4000, 7400],\n   [[[1, 1850], [2, 1850], [4, 300]], 36900, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[30, 10, 12, 15, 12, 12, 15, 15, 25, 30], -2, 13, 7000, 11000],\n   [[[1, 2750], [2, 2750], [4, 1500]], 78500, 0]],\n  ['control 1', [[30, 12, 20, 30, 25, 30, 12, 30, 20, 10, 20, 8, 15], 7, 12, 4000, 11000],\n   [[[9, 1250], [11, 2750]], 34500, 0]],\n  ['control 2', [[12, 12, 25, 30, 8, 20, 12, 12], 3, 11, 9000, 3700],\n   [[[3, 925], [4, 925], [5, 925], [6, 925], [7, 925]], 75850, 4375]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 15, 10, 25, 30, 25, 10, 12, 10, 30, 15, 10, 10, 10], 8, 17, 4000, 7400],\n   [[[8, 1850], [11, 1850], [12, 300]], 40000, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[20, 10, 30, 8, 20, 20, 30], 2, 10, 7000, 11000],\n   [[[3, 2750], [4, 2750], [5, 1500]], 107000, 0]],\n  ['control 1', [[12, 10, 15, 25, 30], 4, 4, 12500, 7400], [[], 0, 12500]],\n  ['control 2', [[30, 12, 15, 12, 30, 15, 12, 20, 20], -2, 1, 9000, 0], [[], 0, 9000]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break', [[10, 12, 10, 8, 10, 12, 12], 2, 5, 4000, 11000],\n   [[[2, 1250], [3, 2750]], 34500, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[30, 10, 8, 12, 30, 12, 8, 8, 15, 8, 12, 8, 30], 8, 14, 1500, 11000], [[[9, 1500]], 12000, 0]],\n  ['control 1', [[12, 20, 8, 15, 10, 8, 25, 12, 30, 12], 2, 12, 20000, 11000],\n   [[[2, 2750], [3, 2750], [4, 2750], [5, 2750], [6, 2750], [7, 2750], [8, 750], [9, 2750]], 270000,\n    0]],\n  ['control 2', [[30, 30, 20, 12, 12, 15, 12, 10], -1, 8, 7000, 7400],\n   [[[3, 1850], [4, 1850], [6, 1450], [7, 1850]], 80300, 0]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 20, 12, 12, 12, 12, 20, 15, 10, 12], 0, 11, 4000, 7400],\n   [[[0, 1850], [2, 300], [8, 1850]], 44300, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[12, 15, 15, 8, 12, 15, 10, 25, 25, 20, 20], 0, 14, 9000, 3700],\n   [[[0, 925], [1, 925], [2, 925], [3, 925], [4, 925], [5, 925], [6, 925], [7, 675], [9, 925],\n     [10, 925]],\n    134350, 0]],\n  ['control 1', [[12, 12, 8, 15, 10, 12, 20, 15, 12, 10, 12, 12, 15, 15], 12, 13, 1500, 3700],\n   [[[12, 925]], 13875, 575]],\n  ['control 2', [[10, 12, 10, 8, 10, 12, 12], 2, 5, 4000, 11000],\n   [[[2, 1250], [3, 2750]], 34500, 0]]]]\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":"0359e1894251b48847761843b72f36f18abdcca16e89c969748fdfed2c86566b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(prices, arrive, depart, need_wh, max_w):\n    if need_wh <= 0 or max_w <= 0:\n        return [[], 0, max(need_wh, 0)]\n    slot_wh = max_w // 4\n    lo = max(arrive, 0)\n    hi = min(depart, len(prices))\n    window = list(range(lo, hi))\n    ranked = sorted(window, key=lambda s: (prices[s], -s))\n    plan = []\n    left = need_wh\n    for s in ranked:\n        if left <= 0:\n            break\n        take = min(slot_wh, left)\n        plan.append([s, take])\n        left -= take\n    plan.sort()\n    cost = sum(wh * prices[s] for s, wh in plan)\n    return [plan, cost, left]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 10, 8, 25, 30, 10, 20, 10, 8, 10, 10, 25, 25], 3, 16, 1500, 3700],\n   [[[5, 575], [8, 925]], 13150, 0]],\n  ['regression: equal-price tie-break (partial repair)', [[30, 8, 15, 8, 20], -3, 4, 4000, 11000],\n   [[[1, 2750], [3, 1250]], 32000, 0]],\n  ['control 1', [[25, 30, 20, 12, 12], 2, 2, 20000, 11000], [[], 0, 20000]],\n  ['control 2', [[8, 15, 12, 10, 8, 25, 12, 8, 8, 20, 20, 25, 12, 8], -3, 15, 7000, 3700],\n   [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break', [[30, 10, 8, 15, 12, 12, 30, 25, 12], -1, 8, 4000, 7400],\n   [[[1, 1850], [2, 1850], [4, 300]], 36900, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[30, 10, 12, 15, 12, 12, 15, 15, 25, 30], -2, 13, 7000, 11000],\n   [[[1, 2750], [2, 2750], [4, 1500]], 78500, 0]],\n  ['control 1', [[30, 12, 20, 30, 25, 30, 12, 30, 20, 10, 20, 8, 15], 7, 12, 4000, 11000],\n   [[[9, 1250], [11, 2750]], 34500, 0]],\n  ['control 2', [[12, 12, 25, 30, 8, 20, 12, 12], 3, 11, 9000, 3700],\n   [[[3, 925], [4, 925], [5, 925], [6, 925], [7, 925]], 75850, 4375]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 15, 10, 25, 30, 25, 10, 12, 10, 30, 15, 10, 10, 10], 8, 17, 4000, 7400],\n   [[[8, 1850], [11, 1850], [12, 300]], 40000, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[20, 10, 30, 8, 20, 20, 30], 2, 10, 7000, 11000],\n   [[[3, 2750], [4, 2750], [5, 1500]], 107000, 0]],\n  ['control 1', [[12, 10, 15, 25, 30], 4, 4, 12500, 7400], [[], 0, 12500]],\n  ['control 2', [[30, 12, 15, 12, 30, 15, 12, 20, 20], -2, 1, 9000, 0], [[], 0, 9000]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break', [[10, 12, 10, 8, 10, 12, 12], 2, 5, 4000, 11000],\n   [[[2, 1250], [3, 2750]], 34500, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[30, 10, 8, 12, 30, 12, 8, 8, 15, 8, 12, 8, 30], 8, 14, 1500, 11000], [[[9, 1500]], 12000, 0]],\n  ['control 1', [[12, 20, 8, 15, 10, 8, 25, 12, 30, 12], 2, 12, 20000, 11000],\n   [[[2, 2750], [3, 2750], [4, 2750], [5, 2750], [6, 2750], [7, 2750], [8, 750], [9, 2750]], 270000,\n    0]],\n  ['control 2', [[30, 30, 20, 12, 12, 15, 12, 10], -1, 8, 7000, 7400],\n   [[[3, 1850], [4, 1850], [6, 1450], [7, 1850]], 80300, 0]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 20, 12, 12, 12, 12, 20, 15, 10, 12], 0, 11, 4000, 7400],\n   [[[0, 1850], [2, 300], [8, 1850]], 44300, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[12, 15, 15, 8, 12, 15, 10, 25, 25, 20, 20], 0, 14, 9000, 3700],\n   [[[0, 925], [1, 925], [2, 925], [3, 925], [4, 925], [5, 925], [6, 925], [7, 675], [9, 925],\n     [10, 925]],\n    134350, 0]],\n  ['control 1', [[12, 12, 8, 15, 10, 12, 20, 15, 12, 10, 12, 12, 15, 15], 12, 13, 1500, 3700],\n   [[[12, 925]], 13875, 575]],\n  ['control 2', [[10, 12, 10, 8, 10, 12, 12], 2, 5, 4000, 11000],\n   [[[2, 1250], [3, 2750]], 34500, 0]]]]\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":"df6da9d3b445837ad5d49968419589c982d7884a3adcdfbbe9e499c5ff307609","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(prices, arrive, depart, need_wh, max_w):\n    if need_wh <= 0 or max_w <= 0:\n        return [[], 0, max(need_wh, 0)]\n    slot_wh = max_w // 4\n    lo = max(arrive, 0)\n    hi = min(depart, len(prices))\n    window = list(range(lo, hi))\n    ranked = sorted(window, key=lambda s: (prices[s], s))\n    plan = []\n    left = need_wh\n    for s in ranked:\n        if left <= 0:\n            break\n        take = min(slot_wh, left)\n        plan.append([s, take])\n        left -= take\n    plan.sort()\n    cost = sum(wh * prices[s] for s, wh in plan)\n    return [plan, cost, left]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 10, 8, 25, 30, 10, 20, 10, 8, 10, 10, 25, 25], 3, 16, 1500, 3700],\n   [[[5, 575], [8, 925]], 13150, 0]],\n  ['regression: equal-price tie-break (partial repair)', [[30, 8, 15, 8, 20], -3, 4, 4000, 11000],\n   [[[1, 2750], [3, 1250]], 32000, 0]],\n  ['control 1', [[25, 30, 20, 12, 12], 2, 2, 20000, 11000], [[], 0, 20000]],\n  ['control 2', [[8, 15, 12, 10, 8, 25, 12, 8, 8, 20, 20, 25, 12, 8], -3, 15, 7000, 3700],\n   [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break', [[30, 10, 8, 15, 12, 12, 30, 25, 12], -1, 8, 4000, 7400],\n   [[[1, 1850], [2, 1850], [4, 300]], 36900, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[30, 10, 12, 15, 12, 12, 15, 15, 25, 30], -2, 13, 7000, 11000],\n   [[[1, 2750], [2, 2750], [4, 1500]], 78500, 0]],\n  ['control 1', [[30, 12, 20, 30, 25, 30, 12, 30, 20, 10, 20, 8, 15], 7, 12, 4000, 11000],\n   [[[9, 1250], [11, 2750]], 34500, 0]],\n  ['control 2', [[12, 12, 25, 30, 8, 20, 12, 12], 3, 11, 9000, 3700],\n   [[[3, 925], [4, 925], [5, 925], [6, 925], [7, 925]], 75850, 4375]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 15, 10, 25, 30, 25, 10, 12, 10, 30, 15, 10, 10, 10], 8, 17, 4000, 7400],\n   [[[8, 1850], [11, 1850], [12, 300]], 40000, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[20, 10, 30, 8, 20, 20, 30], 2, 10, 7000, 11000],\n   [[[3, 2750], [4, 2750], [5, 1500]], 107000, 0]],\n  ['control 1', [[12, 10, 15, 25, 30], 4, 4, 12500, 7400], [[], 0, 12500]],\n  ['control 2', [[30, 12, 15, 12, 30, 15, 12, 20, 20], -2, 1, 9000, 0], [[], 0, 9000]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break', [[10, 12, 10, 8, 10, 12, 12], 2, 5, 4000, 11000],\n   [[[2, 1250], [3, 2750]], 34500, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[30, 10, 8, 12, 30, 12, 8, 8, 15, 8, 12, 8, 30], 8, 14, 1500, 11000], [[[9, 1500]], 12000, 0]],\n  ['control 1', [[12, 20, 8, 15, 10, 8, 25, 12, 30, 12], 2, 12, 20000, 11000],\n   [[[2, 2750], [3, 2750], [4, 2750], [5, 2750], [6, 2750], [7, 2750], [8, 750], [9, 2750]], 270000,\n    0]],\n  ['control 2', [[30, 30, 20, 12, 12, 15, 12, 10], -1, 8, 7000, 7400],\n   [[[3, 1850], [4, 1850], [6, 1450], [7, 1850]], 80300, 0]]],\n [['boundary: nothing needed', [[10, 20, 30], 0, 3, 0, 7400], [[], 0, 0]],\n  ['boundary: empty window', [[10, 20, 30], 2, 2, 5000, 7400], [[], 0, 5000]],\n  ['boundary: departure beyond tariff horizon', [[30, 10, 10, 20], 1, 9, 5000, 7400],\n   [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0]],\n  ['regression: equal-price tie-break',\n   [[12, 20, 12, 12, 12, 12, 20, 15, 10, 12], 0, 11, 4000, 7400],\n   [[[0, 1850], [2, 300], [8, 1850]], 44300, 0]],\n  ['regression: equal-price tie-break (partial repair)',\n   [[12, 15, 15, 8, 12, 15, 10, 25, 25, 20, 20], 0, 14, 9000, 3700],\n   [[[0, 925], [1, 925], [2, 925], [3, 925], [4, 925], [5, 925], [6, 925], [7, 675], [9, 925],\n     [10, 925]],\n    134350, 0]],\n  ['control 1', [[12, 12, 8, 15, 10, 12, 20, 15, 12, 10, 12, 12, 15, 15], 12, 13, 1500, 3700],\n   [[[12, 925]], 13875, 575]],\n  ['control 2', [[10, 12, 10, 8, 10, 12, 12], 2, 5, 4000, 11000],\n   [[[2, 1250], [3, 2750]], 34500, 0]]]]\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-tou-cheapest-slots-equal-price-tie-break","generated_at":"2026-09-29T14:51:49.747584+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":"Break price ties by ascending slot index.","root_cause":"Equal-price slots are ranked latest-first, deferring energy toward the departure deadline.","sha256":"a160b11c476cf8056c91511940652e53769ca6af36350b96047b7103c984693a","title":"Time-of-use cheapest slot plan: equal-price tie-break · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.611,"exit_code":1,"observations":[{"actual":[[],0,0],"check":"boundary: nothing needed","expected":[[],0,0],"passed":true},{"actual":[[],0,5000],"check":"boundary: empty window","expected":[[],0,5000],"passed":true},{"actual":[[[1,1850],[2,1850],[3,1300]],63000,0],"check":"boundary: departure beyond tariff horizon","expected":[[[1,1850],[2,1850],[3,1300]],63000,0],"passed":true},{"actual":[[[8,925],[10,575]],13150,0],"check":"regression: equal-price tie-break","expected":[[[5,575],[8,925]],13150,0],"passed":false},{"actual":[[[1,1250],[3,2750]],32000,0],"check":"regression: equal-price tie-break (partial repair)","expected":[[[1,2750],[3,1250]],32000,0],"passed":false},{"actual":[[],0,20000],"check":"control 1","expected":[[],0,20000],"passed":true},{"actual":[[[0,925],[3,925],[4,925],[6,525],[7,925],[8,925],[12,925],[13,925]],63650,0],"check":"control 2","expected":[[[0,925],[2,925],[3,925],[4,925],[6,525],[7,925],[8,925],[13,925]],63650,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: nothing needed\", \"actual\": [[], 0, 0], \"expected\": [[], 0, 0], \"passed\": true}, {\"check\": \"boundary: empty window\", \"actual\": [[], 0, 5000], \"expected\": [[], 0, 5000], \"passed\": true}, {\"check\": \"boundary: departure beyond tariff horizon\", \"actual\": [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0], \"expected\": [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0], \"passed\": true}, {\"check\": \"regression: equal-price tie-break\", \"actual\": [[[8, 925], [10, 575]], 13150, 0], \"expected\": [[[5, 575], [8, 925]], 13150, 0], \"passed\": false}, {\"check\": \"regression: equal-price tie-break (partial repair)\", \"actual\": [[[1, 1250], [3, 2750]], 32000, 0], \"expected\": [[[1, 2750], [3, 1250]], 32000, 0], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[], 0, 20000], \"expected\": [[], 0, 20000], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[[0, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [12, 925], [13, 925]], 63650, 0], \"expected\": [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.025,"exit_code":1,"observations":[{"actual":[[],0,0],"check":"boundary: nothing needed","expected":[[],0,0],"passed":true},{"actual":[[],0,5000],"check":"boundary: empty window","expected":[[],0,5000],"passed":true},{"actual":[[[1,1850],[2,1850],[3,1300]],63000,0],"check":"boundary: departure beyond tariff horizon","expected":[[[1,1850],[2,1850],[3,1300]],63000,0],"passed":true},{"actual":[[[8,925],[10,575]],13150,0],"check":"regression: equal-price tie-break","expected":[[[5,575],[8,925]],13150,0],"passed":false},{"actual":[[[1,1250],[3,2750]],32000,0],"check":"regression: equal-price tie-break (partial repair)","expected":[[[1,2750],[3,1250]],32000,0],"passed":false},{"actual":[[],0,20000],"check":"control 1","expected":[[],0,20000],"passed":true},{"actual":[[[0,925],[3,925],[4,925],[6,525],[7,925],[8,925],[12,925],[13,925]],63650,0],"check":"control 2","expected":[[[0,925],[2,925],[3,925],[4,925],[6,525],[7,925],[8,925],[13,925]],63650,0],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: nothing needed\", \"actual\": [[], 0, 0], \"expected\": [[], 0, 0], \"passed\": true}, {\"check\": \"boundary: empty window\", \"actual\": [[], 0, 5000], \"expected\": [[], 0, 5000], \"passed\": true}, {\"check\": \"boundary: departure beyond tariff horizon\", \"actual\": [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0], \"expected\": [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0], \"passed\": true}, {\"check\": \"regression: equal-price tie-break\", \"actual\": [[[8, 925], [10, 575]], 13150, 0], \"expected\": [[[5, 575], [8, 925]], 13150, 0], \"passed\": false}, {\"check\": \"regression: equal-price tie-break (partial repair)\", \"actual\": [[[1, 1250], [3, 2750]], 32000, 0], \"expected\": [[[1, 2750], [3, 1250]], 32000, 0], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[], 0, 20000], \"expected\": [[], 0, 20000], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[[0, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [12, 925], [13, 925]], 63650, 0], \"expected\": [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.221,"exit_code":0,"observations":[{"actual":[[],0,0],"check":"boundary: nothing needed","expected":[[],0,0],"passed":true},{"actual":[[],0,5000],"check":"boundary: empty window","expected":[[],0,5000],"passed":true},{"actual":[[[1,1850],[2,1850],[3,1300]],63000,0],"check":"boundary: departure beyond tariff horizon","expected":[[[1,1850],[2,1850],[3,1300]],63000,0],"passed":true},{"actual":[[[5,575],[8,925]],13150,0],"check":"regression: equal-price tie-break","expected":[[[5,575],[8,925]],13150,0],"passed":true},{"actual":[[[1,2750],[3,1250]],32000,0],"check":"regression: equal-price tie-break (partial repair)","expected":[[[1,2750],[3,1250]],32000,0],"passed":true},{"actual":[[],0,20000],"check":"control 1","expected":[[],0,20000],"passed":true},{"actual":[[[0,925],[2,925],[3,925],[4,925],[6,525],[7,925],[8,925],[13,925]],63650,0],"check":"control 2","expected":[[[0,925],[2,925],[3,925],[4,925],[6,525],[7,925],[8,925],[13,925]],63650,0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: nothing needed\", \"actual\": [[], 0, 0], \"expected\": [[], 0, 0], \"passed\": true}, {\"check\": \"boundary: empty window\", \"actual\": [[], 0, 5000], \"expected\": [[], 0, 5000], \"passed\": true}, {\"check\": \"boundary: departure beyond tariff horizon\", \"actual\": [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0], \"expected\": [[[1, 1850], [2, 1850], [3, 1300]], 63000, 0], \"passed\": true}, {\"check\": \"regression: equal-price tie-break\", \"actual\": [[[5, 575], [8, 925]], 13150, 0], \"expected\": [[[5, 575], [8, 925]], 13150, 0], \"passed\": true}, {\"check\": \"regression: equal-price tie-break (partial repair)\", \"actual\": [[[1, 2750], [3, 1250]], 32000, 0], \"expected\": [[[1, 2750], [3, 1250]], 32000, 0], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [[], 0, 20000], \"expected\": [[], 0, 20000], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0], \"expected\": [[[0, 925], [2, 925], [3, 925], [4, 925], [6, 525], [7, 925], [8, 925], [13, 925]], 63650, 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}