{"abstract":"The car reverses at the nearest down call and leaves higher down calls waiting.","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].","contract_signature":"x","evaluation_group":"w2-elevator_dispatch_scheduling-collective-next-stop","failed_approach":"Reporting the travel direction as down misstates the run up to the reversal floor.","family":"w2-elevator_dispatch_scheduling-collective-next-stop-reversal-call-choice","id":"FA-67346","implementations":{"attempt":{"sha256":"6f1d77dff4bd862c70a1a643ed5eb555b5a31da2a4b3c2dac9d4e0a63dd7e7a3","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), 'down']\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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('boundary: idle car with a call at its own floor', {'floor': 4, 'dir': 'idle', 'car_calls': [], 'hall_up': [4], 'hall_down': [8]}, [8, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, '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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('boundary: idle car with a call at its own floor', {'floor': 4, 'dir': 'idle', 'car_calls': [], 'hall_up': [4], 'hall_down': [8]}, [8, 'up']), ('boundary: 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']), ('boundary: down car with nothing below', {'floor': 6, 'dir': 'down', 'car_calls': [], 'hall_up': [9], 'hall_down': []}, [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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('control 58', {'floor': 0, 'dir': 'idle', 'car_calls': [], 'hall_up': [0], 'hall_down': [6]}, [6, 'up']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, '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']), ('control 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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('boundary: idle car with a call at its own floor', {'floor': 4, 'dir': 'idle', 'car_calls': [], 'hall_up': [4], 'hall_down': [8]}, [8, 'up']), ('control 42', {'floor': 10, 'dir': 'up', 'car_calls': [], 'hall_up': [4, 6, 1], 'hall_down': [7, 11]}, [11, 'up']), ('boundary: up car with nothing above', {'floor': 6, 'dir': 'up', 'car_calls': [2], 'hall_up': [1], 'hall_down': []}, [2, 'down']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, '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":"373f612c7de6e820681361008bccdaf3a9a25fb4405acbd530161445f99de835","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 [min(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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('boundary: idle car with a call at its own floor', {'floor': 4, 'dir': 'idle', 'car_calls': [], 'hall_up': [4], 'hall_down': [8]}, [8, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, '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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('boundary: idle car with a call at its own floor', {'floor': 4, 'dir': 'idle', 'car_calls': [], 'hall_up': [4], 'hall_down': [8]}, [8, 'up']), ('boundary: 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']), ('boundary: down car with nothing below', {'floor': 6, 'dir': 'down', 'car_calls': [], 'hall_up': [9], 'hall_down': []}, [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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('control 58', {'floor': 0, 'dir': 'idle', 'car_calls': [], 'hall_up': [0], 'hall_down': [6]}, [6, 'up']), ('boundary: idle car nearest call above', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [6], 'hall_down': [1]}, [6, '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']), ('control 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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('boundary: idle car with a call at its own floor', {'floor': 4, 'dir': 'idle', 'car_calls': [], 'hall_up': [4], 'hall_down': [8]}, [8, 'up']), ('control 42', {'floor': 10, 'dir': 'up', 'car_calls': [], 'hall_up': [4, 6, 1], 'hall_down': [7, 11]}, [11, 'up']), ('boundary: up car with nothing above', {'floor': 6, 'dir': 'up', 'car_calls': [2], 'hall_up': [1], 'hall_down': []}, [2, 'down']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('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: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('control 37', {'floor': 5, 'dir': 'idle', 'car_calls': [], 'hall_up': [0, 1], 'hall_down': [1, 7]}, [7, 'up']), ('boundary: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, '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-reversal-call-choice","generated_at":"2026-09-29T14:47:51.994392+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.","root_cause":"The reversal target uses the lowest instead of the highest down call above.","sha256":"2bfe9a23ac03f63b24a920b60b1f09671b6b6b0446fba030beaed289c94b3945","title":"Directional collective next stop: reversal call choice · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":42.229,"exit_code":1,"observations":[{"actual":[9,"down"],"check":"regression: highest down call is the reversal","expected":[9,"up"],"passed":false},{"actual":[11,"down"],"check":"sampled regression 17","expected":[11,"up"],"passed":false},{"actual":[8,"down"],"check":"boundary: idle car with a call at its own floor","expected":[8,"up"],"passed":false},{"actual":[8,"up"],"check":"boundary: down call passed on the way up","expected":[8,"up"],"passed":true},{"actual":[4,"up"],"check":"boundary: car call ahead of an up call","expected":[4,"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: highest down call is the reversal\", \"actual\": [9, \"down\"], \"expected\": [9, \"up\"], \"passed\": false}, {\"check\": \"sampled regression 17\", \"actual\": [11, \"down\"], \"expected\": [11, \"up\"], \"passed\": false}, {\"check\": \"boundary: idle car with a call at its own floor\", \"actual\": [8, \"down\"], \"expected\": [8, \"up\"], \"passed\": false}, {\"check\": \"boundary: down call passed on the way up\", \"actual\": [8, \"up\"], \"expected\": [8, \"up\"], \"passed\": true}, {\"check\": \"boundary: car call ahead of an up call\", \"actual\": [4, \"up\"], \"expected\": [4, \"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":40.444,"exit_code":1,"observations":[{"actual":[4,"up"],"check":"regression: highest down call is the reversal","expected":[9,"up"],"passed":false},{"actual":[10,"up"],"check":"sampled regression 17","expected":[11,"up"],"passed":false},{"actual":[8,"up"],"check":"boundary: idle car with a call at its own floor","expected":[8,"up"],"passed":true},{"actual":[8,"up"],"check":"boundary: down call passed on the way up","expected":[8,"up"],"passed":true},{"actual":[4,"up"],"check":"boundary: car call ahead of an up call","expected":[4,"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: highest down call is the reversal\", \"actual\": [4, \"up\"], \"expected\": [9, \"up\"], \"passed\": false}, {\"check\": \"sampled regression 17\", \"actual\": [10, \"up\"], \"expected\": [11, \"up\"], \"passed\": false}, {\"check\": \"boundary: idle car with a call at its own floor\", \"actual\": [8, \"up\"], \"expected\": [8, \"up\"], \"passed\": true}, {\"check\": \"boundary: down call passed on the way up\", \"actual\": [8, \"up\"], \"expected\": [8, \"up\"], \"passed\": true}, {\"check\": \"boundary: car call ahead of an up call\", \"actual\": [4, \"up\"], \"expected\": [4, \"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"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}