{"abstract":"The group shuts down below the minimum number of active cars.","category":"Elevator dispatch scheduling","checks":8,"contract":"Samples [t, demand, max wait]. If the max wait exceeds 45 s and some car is shut down, one car is reactivated and the low-demand timer cleared. Otherwise, while demand < low_demand, a timer runs from the first low sample; once it has run 600 s or more and more than min_active cars are active, one car shuts down and the timer restarts at that time. Any sample with normal demand clears the timer. Output active cars per sample.","evaluation_group":"w2-elevator_dispatch_scheduling-energy-saving-shutdown","failed_approach":"Guarding one car above the minimum keeps an extra car running.","family":"w2-elevator_dispatch_scheduling-energy-saving-shutdown-minimum-fleet-guard","id":"FA-67811","implementations":{"attempt":{"sha256":"072a8f0120a64b0675bef44f1e0f54d66e5ad4243a55928d16881b139dbf7bd3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    active = x['cars']\n    low_since = None\n    out = []\n    for t, demand, wait in x['samples']:\n        if wait > 45 and active < x['cars']:\n            active += 1\n            low_since = None\n        elif demand < x['low_demand']:\n            if low_since is None:\n                low_since = t\n            elif t - low_since >= 600 and active > x['min_active'] + 1:\n                active -= 1\n                low_since = t\n        else:\n            low_since = None\n        out.append(active)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('control 10', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 46], [1200, 5, 46], [1800, 2, 10], [2400, 15, 10], [3000, 4, 80], [3600, 2, 80]]}, [3, 3, 3, 3, 3, 2]), ('boundary: ten quiet minutes', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10]]}, [4, 3]), ('boundary: successive shutdowns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [900, 1, 10], [1200, 1, 10]]}, [4, 3, 3, 2]), ('control 1', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 6, 30], [120, 0, 46], [720, 5, 30], [1320, 4, 30], [1620, 0, 10], [2220, 2, 10], [2520, 5, 46], [2580, 6, 10], [2640, 15, 10], [2700, 15, 10]]}, [6, 6, 6, 6, 6, 5, 6, 6, 6, 6]), ('control 4', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 5, 45], [900, 6, 10], [1500, 5, 30], [1560, 2, 80], [1860, 2, 45], [2460, 2, 80], [2520, 4, 10], [2820, 6, 80], [3420, 4, 46], [3720, 4, 46]]}, [4, 4, 4, 4, 4, 3, 3, 4, 4, 4]), ('control 7', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[300, 5, 46], [600, 15, 30], [900, 2, 46]]}, [3, 3, 3])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('control 80', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 4, 45], [660, 5, 80], [960, 4, 46], [1560, 2, 10], [1620, 15, 45], [1920, 0, 46], [1980, 2, 46], [2580, 4, 46], [3180, 0, 30], [3480, 4, 10]]}, [4, 4, 4, 3, 3, 4, 4, 3, 2, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 12', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 4, 30], [120, 6, 45], [180, 4, 80], [780, 5, 10], [1080, 5, 80], [1680, 15, 10]]}, [6, 6, 6, 6, 6, 6]), ('control 15', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 46], [660, 6, 10], [960, 15, 10]]}, [4, 4, 4]), ('control 18', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 0, 80], [900, 15, 46], [1200, 15, 30], [1500, 6, 46], [2100, 6, 80], [2700, 6, 46], [3300, 2, 10], [3900, 2, 46], [4200, 15, 30], [4500, 4, 30]]}, [4, 4, 4, 4, 4, 4, 4, 3, 3, 3])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('control 69', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 6, 30], [660, 0, 46], [960, 15, 10], [1560, 0, 10], [1620, 0, 30], [2220, 0, 10], [2520, 0, 30]]}, [3, 3, 3, 3, 3, 2, 2]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 23', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 30], [660, 6, 30], [720, 2, 46], [1320, 5, 10], [1620, 5, 10], [1920, 5, 46], [2520, 5, 45], [2580, 4, 46], [2640, 15, 80], [2940, 6, 30]]}, [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), ('control 26', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 2, 80], [360, 0, 30], [420, 15, 30], [720, 15, 30], [1320, 15, 10], [1920, 5, 80], [2520, 6, 45], [2820, 0, 10]]}, [4, 4, 4, 4, 4, 4, 4, 4]), ('control 29', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[300, 0, 45], [600, 5, 10], [900, 2, 10]]}, [6, 6, 6])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('control 34', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 2, 10], [360, 4, 10], [660, 15, 46], [1260, 15, 10], [1860, 15, 30], [2160, 4, 30], [2760, 4, 46], [3360, 15, 46], [3960, 6, 30]]}, [3, 3, 3, 3, 3, 3, 2, 3, 3]), ('boundary: ten quiet minutes', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10]]}, [4, 3]), ('boundary: successive shutdowns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [900, 1, 10], [1200, 1, 10]]}, [4, 3, 3, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('control 37', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 0, 10], [660, 15, 10], [720, 2, 80], [780, 4, 30], [840, 4, 10], [1140, 4, 46], [1200, 4, 46], [1800, 4, 10]]}, [4, 4, 4, 4, 4, 4, 4, 3]), ('control 40', {'cars': 6, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 4, 45], [1200, 15, 46], [1260, 6, 30], [1320, 4, 10], [1920, 2, 10], [1980, 2, 10], [2040, 15, 46], [2340, 15, 30]]}, [6, 6, 6, 6, 5, 5, 6, 6]), ('control 43', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 6, 80], [120, 5, 45], [180, 6, 46], [240, 2, 10], [300, 6, 45], [600, 2, 80]]}, [4, 4, 4, 4, 4, 4])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 45', {'cars': 6, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 5, 45], [900, 0, 10], [960, 5, 46], [1560, 4, 46], [1620, 0, 10], [1920, 4, 45], [2520, 0, 46], [2820, 4, 46], [3120, 2, 45], [3720, 5, 45]]}, [6, 6, 6, 6, 6, 6, 5, 6, 6, 6]), ('control 48', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 4, 10], [360, 0, 30], [960, 4, 46], [1020, 15, 45], [1620, 5, 45], [1680, 2, 80], [1740, 6, 45], [2340, 15, 46], [2940, 4, 30], [3000, 4, 30]]}, [4, 4, 3, 3, 3, 4, 4, 4, 4, 4]), ('control 51', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 2, 30], [660, 4, 46], [960, 5, 80], [1020, 15, 46]]}, [3, 3, 3, 3])]]\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":"f3a1332dd61bb9fc2ca4d6ce89b8f70b81e607573b7b09fd487d0371dcd3936c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    active = x['cars']\n    low_since = None\n    out = []\n    for t, demand, wait in x['samples']:\n        if wait > 45 and active < x['cars']:\n            active += 1\n            low_since = None\n        elif demand < x['low_demand']:\n            if low_since is None:\n                low_since = t\n            elif t - low_since >= 600 and active >= x['min_active']:\n                active -= 1\n                low_since = t\n        else:\n            low_since = None\n        out.append(active)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('control 10', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 46], [1200, 5, 46], [1800, 2, 10], [2400, 15, 10], [3000, 4, 80], [3600, 2, 80]]}, [3, 3, 3, 3, 3, 2]), ('boundary: ten quiet minutes', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10]]}, [4, 3]), ('boundary: successive shutdowns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [900, 1, 10], [1200, 1, 10]]}, [4, 3, 3, 2]), ('control 1', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 6, 30], [120, 0, 46], [720, 5, 30], [1320, 4, 30], [1620, 0, 10], [2220, 2, 10], [2520, 5, 46], [2580, 6, 10], [2640, 15, 10], [2700, 15, 10]]}, [6, 6, 6, 6, 6, 5, 6, 6, 6, 6]), ('control 4', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 5, 45], [900, 6, 10], [1500, 5, 30], [1560, 2, 80], [1860, 2, 45], [2460, 2, 80], [2520, 4, 10], [2820, 6, 80], [3420, 4, 46], [3720, 4, 46]]}, [4, 4, 4, 4, 4, 3, 3, 4, 4, 4]), ('control 7', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[300, 5, 46], [600, 15, 30], [900, 2, 46]]}, [3, 3, 3])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('control 80', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 4, 45], [660, 5, 80], [960, 4, 46], [1560, 2, 10], [1620, 15, 45], [1920, 0, 46], [1980, 2, 46], [2580, 4, 46], [3180, 0, 30], [3480, 4, 10]]}, [4, 4, 4, 3, 3, 4, 4, 3, 2, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 12', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 4, 30], [120, 6, 45], [180, 4, 80], [780, 5, 10], [1080, 5, 80], [1680, 15, 10]]}, [6, 6, 6, 6, 6, 6]), ('control 15', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 46], [660, 6, 10], [960, 15, 10]]}, [4, 4, 4]), ('control 18', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 0, 80], [900, 15, 46], [1200, 15, 30], [1500, 6, 46], [2100, 6, 80], [2700, 6, 46], [3300, 2, 10], [3900, 2, 46], [4200, 15, 30], [4500, 4, 30]]}, [4, 4, 4, 4, 4, 4, 4, 3, 3, 3])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('control 69', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 6, 30], [660, 0, 46], [960, 15, 10], [1560, 0, 10], [1620, 0, 30], [2220, 0, 10], [2520, 0, 30]]}, [3, 3, 3, 3, 3, 2, 2]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 23', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 30], [660, 6, 30], [720, 2, 46], [1320, 5, 10], [1620, 5, 10], [1920, 5, 46], [2520, 5, 45], [2580, 4, 46], [2640, 15, 80], [2940, 6, 30]]}, [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), ('control 26', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 2, 80], [360, 0, 30], [420, 15, 30], [720, 15, 30], [1320, 15, 10], [1920, 5, 80], [2520, 6, 45], [2820, 0, 10]]}, [4, 4, 4, 4, 4, 4, 4, 4]), ('control 29', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[300, 0, 45], [600, 5, 10], [900, 2, 10]]}, [6, 6, 6])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('control 34', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 2, 10], [360, 4, 10], [660, 15, 46], [1260, 15, 10], [1860, 15, 30], [2160, 4, 30], [2760, 4, 46], [3360, 15, 46], [3960, 6, 30]]}, [3, 3, 3, 3, 3, 3, 2, 3, 3]), ('boundary: ten quiet minutes', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10]]}, [4, 3]), ('boundary: successive shutdowns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [900, 1, 10], [1200, 1, 10]]}, [4, 3, 3, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('control 37', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 0, 10], [660, 15, 10], [720, 2, 80], [780, 4, 30], [840, 4, 10], [1140, 4, 46], [1200, 4, 46], [1800, 4, 10]]}, [4, 4, 4, 4, 4, 4, 4, 3]), ('control 40', {'cars': 6, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 4, 45], [1200, 15, 46], [1260, 6, 30], [1320, 4, 10], [1920, 2, 10], [1980, 2, 10], [2040, 15, 46], [2340, 15, 30]]}, [6, 6, 6, 6, 5, 5, 6, 6]), ('control 43', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 6, 80], [120, 5, 45], [180, 6, 46], [240, 2, 10], [300, 6, 45], [600, 2, 80]]}, [4, 4, 4, 4, 4, 4])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 45', {'cars': 6, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 5, 45], [900, 0, 10], [960, 5, 46], [1560, 4, 46], [1620, 0, 10], [1920, 4, 45], [2520, 0, 46], [2820, 4, 46], [3120, 2, 45], [3720, 5, 45]]}, [6, 6, 6, 6, 6, 6, 5, 6, 6, 6]), ('control 48', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 4, 10], [360, 0, 30], [960, 4, 46], [1020, 15, 45], [1620, 5, 45], [1680, 2, 80], [1740, 6, 45], [2340, 15, 46], [2940, 4, 30], [3000, 4, 30]]}, [4, 4, 3, 3, 3, 4, 4, 4, 4, 4]), ('control 51', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 2, 30], [660, 4, 46], [960, 5, 80], [1020, 15, 46]]}, [3, 3, 3, 3])]]\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":"675e508a4998a3341974ca2b4e9d44ebe07bf88e90caa5d0b0679e0fdd9b02da","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    active = x['cars']\n    low_since = None\n    out = []\n    for t, demand, wait in x['samples']:\n        if wait > 45 and active < x['cars']:\n            active += 1\n            low_since = None\n        elif demand < x['low_demand']:\n            if low_since is None:\n                low_since = t\n            elif t - low_since >= 600 and active > x['min_active']:\n                active -= 1\n                low_since = t\n        else:\n            low_since = None\n        out.append(active)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('control 10', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 46], [1200, 5, 46], [1800, 2, 10], [2400, 15, 10], [3000, 4, 80], [3600, 2, 80]]}, [3, 3, 3, 3, 3, 2]), ('boundary: ten quiet minutes', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10]]}, [4, 3]), ('boundary: successive shutdowns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [900, 1, 10], [1200, 1, 10]]}, [4, 3, 3, 2]), ('control 1', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 6, 30], [120, 0, 46], [720, 5, 30], [1320, 4, 30], [1620, 0, 10], [2220, 2, 10], [2520, 5, 46], [2580, 6, 10], [2640, 15, 10], [2700, 15, 10]]}, [6, 6, 6, 6, 6, 5, 6, 6, 6, 6]), ('control 4', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 5, 45], [900, 6, 10], [1500, 5, 30], [1560, 2, 80], [1860, 2, 45], [2460, 2, 80], [2520, 4, 10], [2820, 6, 80], [3420, 4, 46], [3720, 4, 46]]}, [4, 4, 4, 4, 4, 3, 3, 4, 4, 4]), ('control 7', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[300, 5, 46], [600, 15, 30], [900, 2, 46]]}, [3, 3, 3])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('control 80', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 4, 45], [660, 5, 80], [960, 4, 46], [1560, 2, 10], [1620, 15, 45], [1920, 0, 46], [1980, 2, 46], [2580, 4, 46], [3180, 0, 30], [3480, 4, 10]]}, [4, 4, 4, 3, 3, 4, 4, 3, 2, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 12', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 4, 30], [120, 6, 45], [180, 4, 80], [780, 5, 10], [1080, 5, 80], [1680, 15, 10]]}, [6, 6, 6, 6, 6, 6]), ('control 15', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 46], [660, 6, 10], [960, 15, 10]]}, [4, 4, 4]), ('control 18', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 0, 80], [900, 15, 46], [1200, 15, 30], [1500, 6, 46], [2100, 6, 80], [2700, 6, 46], [3300, 2, 10], [3900, 2, 46], [4200, 15, 30], [4500, 4, 30]]}, [4, 4, 4, 4, 4, 4, 4, 3, 3, 3])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('control 69', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 6, 30], [660, 0, 46], [960, 15, 10], [1560, 0, 10], [1620, 0, 30], [2220, 0, 10], [2520, 0, 30]]}, [3, 3, 3, 3, 3, 2, 2]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 23', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 2, 30], [660, 6, 30], [720, 2, 46], [1320, 5, 10], [1620, 5, 10], [1920, 5, 46], [2520, 5, 45], [2580, 4, 46], [2640, 15, 80], [2940, 6, 30]]}, [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), ('control 26', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 2, 80], [360, 0, 30], [420, 15, 30], [720, 15, 30], [1320, 15, 10], [1920, 5, 80], [2520, 6, 45], [2820, 0, 10]]}, [4, 4, 4, 4, 4, 4, 4, 4]), ('control 29', {'cars': 6, 'min_active': 1, 'low_demand': 5, 'samples': [[300, 0, 45], [600, 5, 10], [900, 2, 10]]}, [6, 6, 6])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('control 34', {'cars': 3, 'min_active': 2, 'low_demand': 5, 'samples': [[300, 2, 10], [360, 4, 10], [660, 15, 46], [1260, 15, 10], [1860, 15, 30], [2160, 4, 30], [2760, 4, 46], [3360, 15, 46], [3960, 6, 30]]}, [3, 3, 3, 3, 3, 3, 2, 3, 3]), ('boundary: ten quiet minutes', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10]]}, [4, 3]), ('boundary: successive shutdowns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [900, 1, 10], [1200, 1, 10]]}, [4, 3, 3, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('control 37', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[60, 0, 10], [660, 15, 10], [720, 2, 80], [780, 4, 30], [840, 4, 10], [1140, 4, 46], [1200, 4, 46], [1800, 4, 10]]}, [4, 4, 4, 4, 4, 4, 4, 3]), ('control 40', {'cars': 6, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 4, 45], [1200, 15, 46], [1260, 6, 30], [1320, 4, 10], [1920, 2, 10], [1980, 2, 10], [2040, 15, 46], [2340, 15, 30]]}, [6, 6, 6, 6, 5, 5, 6, 6]), ('control 43', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 6, 80], [120, 5, 45], [180, 6, 46], [240, 2, 10], [300, 6, 45], [600, 2, 80]]}, [4, 4, 4, 4, 4, 4])], [('regression: minimum active cars', {'cars': 2, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [1200, 1, 10], [1800, 1, 10]]}, [2, 1, 1, 1]), ('sampled regression 76', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 0, 30], [900, 0, 46], [1500, 0, 80], [2100, 2, 30], [2700, 2, 45], [2760, 0, 30], [3060, 4, 30], [3660, 4, 45], [4260, 4, 46]]}, [4, 4, 3, 2, 1, 1, 1, 1, 2]), ('boundary: demand returns', {'cars': 4, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 6, 10], [600, 1, 10], [900, 1, 10]]}, [4, 4, 4, 4]), ('boundary: long wait reactivates', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [600, 1, 10], [660, 1, 46], [720, 1, 45]]}, [3, 2, 3, 3]), ('boundary: long wait with all cars active', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[0, 1, 10], [300, 1, 80], [600, 1, 10]]}, [3, 3, 2]), ('control 45', {'cars': 6, 'min_active': 2, 'low_demand': 5, 'samples': [[600, 5, 45], [900, 0, 10], [960, 5, 46], [1560, 4, 46], [1620, 0, 10], [1920, 4, 45], [2520, 0, 46], [2820, 4, 46], [3120, 2, 45], [3720, 5, 45]]}, [6, 6, 6, 6, 6, 6, 5, 6, 6, 6]), ('control 48', {'cars': 4, 'min_active': 2, 'low_demand': 5, 'samples': [[60, 4, 10], [360, 0, 30], [960, 4, 46], [1020, 15, 45], [1620, 5, 45], [1680, 2, 80], [1740, 6, 45], [2340, 15, 46], [2940, 4, 30], [3000, 4, 30]]}, [4, 4, 3, 3, 3, 4, 4, 4, 4, 4]), ('control 51', {'cars': 3, 'min_active': 1, 'low_demand': 5, 'samples': [[600, 2, 30], [660, 4, 46], [960, 5, 80], [1020, 15, 46]]}, [3, 3, 3, 3])]]\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":"Stipulated toy lift-control contract for a bounded teaching model; it makes no claim of conformance to any lift code or vendor dispatcher and omits real safety cases. 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-elevator_dispatch_scheduling-energy-saving-shutdown-minimum-fleet-guard","generated_at":"2026-09-29T14:47:56.369077+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Lift group controllers make these decisions many times per minute; a wrong answer strands passengers, wastes trips or overrides a safety rule.","repair":"Shut down only while more than min_active cars are active.","root_cause":"The guard allows shutting down the last required car.","sha256":"db512f32866b7645991eb75c6c203968c7aaa7e823e72959d85094b493f95a1e","title":"Energy saving car shutdown: minimum fleet guard · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.299,"exit_code":1,"observations":[{"actual":[2,2,2,2],"check":"regression: minimum active cars","expected":[2,1,1,1],"passed":false},{"actual":[4,4,3,2,2,2,2,2,3],"check":"sampled regression 76","expected":[4,4,3,2,1,1,1,1,2],"passed":false},{"actual":[3,3,3,3,3,3],"check":"control 10","expected":[3,3,3,3,3,2],"passed":false},{"actual":[4,3],"check":"boundary: ten quiet minutes","expected":[4,3],"passed":true},{"actual":[4,3,3,2],"check":"boundary: successive shutdowns","expected":[4,3,3,2],"passed":true},{"actual":[6,6,6,6,6,5,6,6,6,6],"check":"control 1","expected":[6,6,6,6,6,5,6,6,6,6],"passed":true},{"actual":[4,4,4,4,4,3,3,4,4,4],"check":"control 4","expected":[4,4,4,4,4,3,3,4,4,4],"passed":true},{"actual":[3,3,3],"check":"control 7","expected":[3,3,3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: minimum active cars\", \"actual\": [2, 2, 2, 2], \"expected\": [2, 1, 1, 1], \"passed\": false}, {\"check\": \"sampled regression 76\", \"actual\": [4, 4, 3, 2, 2, 2, 2, 2, 3], \"expected\": [4, 4, 3, 2, 1, 1, 1, 1, 2], \"passed\": false}, {\"check\": \"control 10\", \"actual\": [3, 3, 3, 3, 3, 3], \"expected\": [3, 3, 3, 3, 3, 2], \"passed\": false}, {\"check\": \"boundary: ten quiet minutes\", \"actual\": [4, 3], \"expected\": [4, 3], \"passed\": true}, {\"check\": \"boundary: successive shutdowns\", \"actual\": [4, 3, 3, 2], \"expected\": [4, 3, 3, 2], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [6, 6, 6, 6, 6, 5, 6, 6, 6, 6], \"expected\": [6, 6, 6, 6, 6, 5, 6, 6, 6, 6], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [4, 4, 4, 4, 4, 3, 3, 4, 4, 4], \"expected\": [4, 4, 4, 4, 4, 3, 3, 4, 4, 4], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [3, 3, 3], \"expected\": [3, 3, 3], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.572,"exit_code":1,"observations":[{"actual":[2,1,0,0],"check":"regression: minimum active cars","expected":[2,1,1,1],"passed":false},{"actual":[4,4,3,2,1,1,1,0,1],"check":"sampled regression 76","expected":[4,4,3,2,1,1,1,1,2],"passed":false},{"actual":[3,3,3,3,3,2],"check":"control 10","expected":[3,3,3,3,3,2],"passed":true},{"actual":[4,3],"check":"boundary: ten quiet minutes","expected":[4,3],"passed":true},{"actual":[4,3,3,2],"check":"boundary: successive shutdowns","expected":[4,3,3,2],"passed":true},{"actual":[6,6,6,6,6,5,6,6,6,6],"check":"control 1","expected":[6,6,6,6,6,5,6,6,6,6],"passed":true},{"actual":[4,4,4,4,4,3,3,4,4,4],"check":"control 4","expected":[4,4,4,4,4,3,3,4,4,4],"passed":true},{"actual":[3,3,3],"check":"control 7","expected":[3,3,3],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: minimum active cars\", \"actual\": [2, 1, 0, 0], \"expected\": [2, 1, 1, 1], \"passed\": false}, {\"check\": \"sampled regression 76\", \"actual\": [4, 4, 3, 2, 1, 1, 1, 0, 1], \"expected\": [4, 4, 3, 2, 1, 1, 1, 1, 2], \"passed\": false}, {\"check\": \"control 10\", \"actual\": [3, 3, 3, 3, 3, 2], \"expected\": [3, 3, 3, 3, 3, 2], \"passed\": true}, {\"check\": \"boundary: ten quiet minutes\", \"actual\": [4, 3], \"expected\": [4, 3], \"passed\": true}, {\"check\": \"boundary: successive shutdowns\", \"actual\": [4, 3, 3, 2], \"expected\": [4, 3, 3, 2], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [6, 6, 6, 6, 6, 5, 6, 6, 6, 6], \"expected\": [6, 6, 6, 6, 6, 5, 6, 6, 6, 6], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [4, 4, 4, 4, 4, 3, 3, 4, 4, 4], \"expected\": [4, 4, 4, 4, 4, 3, 3, 4, 4, 4], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [3, 3, 3], \"expected\": [3, 3, 3], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.331,"exit_code":0,"observations":[{"actual":[2,1,1,1],"check":"regression: minimum active cars","expected":[2,1,1,1],"passed":true},{"actual":[4,4,3,2,1,1,1,1,2],"check":"sampled regression 76","expected":[4,4,3,2,1,1,1,1,2],"passed":true},{"actual":[3,3,3,3,3,2],"check":"control 10","expected":[3,3,3,3,3,2],"passed":true},{"actual":[4,3],"check":"boundary: ten quiet minutes","expected":[4,3],"passed":true},{"actual":[4,3,3,2],"check":"boundary: successive shutdowns","expected":[4,3,3,2],"passed":true},{"actual":[6,6,6,6,6,5,6,6,6,6],"check":"control 1","expected":[6,6,6,6,6,5,6,6,6,6],"passed":true},{"actual":[4,4,4,4,4,3,3,4,4,4],"check":"control 4","expected":[4,4,4,4,4,3,3,4,4,4],"passed":true},{"actual":[3,3,3],"check":"control 7","expected":[3,3,3],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: minimum active cars\", \"actual\": [2, 1, 1, 1], \"expected\": [2, 1, 1, 1], \"passed\": true}, {\"check\": \"sampled regression 76\", \"actual\": [4, 4, 3, 2, 1, 1, 1, 1, 2], \"expected\": [4, 4, 3, 2, 1, 1, 1, 1, 2], \"passed\": true}, {\"check\": \"control 10\", \"actual\": [3, 3, 3, 3, 3, 2], \"expected\": [3, 3, 3, 3, 3, 2], \"passed\": true}, {\"check\": \"boundary: ten quiet minutes\", \"actual\": [4, 3], \"expected\": [4, 3], \"passed\": true}, {\"check\": \"boundary: successive shutdowns\", \"actual\": [4, 3, 3, 2], \"expected\": [4, 3, 3, 2], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [6, 6, 6, 6, 6, 5, 6, 6, 6, 6], \"expected\": [6, 6, 6, 6, 6, 5, 6, 6, 6, 6], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [4, 4, 4, 4, 4, 3, 3, 4, 4, 4], \"expected\": [4, 4, 4, 4, 4, 3, 3, 4, 4, 4], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [3, 3, 3], \"expected\": [3, 3, 3], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}