{"abstract":"Surplus exactly at the start threshold never starts charging.","category":"EV charging session scheduling","checks":7,"contract":"samples are per-minute PV surplus watts. Charging starts on the sample completing start_delay consecutive samples >= start_w, and stops on the sample completing stop_delay consecutive samples < stop_w; counters reset on each transition and on any interrupting sample. While charging the power is the surplus clamped to [1380, 3680] W, else 0. Return [powers, number of starts].","evaluation_group":"w2-ev_charging_session_scheduling-pv-surplus-follow","failed_approach":"Qualifying against the lower stop threshold starts charging on too little surplus.","family":"w2-ev_charging_session_scheduling-pv-surplus-follow-start-threshold-comparison","id":"FA-93006","implementations":{"attempt":{"sha256":"90e80256a55effba39852863687fc671bf4493d91395f2777d3ab530530192fa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples, start_w, stop_w, start_delay, stop_delay):\n    on = False\n    run = 0\n    out = []\n    starts = 0\n    for s in samples:\n        if not on:\n            run = run + 1 if s >= stop_w else 0\n            if run >= start_delay:\n                on = True\n                starts += 1\n                run = 0\n        else:\n            run = run + 1 if s < stop_w else 0\n            if run >= stop_delay:\n                on = False\n                run = 0\n        out.append(min(max(s, 1380), 3680) if on else 0)\n    return [out, starts]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[1686, 3340, 1407, 3891, 3528, 2938, 328, 2002, 686, 0, 2304, 1141, 635, 0, 3641, 1580], 2500,\n    1400, 2, 1],\n   [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1]],\n  ['control 1', [[1632, 1402, 0, 1011, 1056, 2204, 0, 0, 0, 0, 0, 2059, 0], 1400, 1400, 3, 1],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0]],\n  ['control 2',\n   [[5160, 1495, 4246, 2693, 3633, 943, 5200, 3902, 2959, 1685, 2602], 1400, 800, 3, 2],\n   [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1]],\n  ['control 3',\n   [[1383, 3471, 4209, 3007, 3092, 4130, 867, 4816, 5640, 2694, 3409, 891, 1847, 5749], 2000, 1400,\n    2, 1],\n   [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[3009, 3188, 1176, 956, 2989, 1246, 110, 1401, 1727, 0, 2027], 2500, 800, 1, 1],\n   [[3009, 3188, 1380, 1380, 2989, 1380, 0, 0, 0, 0, 0], 1]],\n  ['control 1', [[2491, 6454, 5581, 5791, 7280, 4927, 5591, 6410], 1400, 1000, 1, 1],\n   [[2491, 3680, 3680, 3680, 3680, 3680, 3680, 3680], 1]],\n  ['control 2', [[3110, 2987, 3876, 6142, 2422, 5132, 2143, 6887, 4896, 4908], 2000, 1000, 3, 2],\n   [[0, 0, 3680, 3680, 2422, 3680, 2143, 3680, 3680, 3680], 1]],\n  ['control 3',\n   [[3891, 1697, 5264, 4956, 5195, 2229, 1384, 5164, 2148, 4795, 1650, 5684, 1327, 5638, 2016],\n    2500, 1000, 3, 2],\n   [[0, 0, 0, 0, 3680, 2229, 1384, 3680, 2148, 3680, 1650, 3680, 1380, 3680, 2016], 1]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[2067, 4963, 1306, 1989, 1340, 4956, 2993, 3711, 1472, 4753, 796, 4896, 2670], 2000, 800, 3, 3],\n   [[0, 0, 0, 0, 0, 0, 0, 3680, 1472, 3680, 1380, 3680, 2670], 1]],\n  ['control 1', [[5534, 5945, 5877, 6991, 3580, 5525, 6786, 5530, 2720, 6795], 2000, 800, 1, 1],\n   [[3680, 3680, 3680, 3680, 3580, 3680, 3680, 3680, 2720, 3680], 1]],\n  ['control 2',\n   [[3289, 1459, 5221, 3468, 1247, 4575, 1243, 1923, 2108, 3912, 3417, 2756, 1675, 1378, 5487],\n    2000, 1400, 3, 2],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3417, 2756, 1675, 1380, 3680], 1]],\n  ['control 3',\n   [[2013, 328, 0, 0, 4433, 1982, 4223, 1757, 3755, 2681, 4171, 2453, 0, 2324], 1400, 1000, 1, 2],\n   [[2013, 1380, 0, 0, 3680, 1982, 3680, 1757, 3680, 2681, 3680, 2453, 1380, 2324], 2]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[815, 1005, 1941, 0, 2807, 870, 2493, 0, 931, 417, 963, 0, 0], 2000, 800, 2, 1],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0]],\n  ['control 1', [[2567, 1353, 0, 2085, 0, 0, 116, 324, 1725, 810], 1400, 1400, 1, 2],\n   [[2567, 1380, 0, 2085, 1380, 0, 0, 0, 1725, 1380], 3]],\n  ['control 2',\n   [[3612, 3481, 805, 1117, 2494, 200, 653, 4188, 280, 752, 4261, 4604], 1400, 1000, 1, 1],\n   [[3612, 3481, 0, 0, 2494, 0, 0, 3680, 0, 0, 3680, 3680], 4]],\n  ['control 3', [[1873, 4610, 989, 2113, 4201, 1521], 2500, 800, 2, 2], [[0, 0, 0, 0, 0, 0], 0]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[391, 1113, 0, 2478, 0, 0, 0, 0, 0, 0, 2459], 2000, 800, 1, 3],\n   [[0, 0, 0, 2478, 1380, 1380, 0, 0, 0, 0, 2459], 2]],\n  ['control 1', [[1756, 0, 1045, 0, 1278, 3133, 2829, 2511, 2201, 3176, 1898], 2000, 1400, 3, 3],\n   [[0, 0, 0, 0, 0, 0, 0, 2511, 2201, 3176, 1898], 1]],\n  ['control 2', [[3627, 2896, 3017, 2824, 6221, 3547, 1687, 5138], 1400, 800, 2, 2],\n   [[0, 2896, 3017, 2824, 3680, 3547, 1687, 3680], 1]],\n  ['control 3',\n   [[2094, 1100, 2881, 1794, 1218, 2481, 5490, 2037, 3975, 3503, 4445], 2000, 1400, 3, 2],\n   [[0, 0, 0, 0, 0, 0, 0, 2037, 3680, 3503, 3680], 1]]]]\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":"60aac292fb3471ff115759309aa9f213c34fd781c5573995089d7af20986a33e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples, start_w, stop_w, start_delay, stop_delay):\n    on = False\n    run = 0\n    out = []\n    starts = 0\n    for s in samples:\n        if not on:\n            run = run + 1 if s > start_w else 0\n            if run >= start_delay:\n                on = True\n                starts += 1\n                run = 0\n        else:\n            run = run + 1 if s < stop_w else 0\n            if run >= stop_delay:\n                on = False\n                run = 0\n        out.append(min(max(s, 1380), 3680) if on else 0)\n    return [out, starts]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[1686, 3340, 1407, 3891, 3528, 2938, 328, 2002, 686, 0, 2304, 1141, 635, 0, 3641, 1580], 2500,\n    1400, 2, 1],\n   [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1]],\n  ['control 1', [[1632, 1402, 0, 1011, 1056, 2204, 0, 0, 0, 0, 0, 2059, 0], 1400, 1400, 3, 1],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0]],\n  ['control 2',\n   [[5160, 1495, 4246, 2693, 3633, 943, 5200, 3902, 2959, 1685, 2602], 1400, 800, 3, 2],\n   [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1]],\n  ['control 3',\n   [[1383, 3471, 4209, 3007, 3092, 4130, 867, 4816, 5640, 2694, 3409, 891, 1847, 5749], 2000, 1400,\n    2, 1],\n   [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[3009, 3188, 1176, 956, 2989, 1246, 110, 1401, 1727, 0, 2027], 2500, 800, 1, 1],\n   [[3009, 3188, 1380, 1380, 2989, 1380, 0, 0, 0, 0, 0], 1]],\n  ['control 1', [[2491, 6454, 5581, 5791, 7280, 4927, 5591, 6410], 1400, 1000, 1, 1],\n   [[2491, 3680, 3680, 3680, 3680, 3680, 3680, 3680], 1]],\n  ['control 2', [[3110, 2987, 3876, 6142, 2422, 5132, 2143, 6887, 4896, 4908], 2000, 1000, 3, 2],\n   [[0, 0, 3680, 3680, 2422, 3680, 2143, 3680, 3680, 3680], 1]],\n  ['control 3',\n   [[3891, 1697, 5264, 4956, 5195, 2229, 1384, 5164, 2148, 4795, 1650, 5684, 1327, 5638, 2016],\n    2500, 1000, 3, 2],\n   [[0, 0, 0, 0, 3680, 2229, 1384, 3680, 2148, 3680, 1650, 3680, 1380, 3680, 2016], 1]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[2067, 4963, 1306, 1989, 1340, 4956, 2993, 3711, 1472, 4753, 796, 4896, 2670], 2000, 800, 3, 3],\n   [[0, 0, 0, 0, 0, 0, 0, 3680, 1472, 3680, 1380, 3680, 2670], 1]],\n  ['control 1', [[5534, 5945, 5877, 6991, 3580, 5525, 6786, 5530, 2720, 6795], 2000, 800, 1, 1],\n   [[3680, 3680, 3680, 3680, 3580, 3680, 3680, 3680, 2720, 3680], 1]],\n  ['control 2',\n   [[3289, 1459, 5221, 3468, 1247, 4575, 1243, 1923, 2108, 3912, 3417, 2756, 1675, 1378, 5487],\n    2000, 1400, 3, 2],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3417, 2756, 1675, 1380, 3680], 1]],\n  ['control 3',\n   [[2013, 328, 0, 0, 4433, 1982, 4223, 1757, 3755, 2681, 4171, 2453, 0, 2324], 1400, 1000, 1, 2],\n   [[2013, 1380, 0, 0, 3680, 1982, 3680, 1757, 3680, 2681, 3680, 2453, 1380, 2324], 2]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[815, 1005, 1941, 0, 2807, 870, 2493, 0, 931, 417, 963, 0, 0], 2000, 800, 2, 1],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0]],\n  ['control 1', [[2567, 1353, 0, 2085, 0, 0, 116, 324, 1725, 810], 1400, 1400, 1, 2],\n   [[2567, 1380, 0, 2085, 1380, 0, 0, 0, 1725, 1380], 3]],\n  ['control 2',\n   [[3612, 3481, 805, 1117, 2494, 200, 653, 4188, 280, 752, 4261, 4604], 1400, 1000, 1, 1],\n   [[3612, 3481, 0, 0, 2494, 0, 0, 3680, 0, 0, 3680, 3680], 4]],\n  ['control 3', [[1873, 4610, 989, 2113, 4201, 1521], 2500, 800, 2, 2], [[0, 0, 0, 0, 0, 0], 0]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[391, 1113, 0, 2478, 0, 0, 0, 0, 0, 0, 2459], 2000, 800, 1, 3],\n   [[0, 0, 0, 2478, 1380, 1380, 0, 0, 0, 0, 2459], 2]],\n  ['control 1', [[1756, 0, 1045, 0, 1278, 3133, 2829, 2511, 2201, 3176, 1898], 2000, 1400, 3, 3],\n   [[0, 0, 0, 0, 0, 0, 0, 2511, 2201, 3176, 1898], 1]],\n  ['control 2', [[3627, 2896, 3017, 2824, 6221, 3547, 1687, 5138], 1400, 800, 2, 2],\n   [[0, 2896, 3017, 2824, 3680, 3547, 1687, 3680], 1]],\n  ['control 3',\n   [[2094, 1100, 2881, 1794, 1218, 2481, 5490, 2037, 3975, 3503, 4445], 2000, 1400, 3, 2],\n   [[0, 0, 0, 0, 0, 0, 0, 2037, 3680, 3503, 3680], 1]]]]\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":"1f56d5569823e8db0da95febfb33cb6b042ba415d0d966db972cbafd21515e7f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(samples, start_w, stop_w, start_delay, stop_delay):\n    on = False\n    run = 0\n    out = []\n    starts = 0\n    for s in samples:\n        if not on:\n            run = run + 1 if s >= start_w else 0\n            if run >= start_delay:\n                on = True\n                starts += 1\n                run = 0\n        else:\n            run = run + 1 if s < stop_w else 0\n            if run >= stop_delay:\n                on = False\n                run = 0\n        out.append(min(max(s, 1380), 3680) if on else 0)\n    return [out, starts]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[1686, 3340, 1407, 3891, 3528, 2938, 328, 2002, 686, 0, 2304, 1141, 635, 0, 3641, 1580], 2500,\n    1400, 2, 1],\n   [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1]],\n  ['control 1', [[1632, 1402, 0, 1011, 1056, 2204, 0, 0, 0, 0, 0, 2059, 0], 1400, 1400, 3, 1],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0]],\n  ['control 2',\n   [[5160, 1495, 4246, 2693, 3633, 943, 5200, 3902, 2959, 1685, 2602], 1400, 800, 3, 2],\n   [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1]],\n  ['control 3',\n   [[1383, 3471, 4209, 3007, 3092, 4130, 867, 4816, 5640, 2694, 3409, 891, 1847, 5749], 2000, 1400,\n    2, 1],\n   [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[3009, 3188, 1176, 956, 2989, 1246, 110, 1401, 1727, 0, 2027], 2500, 800, 1, 1],\n   [[3009, 3188, 1380, 1380, 2989, 1380, 0, 0, 0, 0, 0], 1]],\n  ['control 1', [[2491, 6454, 5581, 5791, 7280, 4927, 5591, 6410], 1400, 1000, 1, 1],\n   [[2491, 3680, 3680, 3680, 3680, 3680, 3680, 3680], 1]],\n  ['control 2', [[3110, 2987, 3876, 6142, 2422, 5132, 2143, 6887, 4896, 4908], 2000, 1000, 3, 2],\n   [[0, 0, 3680, 3680, 2422, 3680, 2143, 3680, 3680, 3680], 1]],\n  ['control 3',\n   [[3891, 1697, 5264, 4956, 5195, 2229, 1384, 5164, 2148, 4795, 1650, 5684, 1327, 5638, 2016],\n    2500, 1000, 3, 2],\n   [[0, 0, 0, 0, 3680, 2229, 1384, 3680, 2148, 3680, 1650, 3680, 1380, 3680, 2016], 1]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[2067, 4963, 1306, 1989, 1340, 4956, 2993, 3711, 1472, 4753, 796, 4896, 2670], 2000, 800, 3, 3],\n   [[0, 0, 0, 0, 0, 0, 0, 3680, 1472, 3680, 1380, 3680, 2670], 1]],\n  ['control 1', [[5534, 5945, 5877, 6991, 3580, 5525, 6786, 5530, 2720, 6795], 2000, 800, 1, 1],\n   [[3680, 3680, 3680, 3680, 3580, 3680, 3680, 3680, 2720, 3680], 1]],\n  ['control 2',\n   [[3289, 1459, 5221, 3468, 1247, 4575, 1243, 1923, 2108, 3912, 3417, 2756, 1675, 1378, 5487],\n    2000, 1400, 3, 2],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3417, 2756, 1675, 1380, 3680], 1]],\n  ['control 3',\n   [[2013, 328, 0, 0, 4433, 1982, 4223, 1757, 3755, 2681, 4171, 2453, 0, 2324], 1400, 1000, 1, 2],\n   [[2013, 1380, 0, 0, 3680, 1982, 3680, 1757, 3680, 2681, 3680, 2453, 1380, 2324], 2]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[815, 1005, 1941, 0, 2807, 870, 2493, 0, 931, 417, 963, 0, 0], 2000, 800, 2, 1],\n   [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0]],\n  ['control 1', [[2567, 1353, 0, 2085, 0, 0, 116, 324, 1725, 810], 1400, 1400, 1, 2],\n   [[2567, 1380, 0, 2085, 1380, 0, 0, 0, 1725, 1380], 3]],\n  ['control 2',\n   [[3612, 3481, 805, 1117, 2494, 200, 653, 4188, 280, 752, 4261, 4604], 1400, 1000, 1, 1],\n   [[3612, 3481, 0, 0, 2494, 0, 0, 3680, 0, 0, 3680, 3680], 4]],\n  ['control 3', [[1873, 4610, 989, 2113, 4201, 1521], 2500, 800, 2, 2], [[0, 0, 0, 0, 0, 0], 0]]],\n [['boundary: surplus exactly at start threshold', [[2000, 2000, 2000, 500], 2000, 1000, 2, 1],\n   [[0, 2000, 2000, 0], 1]],\n  ['boundary: never enough sun', [[100, 200, 300, 400, 500, 600], 1400, 800, 1, 1],\n   [[0, 0, 0, 0, 0, 0], 0]],\n  ['boundary: cloud dip shorter than stop delay',\n   [[3000, 3000, 500, 3000, 500, 500, 3000], 1400, 800, 1, 2],\n   [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2]],\n  ['regression: start threshold comparison (partial repair)',\n   [[391, 1113, 0, 2478, 0, 0, 0, 0, 0, 0, 2459], 2000, 800, 1, 3],\n   [[0, 0, 0, 2478, 1380, 1380, 0, 0, 0, 0, 2459], 2]],\n  ['control 1', [[1756, 0, 1045, 0, 1278, 3133, 2829, 2511, 2201, 3176, 1898], 2000, 1400, 3, 3],\n   [[0, 0, 0, 0, 0, 0, 0, 2511, 2201, 3176, 1898], 1]],\n  ['control 2', [[3627, 2896, 3017, 2824, 6221, 3547, 1687, 5138], 1400, 800, 2, 2],\n   [[0, 2896, 3017, 2824, 3680, 3547, 1687, 3680], 1]],\n  ['control 3',\n   [[2094, 1100, 2881, 1794, 1218, 2481, 5490, 2037, 3975, 3503, 4445], 2000, 1400, 3, 2],\n   [[0, 0, 0, 0, 0, 0, 0, 2037, 3680, 3503, 3680], 1]]]]\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-pv-surplus-follow-start-threshold-comparison","generated_at":"2026-09-29T14:51:51.119094+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":"Count samples with surplus >= start_w.","root_cause":"The start qualification uses a strict comparison.","sha256":"3c3778bd4c5c35b15c684640b4da4f88b261665c98d94c53f846f5cec24d3c6a","title":"PV surplus following with hysteresis: start threshold comparison · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.842,"exit_code":1,"observations":[{"actual":[[0,2000,2000,0],1],"check":"boundary: surplus exactly at start threshold","expected":[[0,2000,2000,0],1],"passed":true},{"actual":[[0,0,0,0,0,0],0],"check":"boundary: never enough sun","expected":[[0,0,0,0,0,0],0],"passed":true},{"actual":[[3000,3000,1380,3000,1380,0,3000],2],"check":"boundary: cloud dip shorter than stop delay","expected":[[3000,3000,1380,3000,1380,0,3000],2],"passed":true},{"actual":[[0,3340,1407,3680,3528,2938,0,0,0,0,0,0,0,0,0,1580],2],"check":"regression: start threshold comparison (partial repair)","expected":[[0,0,0,0,3528,2938,0,0,0,0,0,0,0,0,0,0],1],"passed":false},{"actual":[[0,0,0,0,0,0,0,0,0,0,0,0,0],0],"check":"control 1","expected":[[0,0,0,0,0,0,0,0,0,0,0,0,0],0],"passed":true},{"actual":[[0,0,3680,2693,3633,1380,3680,3680,2959,1685,2602],1],"check":"control 2","expected":[[0,0,3680,2693,3633,1380,3680,3680,2959,1685,2602],1],"passed":true},{"actual":[[0,0,3680,3007,3092,3680,0,0,3680,2694,3409,0,0,3680],3],"check":"control 3","expected":[[0,0,3680,3007,3092,3680,0,0,3680,2694,3409,0,0,0],2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: surplus exactly at start threshold\", \"actual\": [[0, 2000, 2000, 0], 1], \"expected\": [[0, 2000, 2000, 0], 1], \"passed\": true}, {\"check\": \"boundary: never enough sun\", \"actual\": [[0, 0, 0, 0, 0, 0], 0], \"expected\": [[0, 0, 0, 0, 0, 0], 0], \"passed\": true}, {\"check\": \"boundary: cloud dip shorter than stop delay\", \"actual\": [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2], \"expected\": [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2], \"passed\": true}, {\"check\": \"regression: start threshold comparison (partial repair)\", \"actual\": [[0, 3340, 1407, 3680, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1580], 2], \"expected\": [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0], \"expected\": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1], \"expected\": [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 3680], 3], \"expected\": [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.0,"exit_code":1,"observations":[{"actual":[[0,0,0,0],0],"check":"boundary: surplus exactly at start threshold","expected":[[0,2000,2000,0],1],"passed":false},{"actual":[[0,0,0,0,0,0],0],"check":"boundary: never enough sun","expected":[[0,0,0,0,0,0],0],"passed":true},{"actual":[[3000,3000,1380,3000,1380,0,3000],2],"check":"boundary: cloud dip shorter than stop delay","expected":[[3000,3000,1380,3000,1380,0,3000],2],"passed":true},{"actual":[[0,0,0,0,3528,2938,0,0,0,0,0,0,0,0,0,0],1],"check":"regression: start threshold comparison (partial repair)","expected":[[0,0,0,0,3528,2938,0,0,0,0,0,0,0,0,0,0],1],"passed":true},{"actual":[[0,0,0,0,0,0,0,0,0,0,0,0,0],0],"check":"control 1","expected":[[0,0,0,0,0,0,0,0,0,0,0,0,0],0],"passed":true},{"actual":[[0,0,3680,2693,3633,1380,3680,3680,2959,1685,2602],1],"check":"control 2","expected":[[0,0,3680,2693,3633,1380,3680,3680,2959,1685,2602],1],"passed":true},{"actual":[[0,0,3680,3007,3092,3680,0,0,3680,2694,3409,0,0,0],2],"check":"control 3","expected":[[0,0,3680,3007,3092,3680,0,0,3680,2694,3409,0,0,0],2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: surplus exactly at start threshold\", \"actual\": [[0, 0, 0, 0], 0], \"expected\": [[0, 2000, 2000, 0], 1], \"passed\": false}, {\"check\": \"boundary: never enough sun\", \"actual\": [[0, 0, 0, 0, 0, 0], 0], \"expected\": [[0, 0, 0, 0, 0, 0], 0], \"passed\": true}, {\"check\": \"boundary: cloud dip shorter than stop delay\", \"actual\": [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2], \"expected\": [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2], \"passed\": true}, {\"check\": \"regression: start threshold comparison (partial repair)\", \"actual\": [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], \"expected\": [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0], \"expected\": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1], \"expected\": [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2], \"expected\": [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.89,"exit_code":0,"observations":[{"actual":[[0,2000,2000,0],1],"check":"boundary: surplus exactly at start threshold","expected":[[0,2000,2000,0],1],"passed":true},{"actual":[[0,0,0,0,0,0],0],"check":"boundary: never enough sun","expected":[[0,0,0,0,0,0],0],"passed":true},{"actual":[[3000,3000,1380,3000,1380,0,3000],2],"check":"boundary: cloud dip shorter than stop delay","expected":[[3000,3000,1380,3000,1380,0,3000],2],"passed":true},{"actual":[[0,0,0,0,3528,2938,0,0,0,0,0,0,0,0,0,0],1],"check":"regression: start threshold comparison (partial repair)","expected":[[0,0,0,0,3528,2938,0,0,0,0,0,0,0,0,0,0],1],"passed":true},{"actual":[[0,0,0,0,0,0,0,0,0,0,0,0,0],0],"check":"control 1","expected":[[0,0,0,0,0,0,0,0,0,0,0,0,0],0],"passed":true},{"actual":[[0,0,3680,2693,3633,1380,3680,3680,2959,1685,2602],1],"check":"control 2","expected":[[0,0,3680,2693,3633,1380,3680,3680,2959,1685,2602],1],"passed":true},{"actual":[[0,0,3680,3007,3092,3680,0,0,3680,2694,3409,0,0,0],2],"check":"control 3","expected":[[0,0,3680,3007,3092,3680,0,0,3680,2694,3409,0,0,0],2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: surplus exactly at start threshold\", \"actual\": [[0, 2000, 2000, 0], 1], \"expected\": [[0, 2000, 2000, 0], 1], \"passed\": true}, {\"check\": \"boundary: never enough sun\", \"actual\": [[0, 0, 0, 0, 0, 0], 0], \"expected\": [[0, 0, 0, 0, 0, 0], 0], \"passed\": true}, {\"check\": \"boundary: cloud dip shorter than stop delay\", \"actual\": [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2], \"expected\": [[3000, 3000, 1380, 3000, 1380, 0, 3000], 2], \"passed\": true}, {\"check\": \"regression: start threshold comparison (partial repair)\", \"actual\": [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], \"expected\": [[0, 0, 0, 0, 3528, 2938, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 1], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0], \"expected\": [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1], \"expected\": [[0, 0, 3680, 2693, 3633, 1380, 3680, 3680, 2959, 1685, 2602], 1], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2], \"expected\": [[0, 0, 3680, 3007, 3092, 3680, 0, 0, 3680, 2694, 3409, 0, 0, 0], 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}