{"abstract":"Customers who opted out of an event are curtailed anyway.","category":"EV charging session scheduling","checks":7,"contract":"profile is planned watts per slot. events are [start, end, pct, opt_out]; during [start, end) a non-opted-out event limits power to pct percent of plan (integer floor of p*pct/100), and overlapping events apply the lowest pct. Curtailed power never drops below min(plan, floor_w). Return [new profile, total curtailed watts over slots].","evaluation_group":"w2-ev_charging_session_scheduling-demand-response-curtailment","failed_approach":"Resetting to 100 percent on an opted-out event also cancels earlier active events.","family":"w2-ev_charging_session_scheduling-demand-response-curtailment-opt-out-honoured","id":"FA-93161","implementations":{"attempt":{"sha256":"1d9fd9560805b283f63b1511da9d56c1a76ab0fe2f9aa47dde56173261ac8c0f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(profile, events, floor_w):\n    out = []\n    for t, p in enumerate(profile):\n        pct = 100\n        for s, e, q, opt in events:\n            if opt:\n                pct = 100\n                continue\n            if s <= t < e and q < pct:\n                pct = q\n        new = p * pct // 100\n        new = max(new, min(p, floor_w))\n        out.append(new)\n    return [out, sum(profile) - sum(out)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 3680, 0],\n    [[8, 9, 60, False], [9, 10, 25, True], [4, 9, 75, True]], 0],\n   [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472]],\n  ['regression: opt-out honoured (partial repair)',\n   [[0, 0, 1111, 11000, 7400, 3680, 1111, 1380, 11000],\n    [[1, 3, 60, False], [5, 8, 60, False], [3, 8, 0, True]], 1380],\n   [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472]],\n  ['control 1',\n   [[1000, 3333, 1111, 1380, 11000], [[1, 2, 75, True], [5, 8, 75, False], [4, 5, 25, False]], 0],\n   [[1000, 3333, 1111, 1380, 2750], 8250]],\n  ['control 2',\n   [[1380, 1000, 1111, 1000, 1000, 3333, 3333, 7400, 1111, 3680, 11000, 1111],\n    [[8, 12, 60, False], [5, 7, 0, False]], 2000],\n   [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[7400, 1111, 3680, 11000, 1000, 11000, 1380, 3333, 0, 11000, 0],\n    [[4, 8, 0, False], [8, 11, 50, True]], 0],\n   [[7400, 1111, 3680, 11000, 0, 0, 0, 0, 0, 11000, 0], 16713]],\n  ['regression: opt-out honoured (partial repair)',\n   [[1111, 3680, 1000, 11000], [[3, 4, 75, False], [1, 1, 25, True]], 0],\n   [[1111, 3680, 1000, 8250], 2750]],\n  ['control 1',\n   [[3680, 1000, 3680, 1000, 3333, 2345, 1380, 1380, 1000, 3680, 7400],\n    [[6, 11, 25, True], [5, 10, 75, False]], 0],\n   [[3680, 1000, 3680, 1000, 3333, 1758, 1035, 1035, 750, 2760, 7400], 2447]],\n  ['control 2',\n   [[7400, 3680, 7400, 3333, 0, 1380, 1111, 3333, 3680, 7400, 1111, 1380],\n    [[0, 3, 75, True], [0, 3, 50, False]], 0],\n   [[3700, 1840, 3700, 3333, 0, 1380, 1111, 3333, 3680, 7400, 1111, 1380], 9240]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[7400, 1380, 2345, 7400, 3333, 0, 11000, 2345],\n    [[1, 3, 0, True], [8, 9, 75, False], [8, 8, 50, False]], 0],\n   [[7400, 1380, 2345, 7400, 3333, 0, 11000, 2345], 0]],\n  ['regression: opt-out honoured (partial repair)',\n   [[2345, 7400, 3680, 3333, 7400, 3680], [[2, 4, 60, False], [1, 5, 0, True], [5, 10, 25, False]],\n    2000],\n   [[2345, 7400, 2208, 2000, 7400, 2000], 4485]],\n  ['control 1',\n   [[0, 1000, 1000, 2345, 0, 3680, 1380, 3680], [[4, 8, 50, True], [5, 10, 75, True]], 0],\n   [[0, 1000, 1000, 2345, 0, 3680, 1380, 3680], 0]],\n  ['control 2',\n   [[3333, 7400, 1000, 2345, 11000, 2345], [[3, 7, 50, False], [5, 6, 25, True]], 2000],\n   [[3333, 7400, 1000, 2000, 5500, 2000], 6190]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[0, 3333, 3333, 0, 1380, 2345, 1111, 11000, 0],\n    [[7, 11, 25, False], [3, 4, 0, True], [3, 6, 0, True]], 2000],\n   [[0, 3333, 3333, 0, 1380, 2345, 1111, 2750, 0], 8250]],\n  ['regression: opt-out honoured (partial repair)',\n   [[2345, 0, 11000, 3680, 0, 1380, 0, 7400, 3680, 11000],\n    [[2, 5, 50, True], [2, 3, 60, False], [0, 4, 25, True]], 0],\n   [[2345, 0, 6600, 3680, 0, 1380, 0, 7400, 3680, 11000], 4400]],\n  ['control 1',\n   [[3680, 3680, 1000, 0, 3333, 1000, 3333, 3680],\n    [[1, 5, 0, False], [7, 11, 25, False], [6, 6, 60, False]], 2000],\n   [[3680, 2000, 1000, 0, 2000, 1000, 3333, 2000], 4693]],\n  ['control 2',\n   [[1380, 7400, 7400, 1000, 1111, 2345, 1380], [[4, 8, 0, False], [6, 10, 0, False]], 0],\n   [[1380, 7400, 7400, 1000, 0, 0, 0], 4836]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[0, 2345, 1000, 7400, 11000, 1380, 2345, 1380, 1111],\n    [[6, 10, 0, False], [3, 6, 25, True], [5, 8, 60, False]], 2000],\n   [[0, 2345, 1000, 7400, 11000, 1380, 2000, 1380, 1111], 345]],\n  ['regression: opt-out honoured (partial repair)',\n   [[1000, 2345, 1111, 1111, 1111, 1380, 1380, 2345],\n    [[4, 8, 50, False], [4, 4, 75, True], [0, 5, 25, False]], 2000],\n   [[1000, 2000, 1111, 1111, 1111, 1380, 1380, 2000], 690]],\n  ['control 1', [[3333, 0, 1000, 1111, 1380, 7400, 1380, 7400, 3680], [[5, 10, 0, True]], 1380],\n   [[3333, 0, 1000, 1111, 1380, 7400, 1380, 7400, 3680], 0]],\n  ['control 2', [[2345, 7400, 1111, 3333, 3333, 7400, 3680], [[5, 8, 25, False]], 0],\n   [[2345, 7400, 1111, 3333, 3333, 1850, 920], 8310]]]]\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":"1a5772c6f7ec6a91358a3b3cb2fada524e9d0ae33bc44d1c381d848f09c387c5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(profile, events, floor_w):\n    out = []\n    for t, p in enumerate(profile):\n        pct = 100\n        for s, e, q, opt in events:\n            if s <= t < e and q < pct:\n                pct = q\n        new = p * pct // 100\n        new = max(new, min(p, floor_w))\n        out.append(new)\n    return [out, sum(profile) - sum(out)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 3680, 0],\n    [[8, 9, 60, False], [9, 10, 25, True], [4, 9, 75, True]], 0],\n   [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472]],\n  ['regression: opt-out honoured (partial repair)',\n   [[0, 0, 1111, 11000, 7400, 3680, 1111, 1380, 11000],\n    [[1, 3, 60, False], [5, 8, 60, False], [3, 8, 0, True]], 1380],\n   [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472]],\n  ['control 1',\n   [[1000, 3333, 1111, 1380, 11000], [[1, 2, 75, True], [5, 8, 75, False], [4, 5, 25, False]], 0],\n   [[1000, 3333, 1111, 1380, 2750], 8250]],\n  ['control 2',\n   [[1380, 1000, 1111, 1000, 1000, 3333, 3333, 7400, 1111, 3680, 11000, 1111],\n    [[8, 12, 60, False], [5, 7, 0, False]], 2000],\n   [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[7400, 1111, 3680, 11000, 1000, 11000, 1380, 3333, 0, 11000, 0],\n    [[4, 8, 0, False], [8, 11, 50, True]], 0],\n   [[7400, 1111, 3680, 11000, 0, 0, 0, 0, 0, 11000, 0], 16713]],\n  ['regression: opt-out honoured (partial repair)',\n   [[1111, 3680, 1000, 11000], [[3, 4, 75, False], [1, 1, 25, True]], 0],\n   [[1111, 3680, 1000, 8250], 2750]],\n  ['control 1',\n   [[3680, 1000, 3680, 1000, 3333, 2345, 1380, 1380, 1000, 3680, 7400],\n    [[6, 11, 25, True], [5, 10, 75, False]], 0],\n   [[3680, 1000, 3680, 1000, 3333, 1758, 1035, 1035, 750, 2760, 7400], 2447]],\n  ['control 2',\n   [[7400, 3680, 7400, 3333, 0, 1380, 1111, 3333, 3680, 7400, 1111, 1380],\n    [[0, 3, 75, True], [0, 3, 50, False]], 0],\n   [[3700, 1840, 3700, 3333, 0, 1380, 1111, 3333, 3680, 7400, 1111, 1380], 9240]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[7400, 1380, 2345, 7400, 3333, 0, 11000, 2345],\n    [[1, 3, 0, True], [8, 9, 75, False], [8, 8, 50, False]], 0],\n   [[7400, 1380, 2345, 7400, 3333, 0, 11000, 2345], 0]],\n  ['regression: opt-out honoured (partial repair)',\n   [[2345, 7400, 3680, 3333, 7400, 3680], [[2, 4, 60, False], [1, 5, 0, True], [5, 10, 25, False]],\n    2000],\n   [[2345, 7400, 2208, 2000, 7400, 2000], 4485]],\n  ['control 1',\n   [[0, 1000, 1000, 2345, 0, 3680, 1380, 3680], [[4, 8, 50, True], [5, 10, 75, True]], 0],\n   [[0, 1000, 1000, 2345, 0, 3680, 1380, 3680], 0]],\n  ['control 2',\n   [[3333, 7400, 1000, 2345, 11000, 2345], [[3, 7, 50, False], [5, 6, 25, True]], 2000],\n   [[3333, 7400, 1000, 2000, 5500, 2000], 6190]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[0, 3333, 3333, 0, 1380, 2345, 1111, 11000, 0],\n    [[7, 11, 25, False], [3, 4, 0, True], [3, 6, 0, True]], 2000],\n   [[0, 3333, 3333, 0, 1380, 2345, 1111, 2750, 0], 8250]],\n  ['regression: opt-out honoured (partial repair)',\n   [[2345, 0, 11000, 3680, 0, 1380, 0, 7400, 3680, 11000],\n    [[2, 5, 50, True], [2, 3, 60, False], [0, 4, 25, True]], 0],\n   [[2345, 0, 6600, 3680, 0, 1380, 0, 7400, 3680, 11000], 4400]],\n  ['control 1',\n   [[3680, 3680, 1000, 0, 3333, 1000, 3333, 3680],\n    [[1, 5, 0, False], [7, 11, 25, False], [6, 6, 60, False]], 2000],\n   [[3680, 2000, 1000, 0, 2000, 1000, 3333, 2000], 4693]],\n  ['control 2',\n   [[1380, 7400, 7400, 1000, 1111, 2345, 1380], [[4, 8, 0, False], [6, 10, 0, False]], 0],\n   [[1380, 7400, 7400, 1000, 0, 0, 0], 4836]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[0, 2345, 1000, 7400, 11000, 1380, 2345, 1380, 1111],\n    [[6, 10, 0, False], [3, 6, 25, True], [5, 8, 60, False]], 2000],\n   [[0, 2345, 1000, 7400, 11000, 1380, 2000, 1380, 1111], 345]],\n  ['regression: opt-out honoured (partial repair)',\n   [[1000, 2345, 1111, 1111, 1111, 1380, 1380, 2345],\n    [[4, 8, 50, False], [4, 4, 75, True], [0, 5, 25, False]], 2000],\n   [[1000, 2000, 1111, 1111, 1111, 1380, 1380, 2000], 690]],\n  ['control 1', [[3333, 0, 1000, 1111, 1380, 7400, 1380, 7400, 3680], [[5, 10, 0, True]], 1380],\n   [[3333, 0, 1000, 1111, 1380, 7400, 1380, 7400, 3680], 0]],\n  ['control 2', [[2345, 7400, 1111, 3333, 3333, 7400, 3680], [[5, 8, 25, False]], 0],\n   [[2345, 7400, 1111, 3333, 3333, 1850, 920], 8310]]]]\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":"ce097d6501fb2242c83cf9fa2dde02c64d42eee1471a0ab3ed6dd0d8e93668ea","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(profile, events, floor_w):\n    out = []\n    for t, p in enumerate(profile):\n        pct = 100\n        for s, e, q, opt in events:\n            if opt:\n                continue\n            if s <= t < e and q < pct:\n                pct = q\n        new = p * pct // 100\n        new = max(new, min(p, floor_w))\n        out.append(new)\n    return [out, sum(profile) - sum(out)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 3680, 0],\n    [[8, 9, 60, False], [9, 10, 25, True], [4, 9, 75, True]], 0],\n   [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472]],\n  ['regression: opt-out honoured (partial repair)',\n   [[0, 0, 1111, 11000, 7400, 3680, 1111, 1380, 11000],\n    [[1, 3, 60, False], [5, 8, 60, False], [3, 8, 0, True]], 1380],\n   [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472]],\n  ['control 1',\n   [[1000, 3333, 1111, 1380, 11000], [[1, 2, 75, True], [5, 8, 75, False], [4, 5, 25, False]], 0],\n   [[1000, 3333, 1111, 1380, 2750], 8250]],\n  ['control 2',\n   [[1380, 1000, 1111, 1000, 1000, 3333, 3333, 7400, 1111, 3680, 11000, 1111],\n    [[8, 12, 60, False], [5, 7, 0, False]], 2000],\n   [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[7400, 1111, 3680, 11000, 1000, 11000, 1380, 3333, 0, 11000, 0],\n    [[4, 8, 0, False], [8, 11, 50, True]], 0],\n   [[7400, 1111, 3680, 11000, 0, 0, 0, 0, 0, 11000, 0], 16713]],\n  ['regression: opt-out honoured (partial repair)',\n   [[1111, 3680, 1000, 11000], [[3, 4, 75, False], [1, 1, 25, True]], 0],\n   [[1111, 3680, 1000, 8250], 2750]],\n  ['control 1',\n   [[3680, 1000, 3680, 1000, 3333, 2345, 1380, 1380, 1000, 3680, 7400],\n    [[6, 11, 25, True], [5, 10, 75, False]], 0],\n   [[3680, 1000, 3680, 1000, 3333, 1758, 1035, 1035, 750, 2760, 7400], 2447]],\n  ['control 2',\n   [[7400, 3680, 7400, 3333, 0, 1380, 1111, 3333, 3680, 7400, 1111, 1380],\n    [[0, 3, 75, True], [0, 3, 50, False]], 0],\n   [[3700, 1840, 3700, 3333, 0, 1380, 1111, 3333, 3680, 7400, 1111, 1380], 9240]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[7400, 1380, 2345, 7400, 3333, 0, 11000, 2345],\n    [[1, 3, 0, True], [8, 9, 75, False], [8, 8, 50, False]], 0],\n   [[7400, 1380, 2345, 7400, 3333, 0, 11000, 2345], 0]],\n  ['regression: opt-out honoured (partial repair)',\n   [[2345, 7400, 3680, 3333, 7400, 3680], [[2, 4, 60, False], [1, 5, 0, True], [5, 10, 25, False]],\n    2000],\n   [[2345, 7400, 2208, 2000, 7400, 2000], 4485]],\n  ['control 1',\n   [[0, 1000, 1000, 2345, 0, 3680, 1380, 3680], [[4, 8, 50, True], [5, 10, 75, True]], 0],\n   [[0, 1000, 1000, 2345, 0, 3680, 1380, 3680], 0]],\n  ['control 2',\n   [[3333, 7400, 1000, 2345, 11000, 2345], [[3, 7, 50, False], [5, 6, 25, True]], 2000],\n   [[3333, 7400, 1000, 2000, 5500, 2000], 6190]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[0, 3333, 3333, 0, 1380, 2345, 1111, 11000, 0],\n    [[7, 11, 25, False], [3, 4, 0, True], [3, 6, 0, True]], 2000],\n   [[0, 3333, 3333, 0, 1380, 2345, 1111, 2750, 0], 8250]],\n  ['regression: opt-out honoured (partial repair)',\n   [[2345, 0, 11000, 3680, 0, 1380, 0, 7400, 3680, 11000],\n    [[2, 5, 50, True], [2, 3, 60, False], [0, 4, 25, True]], 0],\n   [[2345, 0, 6600, 3680, 0, 1380, 0, 7400, 3680, 11000], 4400]],\n  ['control 1',\n   [[3680, 3680, 1000, 0, 3333, 1000, 3333, 3680],\n    [[1, 5, 0, False], [7, 11, 25, False], [6, 6, 60, False]], 2000],\n   [[3680, 2000, 1000, 0, 2000, 1000, 3333, 2000], 4693]],\n  ['control 2',\n   [[1380, 7400, 7400, 1000, 1111, 2345, 1380], [[4, 8, 0, False], [6, 10, 0, False]], 0],\n   [[1380, 7400, 7400, 1000, 0, 0, 0], 4836]]],\n [['boundary: event ends at slot', [[3680, 3680, 3680], [[0, 1, 50, False]], 0],\n   [[1840, 3680, 3680], 1840]],\n  ['boundary: opted-out event', [[7400, 7400], [[0, 2, 0, True]], 1380], [[7400, 7400], 0]],\n  ['boundary: plan below floor', [[1000, 7400], [[0, 2, 0, False]], 1380], [[1000, 1380], 6020]],\n  ['regression: opt-out honoured',\n   [[0, 2345, 1000, 7400, 11000, 1380, 2345, 1380, 1111],\n    [[6, 10, 0, False], [3, 6, 25, True], [5, 8, 60, False]], 2000],\n   [[0, 2345, 1000, 7400, 11000, 1380, 2000, 1380, 1111], 345]],\n  ['regression: opt-out honoured (partial repair)',\n   [[1000, 2345, 1111, 1111, 1111, 1380, 1380, 2345],\n    [[4, 8, 50, False], [4, 4, 75, True], [0, 5, 25, False]], 2000],\n   [[1000, 2000, 1111, 1111, 1111, 1380, 1380, 2000], 690]],\n  ['control 1', [[3333, 0, 1000, 1111, 1380, 7400, 1380, 7400, 3680], [[5, 10, 0, True]], 1380],\n   [[3333, 0, 1000, 1111, 1380, 7400, 1380, 7400, 3680], 0]],\n  ['control 2', [[2345, 7400, 1111, 3333, 3333, 7400, 3680], [[5, 8, 25, False]], 0],\n   [[2345, 7400, 1111, 3333, 3333, 1850, 920], 8310]]]]\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-demand-response-curtailment-opt-out-honoured","generated_at":"2026-09-29T14:51:52.564220+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":"Skip opted-out events.","root_cause":"The opt-out flag is never consulted.","sha256":"59bc937463340b842a57345b7110a4e405a64e1424213701d14c05b54296a99e","title":"Demand-response curtailment of a charge plan: opt-out honoured · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.761,"exit_code":1,"observations":[{"actual":[[1840,3680,3680],1840],"check":"boundary: event ends at slot","expected":[[1840,3680,3680],1840],"passed":true},{"actual":[[7400,7400],0],"check":"boundary: opted-out event","expected":[[7400,7400],0],"passed":true},{"actual":[[1000,1380],6020],"check":"boundary: plan below floor","expected":[[1000,1380],6020],"passed":true},{"actual":[[1380,1000,3333,2345,1000,1380,11000,3333,3680,0],0],"check":"regression: opt-out honoured","expected":[[1380,1000,3333,2345,1000,1380,11000,3333,2208,0],1472],"passed":false},{"actual":[[0,0,1111,11000,7400,3680,1111,1380,11000],0],"check":"regression: opt-out honoured (partial repair)","expected":[[0,0,1111,11000,7400,2208,1111,1380,11000],1472],"passed":false},{"actual":[[1000,3333,1111,1380,2750],8250],"check":"control 1","expected":[[1000,3333,1111,1380,2750],8250],"passed":true},{"actual":[[1380,1000,1111,1000,1000,2000,2000,7400,1111,2208,6600,1111],8538],"check":"control 2","expected":[[1380,1000,1111,1000,1000,2000,2000,7400,1111,2208,6600,1111],8538],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: event ends at slot\", \"actual\": [[1840, 3680, 3680], 1840], \"expected\": [[1840, 3680, 3680], 1840], \"passed\": true}, {\"check\": \"boundary: opted-out event\", \"actual\": [[7400, 7400], 0], \"expected\": [[7400, 7400], 0], \"passed\": true}, {\"check\": \"boundary: plan below floor\", \"actual\": [[1000, 1380], 6020], \"expected\": [[1000, 1380], 6020], \"passed\": true}, {\"check\": \"regression: opt-out honoured\", \"actual\": [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 3680, 0], 0], \"expected\": [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472], \"passed\": false}, {\"check\": \"regression: opt-out honoured (partial repair)\", \"actual\": [[0, 0, 1111, 11000, 7400, 3680, 1111, 1380, 11000], 0], \"expected\": [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[1000, 3333, 1111, 1380, 2750], 8250], \"expected\": [[1000, 3333, 1111, 1380, 2750], 8250], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538], \"expected\": [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.618,"exit_code":1,"observations":[{"actual":[[1840,3680,3680],1840],"check":"boundary: event ends at slot","expected":[[1840,3680,3680],1840],"passed":true},{"actual":[[1380,1380],12040],"check":"boundary: opted-out event","expected":[[7400,7400],0],"passed":false},{"actual":[[1000,1380],6020],"check":"boundary: plan below floor","expected":[[1000,1380],6020],"passed":true},{"actual":[[1380,1000,3333,2345,750,1035,8250,2499,2208,0],5651],"check":"regression: opt-out honoured","expected":[[1380,1000,3333,2345,1000,1380,11000,3333,2208,0],1472],"passed":false},{"actual":[[0,0,1111,1380,1380,1380,1111,1380,11000],17940],"check":"regression: opt-out honoured (partial repair)","expected":[[0,0,1111,11000,7400,2208,1111,1380,11000],1472],"passed":false},{"actual":[[1000,2499,1111,1380,2750],9084],"check":"control 1","expected":[[1000,3333,1111,1380,2750],8250],"passed":false},{"actual":[[1380,1000,1111,1000,1000,2000,2000,7400,1111,2208,6600,1111],8538],"check":"control 2","expected":[[1380,1000,1111,1000,1000,2000,2000,7400,1111,2208,6600,1111],8538],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: event ends at slot\", \"actual\": [[1840, 3680, 3680], 1840], \"expected\": [[1840, 3680, 3680], 1840], \"passed\": true}, {\"check\": \"boundary: opted-out event\", \"actual\": [[1380, 1380], 12040], \"expected\": [[7400, 7400], 0], \"passed\": false}, {\"check\": \"boundary: plan below floor\", \"actual\": [[1000, 1380], 6020], \"expected\": [[1000, 1380], 6020], \"passed\": true}, {\"check\": \"regression: opt-out honoured\", \"actual\": [[1380, 1000, 3333, 2345, 750, 1035, 8250, 2499, 2208, 0], 5651], \"expected\": [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472], \"passed\": false}, {\"check\": \"regression: opt-out honoured (partial repair)\", \"actual\": [[0, 0, 1111, 1380, 1380, 1380, 1111, 1380, 11000], 17940], \"expected\": [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[1000, 2499, 1111, 1380, 2750], 9084], \"expected\": [[1000, 3333, 1111, 1380, 2750], 8250], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538], \"expected\": [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.164,"exit_code":0,"observations":[{"actual":[[1840,3680,3680],1840],"check":"boundary: event ends at slot","expected":[[1840,3680,3680],1840],"passed":true},{"actual":[[7400,7400],0],"check":"boundary: opted-out event","expected":[[7400,7400],0],"passed":true},{"actual":[[1000,1380],6020],"check":"boundary: plan below floor","expected":[[1000,1380],6020],"passed":true},{"actual":[[1380,1000,3333,2345,1000,1380,11000,3333,2208,0],1472],"check":"regression: opt-out honoured","expected":[[1380,1000,3333,2345,1000,1380,11000,3333,2208,0],1472],"passed":true},{"actual":[[0,0,1111,11000,7400,2208,1111,1380,11000],1472],"check":"regression: opt-out honoured (partial repair)","expected":[[0,0,1111,11000,7400,2208,1111,1380,11000],1472],"passed":true},{"actual":[[1000,3333,1111,1380,2750],8250],"check":"control 1","expected":[[1000,3333,1111,1380,2750],8250],"passed":true},{"actual":[[1380,1000,1111,1000,1000,2000,2000,7400,1111,2208,6600,1111],8538],"check":"control 2","expected":[[1380,1000,1111,1000,1000,2000,2000,7400,1111,2208,6600,1111],8538],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: event ends at slot\", \"actual\": [[1840, 3680, 3680], 1840], \"expected\": [[1840, 3680, 3680], 1840], \"passed\": true}, {\"check\": \"boundary: opted-out event\", \"actual\": [[7400, 7400], 0], \"expected\": [[7400, 7400], 0], \"passed\": true}, {\"check\": \"boundary: plan below floor\", \"actual\": [[1000, 1380], 6020], \"expected\": [[1000, 1380], 6020], \"passed\": true}, {\"check\": \"regression: opt-out honoured\", \"actual\": [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472], \"expected\": [[1380, 1000, 3333, 2345, 1000, 1380, 11000, 3333, 2208, 0], 1472], \"passed\": true}, {\"check\": \"regression: opt-out honoured (partial repair)\", \"actual\": [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472], \"expected\": [[0, 0, 1111, 11000, 7400, 2208, 1111, 1380, 11000], 1472], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [[1000, 3333, 1111, 1380, 2750], 8250], \"expected\": [[1000, 3333, 1111, 1380, 2750], 8250], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538], \"expected\": [[1380, 1000, 1111, 1000, 1000, 2000, 2000, 7400, 1111, 2208, 6600, 1111], 8538], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}