FA-67341 / Elevator dispatch scheduling / Open access
Directional collective next stop: same-direction call set · case 01
An up-travelling car stops for passengers who want to go down.
ROOT CAUSE
Down hall calls are included among the same-direction stops on the way up.
VERIFIED REPAIR
Stop on the way up only for car calls and up hall calls.
Unsuccessful approach: Dropping car calls from the set makes passengers ride past their floor.
Case 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].
Why this case matters
Lift group controllers make these decisions many times per minute; a wrong answer strands passengers, wastes trips or overrides a safety rule.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
f = x['floor']
cc = set(x['car_calls'])
up = set(x['hall_up'])
dn = set(x['hall_down'])
def ahead(sd):
if sd == 'up':
same = [c for c in cc | up | dn if c > f]
if same:
return [min(same), 'up']
opp = [c for c in dn if c > f]
if opp:
return [max(opp), 'up']
else:
same = [c for c in cc | dn if c < f]
if same:
return [max(same), 'down']
opp = [c for c in up if c < f]
if opp:
return [min(opp), 'down']
return None
d = x['dir']
if d == 'idle':
allc = [c for c in sorted(cc | up | dn, key=lambda c: (abs(c - f), c)) if c != f]
if not allc:
return [None, 'idle']
d = 'up' if allc[0] > f else 'down'
r = ahead(d)
if r is None:
r = ahead('down' if d == 'up' else 'up')
return r if r is not None else [None, 'idle']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('sampled regression 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, 'up']), ('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, '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']), ('control 10', {'floor': 10, 'dir': 'down', 'car_calls': [], 'hall_up': [], 'hall_down': [3]}, [3, 'down'])], [('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 76', {'floor': 0, 'dir': 'idle', 'car_calls': [6, 0, 9], 'hall_up': [2, 6], 'hall_down': [1]}, [2, 'up']), ('control 22', {'floor': 2, 'dir': 'idle', 'car_calls': [0, 3, 4], 'hall_up': [], 'hall_down': []}, [3, 'up']), ('boundary: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('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: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 39', {'floor': 0, 'dir': 'down', 'car_calls': [9, 2], 'hall_up': [5], 'hall_down': [6, 1, 7]}, [2, 'up']), ('control 71', {'floor': 9, 'dir': 'up', 'car_calls': [10, 2], 'hall_up': [], 'hall_down': [2, 5]}, [10, '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']), ('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('control 16', {'floor': 3, 'dir': 'up', 'car_calls': [0, 6, 5], 'hall_up': [10], 'hall_down': []}, [5, '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: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 49', {'floor': 2, 'dir': 'idle', 'car_calls': [], 'hall_up': [9, 10], 'hall_down': [7]}, [9, 'up']), ('control 52', {'floor': 5, 'dir': 'idle', 'car_calls': [8], 'hall_up': [5, 10], 'hall_down': []}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, 'up']), ('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, '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'])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: down call passed on the way up | [5, 'up'] | [8, 'up'] | Failed |
| sampled regression 17 | [10, 'up'] | [11, 'up'] | Failed |
| sampled regression 1 | [3, 'up'] | [4, 'up'] | Failed |
| boundary: car call ahead of an up call | [4, 'up'] | [4, 'up'] | Passed |
| regression: highest down call is the reversal | [4, 'up'] | [9, 'up'] | Failed |
| control 4 | [0, 'down'] | [0, 'down'] | Passed |
| control 7 | [2, 'down'] | [2, 'down'] | Passed |
| control 10 | [3, 'down'] | [3, 'down'] | Passed |
SHA-256 / 933a3a15080da81dbae88776d232c87ba9882b91039ddbc8adbc8d3cb287e440
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
f = x['floor']
cc = set(x['car_calls'])
up = set(x['hall_up'])
dn = set(x['hall_down'])
def ahead(sd):
if sd == 'up':
same = [c for c in up if c > f]
if same:
return [min(same), 'up']
opp = [c for c in dn if c > f]
if opp:
return [max(opp), 'up']
else:
same = [c for c in cc | dn if c < f]
if same:
return [max(same), 'down']
opp = [c for c in up if c < f]
if opp:
return [min(opp), 'down']
return None
d = x['dir']
if d == 'idle':
allc = [c for c in sorted(cc | up | dn, key=lambda c: (abs(c - f), c)) if c != f]
if not allc:
return [None, 'idle']
d = 'up' if allc[0] > f else 'down'
r = ahead(d)
if r is None:
r = ahead('down' if d == 'up' else 'up')
return r if r is not None else [None, 'idle']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('sampled regression 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, 'up']), ('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, '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']), ('control 10', {'floor': 10, 'dir': 'down', 'car_calls': [], 'hall_up': [], 'hall_down': [3]}, [3, 'down'])], [('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 76', {'floor': 0, 'dir': 'idle', 'car_calls': [6, 0, 9], 'hall_up': [2, 6], 'hall_down': [1]}, [2, 'up']), ('control 22', {'floor': 2, 'dir': 'idle', 'car_calls': [0, 3, 4], 'hall_up': [], 'hall_down': []}, [3, 'up']), ('boundary: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('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: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 39', {'floor': 0, 'dir': 'down', 'car_calls': [9, 2], 'hall_up': [5], 'hall_down': [6, 1, 7]}, [2, 'up']), ('control 71', {'floor': 9, 'dir': 'up', 'car_calls': [10, 2], 'hall_up': [], 'hall_down': [2, 5]}, [10, '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']), ('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('control 16', {'floor': 3, 'dir': 'up', 'car_calls': [0, 6, 5], 'hall_up': [10], 'hall_down': []}, [5, '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: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 49', {'floor': 2, 'dir': 'idle', 'car_calls': [], 'hall_up': [9, 10], 'hall_down': [7]}, [9, 'up']), ('control 52', {'floor': 5, 'dir': 'idle', 'car_calls': [8], 'hall_up': [5, 10], 'hall_down': []}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, 'up']), ('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, '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'])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: down call passed on the way up | [5, 'up'] | [8, 'up'] | Failed |
| sampled regression 17 | [11, 'up'] | [11, 'up'] | Passed |
| sampled regression 1 | [10, 'up'] | [4, 'up'] | Failed |
| boundary: car call ahead of an up call | [4, 'up'] | [4, 'up'] | Passed |
| regression: highest down call is the reversal | [9, 'up'] | [9, 'up'] | Passed |
| control 4 | [0, 'down'] | [0, 'down'] | Passed |
| control 7 | [2, 'down'] | [2, 'down'] | Passed |
| control 10 | [3, 'down'] | [3, 'down'] | Passed |
SHA-256 / 5a6ab6897799d4f882780297e6fc80b295ac9d24a55914a61a8d63d41925c4ee
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
f = x['floor']
cc = set(x['car_calls'])
up = set(x['hall_up'])
dn = set(x['hall_down'])
def ahead(sd):
if sd == 'up':
same = [c for c in cc | up if c > f]
if same:
return [min(same), 'up']
opp = [c for c in dn if c > f]
if opp:
return [max(opp), 'up']
else:
same = [c for c in cc | dn if c < f]
if same:
return [max(same), 'down']
opp = [c for c in up if c < f]
if opp:
return [min(opp), 'down']
return None
d = x['dir']
if d == 'idle':
allc = [c for c in sorted(cc | up | dn, key=lambda c: (abs(c - f), c)) if c != f]
if not allc:
return [None, 'idle']
d = 'up' if allc[0] > f else 'down'
r = ahead(d)
if r is None:
r = ahead('down' if d == 'up' else 'up')
return r if r is not None else [None, 'idle']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 17', {'floor': 9, 'dir': 'up', 'car_calls': [], 'hall_up': [9, 6, 1], 'hall_down': [10, 9, 11]}, [11, 'up']), ('sampled regression 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, 'up']), ('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, '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']), ('control 10', {'floor': 10, 'dir': 'down', 'car_calls': [], 'hall_up': [], 'hall_down': [3]}, [3, 'down'])], [('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, 'up']), ('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 76', {'floor': 0, 'dir': 'idle', 'car_calls': [6, 0, 9], 'hall_up': [2, 6], 'hall_down': [1]}, [2, 'up']), ('control 22', {'floor': 2, 'dir': 'idle', 'car_calls': [0, 3, 4], 'hall_up': [], 'hall_down': []}, [3, 'up']), ('boundary: idle car equidistant calls', {'floor': 5, 'dir': 'idle', 'car_calls': [3, 7], 'hall_up': [], 'hall_down': []}, [3, 'down']), ('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: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 39', {'floor': 0, 'dir': 'down', 'car_calls': [9, 2], 'hall_up': [5], 'hall_down': [6, 1, 7]}, [2, 'up']), ('control 71', {'floor': 9, 'dir': 'up', 'car_calls': [10, 2], 'hall_up': [], 'hall_down': [2, 5]}, [10, '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']), ('regression: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 1', {'floor': 1, 'dir': 'down', 'car_calls': [7, 4, 8], 'hall_up': [], 'hall_down': [10, 5, 3]}, [4, 'up']), ('control 16', {'floor': 3, 'dir': 'up', 'car_calls': [0, 6, 5], 'hall_up': [10], 'hall_down': []}, [5, '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: down call passed on the way up', {'floor': 3, 'dir': 'up', 'car_calls': [8], 'hall_up': [], 'hall_down': [5]}, [8, 'up']), ('sampled regression 49', {'floor': 2, 'dir': 'idle', 'car_calls': [], 'hall_up': [9, 10], 'hall_down': [7]}, [9, 'up']), ('control 52', {'floor': 5, 'dir': 'idle', 'car_calls': [8], 'hall_up': [5, 10], 'hall_down': []}, [8, 'up']), ('boundary: car call ahead of an up call', {'floor': 2, 'dir': 'up', 'car_calls': [6], 'hall_up': [4], 'hall_down': []}, [4, 'up']), ('regression: highest down call is the reversal', {'floor': 1, 'dir': 'up', 'car_calls': [], 'hall_up': [], 'hall_down': [4, 9]}, [9, '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'])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: down call passed on the way up | [8, 'up'] | [8, 'up'] | Passed |
| sampled regression 17 | [11, 'up'] | [11, 'up'] | Passed |
| sampled regression 1 | [4, 'up'] | [4, 'up'] | Passed |
| boundary: car call ahead of an up call | [4, 'up'] | [4, 'up'] | Passed |
| regression: highest down call is the reversal | [9, 'up'] | [9, 'up'] | Passed |
| control 4 | [0, 'down'] | [0, 'down'] | Passed |
| control 7 | [2, 'down'] | [2, 'down'] | Passed |
| control 10 | [3, 'down'] | [3, 'down'] | Passed |
SHA-256 / 5e340279dc3aac210d26b72a1cbeb7b92db2892ba03a8d36db62d17e514ee0d2
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:47:51.990011+00:00.
Case digest / 326641cbba4a9e666f579eb11f8f4b98a7c29f4fa96f162ee996c5083fd0f571