{"abstract":"An idle car picks the wrong call when two are equally near, or ignores distance.","category":"Elevator dispatch scheduling","checks":8,"contract":"A car stopped at floor with direction up, down or idle chooses its next stop. Travelling up it stops at the nearest car call or up hall call above; failing that it runs to the highest down hall call above; failing that it reverses and applies the mirrored rule downwards (nearest car call or down call below, else lowest up call below). An idle car heads towards the nearest call other than its own floor (ties to the lower floor). Returns [floor, travel direction] or [None, idle].","evaluation_group":"w2-elevator_dispatch_scheduling-collective-next-stop","failed_approach":"Sorting by floor alone sends the car to the lowest call regardless of distance.","family":"w2-elevator_dispatch_scheduling-collective-next-stop-idle-tie-break","id":"FA-67351","implementations":{"attempt":{"sha256":"e1b20f9db1f030786f0ea0ea9c59abfc7f5befbb26def7bcb2d3d3f690dcb397","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    f = x['floor']\n    cc = set(x['car_calls'])\n    up = set(x['hall_up'])\n    dn = set(x['hall_down'])\n    def ahead(sd):\n        if sd == 'up':\n            same = [c for c in cc | up if c > f]\n            if same:\n                return [min(same), 'up']\n            opp = [c for c in dn if c > f]\n            if opp:\n                return [max(opp), 'up']\n        else:\n            same = [c for c in cc | dn if c < f]\n            if same:\n                return [max(same), 'down']\n            opp = [c for c in up if c < f]\n            if opp:\n                return [min(opp), 'down']\n        return None\n    d = x['dir']\n    if d == 'idle':\n        allc = [c for c in sorted(cc | up | dn, key=lambda c: c) if c != f]\n        if not allc:\n            return [None, 'idle']\n        d = 'up' if allc[0] > f else 'down'\n    r = ahead(d)\n    if r is None:\n        r = ahead('down' if d == 'up' else 'up')\n    return r if r is not None else [None, 'idle']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 3', {'floor': 4, 'dir': 'idle', 'car_calls': [0, 11], 'hall_up': [1, 5], 'hall_down': [2, 8, 4]}, [5, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('control 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('control 4', {'floor': 4, 'dir': 'down', 'car_calls': [10], 'hall_up': [6, 0], 'hall_down': [10]}, [0, 'down']), ('control 7', {'floor': 3, 'dir': 'down', 'car_calls': [7, 3], 'hall_up': [10], 'hall_down': [2, 4, 7]}, [2, 'down'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('boundary: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('control 12', {'floor': 5, 'dir': 'idle', 'car_calls': [6, 9], 'hall_up': [6, 10], 'hall_down': [6, 2, 7]}, [6, 'up']), ('control 15', {'floor': 3, 'dir': 'down', 'car_calls': [], 'hall_up': [2, 4, 10], 'hall_down': [6, 5, 8]}, [2, 'down']), ('control 18', {'floor': 1, 'dir': 'idle', 'car_calls': [1], 'hall_up': [10, 1, 2], 'hall_down': [5]}, [2, 'up'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 9', {'floor': 3, 'dir': 'idle', 'car_calls': [0], 'hall_up': [9, 10, 4], 'hall_down': [7, 5, 3]}, [4, 'up']), ('boundary: down car with nothing below', {'floor': 6, 'dir': 'down', 'car_calls': [], 'hall_up': [9], 'hall_down': []}, [9, 'up']), ('control 23', {'floor': 1, 'dir': 'idle', 'car_calls': [], 'hall_up': [5], 'hall_down': []}, [5, 'up']), ('sampled regression 26', {'floor': 7, 'dir': 'idle', 'car_calls': [9], 'hall_up': [3], 'hall_down': [10, 5, 9]}, [5, 'down']), ('control 29', {'floor': 4, 'dir': 'down', 'car_calls': [2], 'hall_up': [5], 'hall_down': []}, [2, 'down'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 66', {'floor': 5, 'dir': 'idle', 'car_calls': [7, 2], 'hall_up': [8, 10, 1], 'hall_down': [7, 11]}, [7, 'up']), ('boundary: up car with nothing above', {'floor': 6, 'dir': 'up', 'car_calls': [2], 'hall_up': [1], 'hall_down': []}, [2, 'down']), ('control 34', {'floor': 11, 'dir': 'down', 'car_calls': [10], 'hall_up': [4, 5], 'hall_down': []}, [10, 'down']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('control 40', {'floor': 9, 'dir': 'up', 'car_calls': [1, 9], 'hall_up': [8, 10, 5], 'hall_down': []}, [10, 'up'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 12', {'floor': 5, 'dir': 'idle', 'car_calls': [6, 9], 'hall_up': [6, 10], 'hall_down': [6, 2, 7]}, [6, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('control 45', {'floor': 9, 'dir': 'idle', 'car_calls': [9, 0], 'hall_up': [7], 'hall_down': [2, 6, 1]}, [6, 'down']), ('control 48', {'floor': 4, 'dir': 'down', 'car_calls': [9], 'hall_up': [4, 2, 1], 'hall_down': []}, [1, 'down']), ('control 51', {'floor': 6, 'dir': 'idle', 'car_calls': [6], 'hall_up': [9], 'hall_down': []}, [9, 'up'])]]\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":"929afad1402ac786ccfda4bcec9e7d7bda588bb23b4f8e3c16e1e99edc4ceb50","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    f = x['floor']\n    cc = set(x['car_calls'])\n    up = set(x['hall_up'])\n    dn = set(x['hall_down'])\n    def ahead(sd):\n        if sd == 'up':\n            same = [c for c in cc | up if c > f]\n            if same:\n                return [min(same), 'up']\n            opp = [c for c in dn if c > f]\n            if opp:\n                return [max(opp), 'up']\n        else:\n            same = [c for c in cc | dn if c < f]\n            if same:\n                return [max(same), 'down']\n            opp = [c for c in up if c < f]\n            if opp:\n                return [min(opp), 'down']\n        return None\n    d = x['dir']\n    if d == 'idle':\n        allc = [c for c in sorted(cc | up | dn, key=lambda c: (abs(c - f), -c)) if c != f]\n        if not allc:\n            return [None, 'idle']\n        d = 'up' if allc[0] > f else 'down'\n    r = ahead(d)\n    if r is None:\n        r = ahead('down' if d == 'up' else 'up')\n    return r if r is not None else [None, 'idle']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 3', {'floor': 4, 'dir': 'idle', 'car_calls': [0, 11], 'hall_up': [1, 5], 'hall_down': [2, 8, 4]}, [5, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('control 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('control 4', {'floor': 4, 'dir': 'down', 'car_calls': [10], 'hall_up': [6, 0], 'hall_down': [10]}, [0, 'down']), ('control 7', {'floor': 3, 'dir': 'down', 'car_calls': [7, 3], 'hall_up': [10], 'hall_down': [2, 4, 7]}, [2, 'down'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('boundary: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('control 12', {'floor': 5, 'dir': 'idle', 'car_calls': [6, 9], 'hall_up': [6, 10], 'hall_down': [6, 2, 7]}, [6, 'up']), ('control 15', {'floor': 3, 'dir': 'down', 'car_calls': [], 'hall_up': [2, 4, 10], 'hall_down': [6, 5, 8]}, [2, 'down']), ('control 18', {'floor': 1, 'dir': 'idle', 'car_calls': [1], 'hall_up': [10, 1, 2], 'hall_down': [5]}, [2, 'up'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 9', {'floor': 3, 'dir': 'idle', 'car_calls': [0], 'hall_up': [9, 10, 4], 'hall_down': [7, 5, 3]}, [4, 'up']), ('boundary: down car with nothing below', {'floor': 6, 'dir': 'down', 'car_calls': [], 'hall_up': [9], 'hall_down': []}, [9, 'up']), ('control 23', {'floor': 1, 'dir': 'idle', 'car_calls': [], 'hall_up': [5], 'hall_down': []}, [5, 'up']), ('sampled regression 26', {'floor': 7, 'dir': 'idle', 'car_calls': [9], 'hall_up': [3], 'hall_down': [10, 5, 9]}, [5, 'down']), ('control 29', {'floor': 4, 'dir': 'down', 'car_calls': [2], 'hall_up': [5], 'hall_down': []}, [2, 'down'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 66', {'floor': 5, 'dir': 'idle', 'car_calls': [7, 2], 'hall_up': [8, 10, 1], 'hall_down': [7, 11]}, [7, 'up']), ('boundary: up car with nothing above', {'floor': 6, 'dir': 'up', 'car_calls': [2], 'hall_up': [1], 'hall_down': []}, [2, 'down']), ('control 34', {'floor': 11, 'dir': 'down', 'car_calls': [10], 'hall_up': [4, 5], 'hall_down': []}, [10, 'down']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('control 40', {'floor': 9, 'dir': 'up', 'car_calls': [1, 9], 'hall_up': [8, 10, 5], 'hall_down': []}, [10, 'up'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 12', {'floor': 5, 'dir': 'idle', 'car_calls': [6, 9], 'hall_up': [6, 10], 'hall_down': [6, 2, 7]}, [6, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('control 45', {'floor': 9, 'dir': 'idle', 'car_calls': [9, 0], 'hall_up': [7], 'hall_down': [2, 6, 1]}, [6, 'down']), ('control 48', {'floor': 4, 'dir': 'down', 'car_calls': [9], 'hall_up': [4, 2, 1], 'hall_down': []}, [1, 'down']), ('control 51', {'floor': 6, 'dir': 'idle', 'car_calls': [6], 'hall_up': [9], 'hall_down': []}, [9, 'up'])]]\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":"39ac1eea224a8d3dbf26ac650c9924bd297361bae08fbee164a0ac9608dee959","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    f = x['floor']\n    cc = set(x['car_calls'])\n    up = set(x['hall_up'])\n    dn = set(x['hall_down'])\n    def ahead(sd):\n        if sd == 'up':\n            same = [c for c in cc | up if c > f]\n            if same:\n                return [min(same), 'up']\n            opp = [c for c in dn if c > f]\n            if opp:\n                return [max(opp), 'up']\n        else:\n            same = [c for c in cc | dn if c < f]\n            if same:\n                return [max(same), 'down']\n            opp = [c for c in up if c < f]\n            if opp:\n                return [min(opp), 'down']\n        return None\n    d = x['dir']\n    if d == 'idle':\n        allc = [c for c in sorted(cc | up | dn, key=lambda c: (abs(c - f), c)) if c != f]\n        if not allc:\n            return [None, 'idle']\n        d = 'up' if allc[0] > f else 'down'\n    r = ahead(d)\n    if r is None:\n        r = ahead('down' if d == 'up' else 'up')\n    return r if r is not None else [None, 'idle']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 3', {'floor': 4, 'dir': 'idle', 'car_calls': [0, 11], 'hall_up': [1, 5], 'hall_down': [2, 8, 4]}, [5, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('control 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('control 4', {'floor': 4, 'dir': 'down', 'car_calls': [10], 'hall_up': [6, 0], 'hall_down': [10]}, [0, 'down']), ('control 7', {'floor': 3, 'dir': 'down', 'car_calls': [7, 3], 'hall_up': [10], 'hall_down': [2, 4, 7]}, [2, 'down'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('boundary: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('control 12', {'floor': 5, 'dir': 'idle', 'car_calls': [6, 9], 'hall_up': [6, 10], 'hall_down': [6, 2, 7]}, [6, 'up']), ('control 15', {'floor': 3, 'dir': 'down', 'car_calls': [], 'hall_up': [2, 4, 10], 'hall_down': [6, 5, 8]}, [2, 'down']), ('control 18', {'floor': 1, 'dir': 'idle', 'car_calls': [1], 'hall_up': [10, 1, 2], 'hall_down': [5]}, [2, 'up'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 9', {'floor': 3, 'dir': 'idle', 'car_calls': [0], 'hall_up': [9, 10, 4], 'hall_down': [7, 5, 3]}, [4, 'up']), ('boundary: down car with nothing below', {'floor': 6, 'dir': 'down', 'car_calls': [], 'hall_up': [9], 'hall_down': []}, [9, 'up']), ('control 23', {'floor': 1, 'dir': 'idle', 'car_calls': [], 'hall_up': [5], 'hall_down': []}, [5, 'up']), ('sampled regression 26', {'floor': 7, 'dir': 'idle', 'car_calls': [9], 'hall_up': [3], 'hall_down': [10, 5, 9]}, [5, 'down']), ('control 29', {'floor': 4, 'dir': 'down', 'car_calls': [2], 'hall_up': [5], 'hall_down': []}, [2, 'down'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 66', {'floor': 5, 'dir': 'idle', 'car_calls': [7, 2], 'hall_up': [8, 10, 1], 'hall_down': [7, 11]}, [7, 'up']), ('boundary: up car with nothing above', {'floor': 6, 'dir': 'up', 'car_calls': [2], 'hall_up': [1], 'hall_down': []}, [2, 'down']), ('control 34', {'floor': 11, 'dir': 'down', 'car_calls': [10], 'hall_up': [4, 5], 'hall_down': []}, [10, 'down']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('control 40', {'floor': 9, 'dir': 'up', 'car_calls': [1, 9], 'hall_up': [8, 10, 5], 'hall_down': []}, [10, 'up'])], [('regression: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, 'up']), ('sampled regression 27', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [3, 6, 9], 'hall_down': [4, 7, 6]}, [4, 'down']), ('control 12', {'floor': 5, 'dir': 'idle', 'car_calls': [6, 9], 'hall_up': [6, 10], 'hall_down': [6, 2, 7]}, [6, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('control 45', {'floor': 9, 'dir': 'idle', 'car_calls': [9, 0], 'hall_up': [7], 'hall_down': [2, 6, 1]}, [6, 'down']), ('control 48', {'floor': 4, 'dir': 'down', 'car_calls': [9], 'hall_up': [4, 2, 1], 'hall_down': []}, [1, 'down']), ('control 51', {'floor': 6, 'dir': 'idle', 'car_calls': [6], 'hall_up': [9], 'hall_down': []}, [9, 'up'])]]\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-collective-next-stop-idle-tie-break","generated_at":"2026-09-29T14:47:52.031874+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":"Choose the nearest call and break ties towards the lower floor.","root_cause":"Equidistant calls are resolved towards the upper floor.","sha256":"a65f2f8ced7c62986e8cbf528326bd4f8baf1bac318d7fe7d639006a12d27533","title":"Directional collective next stop: idle tie-break · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.641,"exit_code":1,"observations":[{"actual":[3,"down"],"check":"regression: idle car equidistant calls","expected":[3,"down"],"passed":true},{"actual":[1,"down"],"check":"boundary: idle car nearest call above","expected":[6,"up"],"passed":false},{"actual":[4,"down"],"check":"sampled regression 27","expected":[4,"down"],"passed":true},{"actual":[2,"down"],"check":"control 3","expected":[5,"up"],"passed":false},{"actual":[8,"up"],"check":"boundary: down call passed on the way up","expected":[8,"up"],"passed":true},{"actual":[4,"up"],"check":"control 1","expected":[4,"up"],"passed":true},{"actual":[0,"down"],"check":"control 4","expected":[0,"down"],"passed":true},{"actual":[2,"down"],"check":"control 7","expected":[2,"down"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: idle car equidistant calls\", \"actual\": [3, \"down\"], \"expected\": [3, \"down\"], \"passed\": true}, {\"check\": \"boundary: idle car nearest call above\", \"actual\": [1, \"down\"], \"expected\": [6, \"up\"], \"passed\": false}, {\"check\": \"sampled regression 27\", \"actual\": [4, \"down\"], \"expected\": [4, \"down\"], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [2, \"down\"], \"expected\": [5, \"up\"], \"passed\": false}, {\"check\": \"boundary: down call passed on the way up\", \"actual\": [8, \"up\"], \"expected\": [8, \"up\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [4, \"up\"], \"expected\": [4, \"up\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [0, \"down\"], \"expected\": [0, \"down\"], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [2, \"down\"], \"expected\": [2, \"down\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.177,"exit_code":1,"observations":[{"actual":[7,"up"],"check":"regression: idle car equidistant calls","expected":[3,"down"],"passed":false},{"actual":[6,"up"],"check":"boundary: idle car nearest call above","expected":[6,"up"],"passed":true},{"actual":[6,"up"],"check":"sampled regression 27","expected":[4,"down"],"passed":false},{"actual":[5,"up"],"check":"control 3","expected":[5,"up"],"passed":true},{"actual":[8,"up"],"check":"boundary: down call passed on the way up","expected":[8,"up"],"passed":true},{"actual":[4,"up"],"check":"control 1","expected":[4,"up"],"passed":true},{"actual":[0,"down"],"check":"control 4","expected":[0,"down"],"passed":true},{"actual":[2,"down"],"check":"control 7","expected":[2,"down"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: idle car equidistant calls\", \"actual\": [7, \"up\"], \"expected\": [3, \"down\"], \"passed\": false}, {\"check\": \"boundary: idle car nearest call above\", \"actual\": [6, \"up\"], \"expected\": [6, \"up\"], \"passed\": true}, {\"check\": \"sampled regression 27\", \"actual\": [6, \"up\"], \"expected\": [4, \"down\"], \"passed\": false}, {\"check\": \"control 3\", \"actual\": [5, \"up\"], \"expected\": [5, \"up\"], \"passed\": true}, {\"check\": \"boundary: down call passed on the way up\", \"actual\": [8, \"up\"], \"expected\": [8, \"up\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [4, \"up\"], \"expected\": [4, \"up\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [0, \"down\"], \"expected\": [0, \"down\"], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [2, \"down\"], \"expected\": [2, \"down\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.619,"exit_code":0,"observations":[{"actual":[3,"down"],"check":"regression: idle car equidistant calls","expected":[3,"down"],"passed":true},{"actual":[6,"up"],"check":"boundary: idle car nearest call above","expected":[6,"up"],"passed":true},{"actual":[4,"down"],"check":"sampled regression 27","expected":[4,"down"],"passed":true},{"actual":[5,"up"],"check":"control 3","expected":[5,"up"],"passed":true},{"actual":[8,"up"],"check":"boundary: down call passed on the way up","expected":[8,"up"],"passed":true},{"actual":[4,"up"],"check":"control 1","expected":[4,"up"],"passed":true},{"actual":[0,"down"],"check":"control 4","expected":[0,"down"],"passed":true},{"actual":[2,"down"],"check":"control 7","expected":[2,"down"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: idle car equidistant calls\", \"actual\": [3, \"down\"], \"expected\": [3, \"down\"], \"passed\": true}, {\"check\": \"boundary: idle car nearest call above\", \"actual\": [6, \"up\"], \"expected\": [6, \"up\"], \"passed\": true}, {\"check\": \"sampled regression 27\", \"actual\": [4, \"down\"], \"expected\": [4, \"down\"], \"passed\": true}, {\"check\": \"control 3\", \"actual\": [5, \"up\"], \"expected\": [5, \"up\"], \"passed\": true}, {\"check\": \"boundary: down call passed on the way up\", \"actual\": [8, \"up\"], \"expected\": [8, \"up\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [4, \"up\"], \"expected\": [4, \"up\"], \"passed\": true}, {\"check\": \"control 4\", \"actual\": [0, \"down\"], \"expected\": [0, \"down\"], \"passed\": true}, {\"check\": \"control 7\", \"actual\": [2, \"down\"], \"expected\": [2, \"down\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}