FA-67446 / Elevator dispatch scheduling / Open access
Trip flight time from a trapezoidal profile: triangular formula · case 01
Short hops are predicted faster or slower than the car can achieve.
ROOT CAUSE
The short-trip time assumes acceleration over the whole distance.
VERIFIED REPAIR
Accelerate over half the distance and decelerate over the other half: 2*sqrt(d/acc).
Unsuccessful approach: Using 2d inside the root doubles the distance of each half.
Case contract
heights_mm[i] is the rise from floor i to floor i+1. The trip distance is the sum between the two floors (either direction). With speed vmax (mm/s) and acceleration acc (mm/s^2): if distance*acc >= vmax^2 the car reaches vmax and t = d/vmax + vmax/acc, otherwise t = 2*sqrt(d/acc). Return milliseconds rounded up; zero distance is 0.
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
import math
N = 1
observations = []
def solve(x):
lo, hi = sorted((x['from'], x['to']))
d = sum(x['heights_mm'][lo:hi])
if d == 0:
return 0
v = x['vmax']
a = x['acc']
if d * a >= v * v:
t = d / v + v / a
else:
t = math.sqrt(2 * d / a)
return math.ceil(t * 1000 - 1e-9)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: one floor up', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 0, 'to': 1, 'vmax': 2500, 'acc': 1000}, 3465), ('sampled regression 10', {'heights_mm': [4200, 4200, 5000, 4200, 3500, 3000, 3000, 3000, 5000, 3500, 4200, 3500], 'from': 7, 'to': 6, 'vmax': 2500, 'acc': 800}, 3873), ('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('control 1', {'heights_mm': [5000, 4200, 3500, 4200, 4200, 5000, 3000, 3500, 5000, 4200, 3500], 'from': 7, 'to': 0, 'vmax': 1600, 'acc': 1200}, 19521), ('control 4', {'heights_mm': [3500, 3500, 5000, 3500], 'from': 1, 'to': 1, 'vmax': 4000, 'acc': 600}, 0), ('control 7', {'heights_mm': [3500, 3500, 4200, 5000, 3500], 'from': 4, 'to': 1, 'vmax': 2500, 'acc': 1200}, 7164)], [('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('sampled regression 36', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3500, 3500, 3000, 5000, 3000, 3500], 'from': 5, 'to': 4, 'vmax': 2500, 'acc': 800}, 4184), ('sampled regression 25', {'heights_mm': [3000, 3000, 3500, 4200, 3000, 3000, 5000, 4200, 4200], 'from': 4, 'to': 6, 'vmax': 2500, 'acc': 600}, 6325), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('control 12', {'heights_mm': [3000, 5000, 3000, 5000, 4200, 5000, 3000, 4200, 4200, 3500], 'from': 5, 'to': 1, 'vmax': 1000, 'acc': 600}, 18867), ('control 15', {'heights_mm': [3000, 3500, 3000, 3000, 5000, 3000, 3500, 3000, 3000, 3500], 'from': 4, 'to': 7, 'vmax': 1000, 'acc': 600}, 13167), ('control 18', {'heights_mm': [4200, 3000, 3500, 5000, 3500], 'from': 3, 'to': 4, 'vmax': 1000, 'acc': 800}, 6250)], [('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('sampled regression 65', {'heights_mm': [5000, 3000, 3000, 3000, 3500, 4200, 5000, 4200, 3500, 5000], 'from': 6, 'to': 1, 'vmax': 4000, 'acc': 800}, 9138), ('sampled regression 38', {'heights_mm': [4200, 3500, 4200, 4200, 5000, 3000, 3500, 4200, 3500, 3000, 3500], 'from': 6, 'to': 3, 'vmax': 4000, 'acc': 1200}, 6378), ('boundary: same floor', {'heights_mm': [3000, 3000, 3000], 'from': 2, 'to': 2, 'vmax': 2500, 'acc': 1000}, 0), ('boundary: fractional milliseconds', {'heights_mm': [3500, 3500, 3500, 3500], 'from': 0, 'to': 3, 'vmax': 1600, 'acc': 600}, 9230), ('control 23', {'heights_mm': [5000, 3000, 3000, 4200, 4200, 3500, 3000], 'from': 1, 'to': 0, 'vmax': 1600, 'acc': 1000}, 4725), ('control 26', {'heights_mm': [4200, 5000, 4200, 4200, 3000, 3500, 3500, 3500], 'from': 7, 'to': 0, 'vmax': 4000, 'acc': 1000}, 10900), ('control 29', {'heights_mm': [3000, 3000, 3500, 3500, 3000, 4200, 3500, 3000, 3000, 4200, 3500, 5000], 'from': 0, 'to': 4, 'vmax': 1000, 'acc': 1000}, 14000)], [('regression: one floor up', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 0, 'to': 1, 'vmax': 2500, 'acc': 1000}, 3465), ('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('sampled regression 58', {'heights_mm': [3500, 3500, 3500, 5000], 'from': 1, 'to': 0, 'vmax': 2500, 'acc': 600}, 4831), ('boundary: fractional milliseconds', {'heights_mm': [3500, 3500, 3500, 3500], 'from': 0, 'to': 3, 'vmax': 1600, 'acc': 600}, 9230), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('sampled regression 34', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3000, 3500], 'from': 3, 'to': 5, 'vmax': 4000, 'acc': 800}, 6205), ('control 37', {'heights_mm': [3000, 3000, 5000, 3000, 5000], 'from': 2, 'to': 4, 'vmax': 1000, 'acc': 1200}, 8834), ('control 40', {'heights_mm': [3000, 3500, 3500, 5000], 'from': 0, 'to': 2, 'vmax': 1600, 'acc': 1000}, 5663)], [('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('sampled regression 34', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3000, 3500], 'from': 3, 'to': 5, 'vmax': 4000, 'acc': 800}, 6205), ('sampled regression 79', {'heights_mm': [4200, 5000, 4200, 5000, 3500, 5000, 3500, 3500], 'from': 2, 'to': 0, 'vmax': 4000, 'acc': 800}, 6783), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('control 45', {'heights_mm': [5000, 3500, 3000, 3500, 4200, 3000, 3500, 3500, 3500, 4200], 'from': 3, 'to': 8, 'vmax': 1000, 'acc': 1200}, 18534), ('sampled regression 48', {'heights_mm': [5000, 3000, 3500, 3000, 3000, 3500, 3500, 3000, 5000, 3500], 'from': 9, 'to': 8, 'vmax': 4000, 'acc': 1000}, 4473), ('sampled regression 51', {'heights_mm': [4200, 4200, 3000, 5000, 5000, 5000, 3500], 'from': 6, 'to': 5, 'vmax': 4000, 'acc': 800}, 5000)]]
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: one floor up | 2450 | 3465 | Failed |
| sampled regression 10 | 2739 | 3873 | Failed |
| regression: short hop without reaching speed | 2739 | 3873 | Failed |
| boundary: downward trip | 5580 | 5580 | Passed |
| boundary: long run at contract speed | 16900 | 16900 | Passed |
| control 1 | 19521 | 19521 | Passed |
| control 4 | 0 | 0 | Passed |
| control 7 | 7164 | 7164 | Passed |
SHA-256 / 33dffb0e38dbb1e5dc7f22142f692c38aa87f4ffcababf7ea02999b783a944a7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
lo, hi = sorted((x['from'], x['to']))
d = sum(x['heights_mm'][lo:hi])
if d == 0:
return 0
v = x['vmax']
a = x['acc']
if d * a >= v * v:
t = d / v + v / a
else:
t = 2 * math.sqrt(2 * d / a)
return math.ceil(t * 1000 - 1e-9)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: one floor up', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 0, 'to': 1, 'vmax': 2500, 'acc': 1000}, 3465), ('sampled regression 10', {'heights_mm': [4200, 4200, 5000, 4200, 3500, 3000, 3000, 3000, 5000, 3500, 4200, 3500], 'from': 7, 'to': 6, 'vmax': 2500, 'acc': 800}, 3873), ('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('control 1', {'heights_mm': [5000, 4200, 3500, 4200, 4200, 5000, 3000, 3500, 5000, 4200, 3500], 'from': 7, 'to': 0, 'vmax': 1600, 'acc': 1200}, 19521), ('control 4', {'heights_mm': [3500, 3500, 5000, 3500], 'from': 1, 'to': 1, 'vmax': 4000, 'acc': 600}, 0), ('control 7', {'heights_mm': [3500, 3500, 4200, 5000, 3500], 'from': 4, 'to': 1, 'vmax': 2500, 'acc': 1200}, 7164)], [('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('sampled regression 36', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3500, 3500, 3000, 5000, 3000, 3500], 'from': 5, 'to': 4, 'vmax': 2500, 'acc': 800}, 4184), ('sampled regression 25', {'heights_mm': [3000, 3000, 3500, 4200, 3000, 3000, 5000, 4200, 4200], 'from': 4, 'to': 6, 'vmax': 2500, 'acc': 600}, 6325), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('control 12', {'heights_mm': [3000, 5000, 3000, 5000, 4200, 5000, 3000, 4200, 4200, 3500], 'from': 5, 'to': 1, 'vmax': 1000, 'acc': 600}, 18867), ('control 15', {'heights_mm': [3000, 3500, 3000, 3000, 5000, 3000, 3500, 3000, 3000, 3500], 'from': 4, 'to': 7, 'vmax': 1000, 'acc': 600}, 13167), ('control 18', {'heights_mm': [4200, 3000, 3500, 5000, 3500], 'from': 3, 'to': 4, 'vmax': 1000, 'acc': 800}, 6250)], [('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('sampled regression 65', {'heights_mm': [5000, 3000, 3000, 3000, 3500, 4200, 5000, 4200, 3500, 5000], 'from': 6, 'to': 1, 'vmax': 4000, 'acc': 800}, 9138), ('sampled regression 38', {'heights_mm': [4200, 3500, 4200, 4200, 5000, 3000, 3500, 4200, 3500, 3000, 3500], 'from': 6, 'to': 3, 'vmax': 4000, 'acc': 1200}, 6378), ('boundary: same floor', {'heights_mm': [3000, 3000, 3000], 'from': 2, 'to': 2, 'vmax': 2500, 'acc': 1000}, 0), ('boundary: fractional milliseconds', {'heights_mm': [3500, 3500, 3500, 3500], 'from': 0, 'to': 3, 'vmax': 1600, 'acc': 600}, 9230), ('control 23', {'heights_mm': [5000, 3000, 3000, 4200, 4200, 3500, 3000], 'from': 1, 'to': 0, 'vmax': 1600, 'acc': 1000}, 4725), ('control 26', {'heights_mm': [4200, 5000, 4200, 4200, 3000, 3500, 3500, 3500], 'from': 7, 'to': 0, 'vmax': 4000, 'acc': 1000}, 10900), ('control 29', {'heights_mm': [3000, 3000, 3500, 3500, 3000, 4200, 3500, 3000, 3000, 4200, 3500, 5000], 'from': 0, 'to': 4, 'vmax': 1000, 'acc': 1000}, 14000)], [('regression: one floor up', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 0, 'to': 1, 'vmax': 2500, 'acc': 1000}, 3465), ('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('sampled regression 58', {'heights_mm': [3500, 3500, 3500, 5000], 'from': 1, 'to': 0, 'vmax': 2500, 'acc': 600}, 4831), ('boundary: fractional milliseconds', {'heights_mm': [3500, 3500, 3500, 3500], 'from': 0, 'to': 3, 'vmax': 1600, 'acc': 600}, 9230), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('sampled regression 34', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3000, 3500], 'from': 3, 'to': 5, 'vmax': 4000, 'acc': 800}, 6205), ('control 37', {'heights_mm': [3000, 3000, 5000, 3000, 5000], 'from': 2, 'to': 4, 'vmax': 1000, 'acc': 1200}, 8834), ('control 40', {'heights_mm': [3000, 3500, 3500, 5000], 'from': 0, 'to': 2, 'vmax': 1600, 'acc': 1000}, 5663)], [('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('sampled regression 34', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3000, 3500], 'from': 3, 'to': 5, 'vmax': 4000, 'acc': 800}, 6205), ('sampled regression 79', {'heights_mm': [4200, 5000, 4200, 5000, 3500, 5000, 3500, 3500], 'from': 2, 'to': 0, 'vmax': 4000, 'acc': 800}, 6783), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('control 45', {'heights_mm': [5000, 3500, 3000, 3500, 4200, 3000, 3500, 3500, 3500, 4200], 'from': 3, 'to': 8, 'vmax': 1000, 'acc': 1200}, 18534), ('sampled regression 48', {'heights_mm': [5000, 3000, 3500, 3000, 3000, 3500, 3500, 3000, 5000, 3500], 'from': 9, 'to': 8, 'vmax': 4000, 'acc': 1000}, 4473), ('sampled regression 51', {'heights_mm': [4200, 4200, 3000, 5000, 5000, 5000, 3500], 'from': 6, 'to': 5, 'vmax': 4000, 'acc': 800}, 5000)]]
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: one floor up | 4899 | 3465 | Failed |
| sampled regression 10 | 5478 | 3873 | Failed |
| regression: short hop without reaching speed | 5478 | 3873 | Failed |
| boundary: downward trip | 5580 | 5580 | Passed |
| boundary: long run at contract speed | 16900 | 16900 | Passed |
| control 1 | 19521 | 19521 | Passed |
| control 4 | 0 | 0 | Passed |
| control 7 | 7164 | 7164 | Passed |
SHA-256 / 15631b91dbb50075612a0e1faa679ec1a583810bc2f01272f630a3612eeed5b6
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
lo, hi = sorted((x['from'], x['to']))
d = sum(x['heights_mm'][lo:hi])
if d == 0:
return 0
v = x['vmax']
a = x['acc']
if d * a >= v * v:
t = d / v + v / a
else:
t = 2 * math.sqrt(d / a)
return math.ceil(t * 1000 - 1e-9)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: one floor up', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 0, 'to': 1, 'vmax': 2500, 'acc': 1000}, 3465), ('sampled regression 10', {'heights_mm': [4200, 4200, 5000, 4200, 3500, 3000, 3000, 3000, 5000, 3500, 4200, 3500], 'from': 7, 'to': 6, 'vmax': 2500, 'acc': 800}, 3873), ('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('control 1', {'heights_mm': [5000, 4200, 3500, 4200, 4200, 5000, 3000, 3500, 5000, 4200, 3500], 'from': 7, 'to': 0, 'vmax': 1600, 'acc': 1200}, 19521), ('control 4', {'heights_mm': [3500, 3500, 5000, 3500], 'from': 1, 'to': 1, 'vmax': 4000, 'acc': 600}, 0), ('control 7', {'heights_mm': [3500, 3500, 4200, 5000, 3500], 'from': 4, 'to': 1, 'vmax': 2500, 'acc': 1200}, 7164)], [('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('sampled regression 36', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3500, 3500, 3000, 5000, 3000, 3500], 'from': 5, 'to': 4, 'vmax': 2500, 'acc': 800}, 4184), ('sampled regression 25', {'heights_mm': [3000, 3000, 3500, 4200, 3000, 3000, 5000, 4200, 4200], 'from': 4, 'to': 6, 'vmax': 2500, 'acc': 600}, 6325), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('control 12', {'heights_mm': [3000, 5000, 3000, 5000, 4200, 5000, 3000, 4200, 4200, 3500], 'from': 5, 'to': 1, 'vmax': 1000, 'acc': 600}, 18867), ('control 15', {'heights_mm': [3000, 3500, 3000, 3000, 5000, 3000, 3500, 3000, 3000, 3500], 'from': 4, 'to': 7, 'vmax': 1000, 'acc': 600}, 13167), ('control 18', {'heights_mm': [4200, 3000, 3500, 5000, 3500], 'from': 3, 'to': 4, 'vmax': 1000, 'acc': 800}, 6250)], [('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('sampled regression 65', {'heights_mm': [5000, 3000, 3000, 3000, 3500, 4200, 5000, 4200, 3500, 5000], 'from': 6, 'to': 1, 'vmax': 4000, 'acc': 800}, 9138), ('sampled regression 38', {'heights_mm': [4200, 3500, 4200, 4200, 5000, 3000, 3500, 4200, 3500, 3000, 3500], 'from': 6, 'to': 3, 'vmax': 4000, 'acc': 1200}, 6378), ('boundary: same floor', {'heights_mm': [3000, 3000, 3000], 'from': 2, 'to': 2, 'vmax': 2500, 'acc': 1000}, 0), ('boundary: fractional milliseconds', {'heights_mm': [3500, 3500, 3500, 3500], 'from': 0, 'to': 3, 'vmax': 1600, 'acc': 600}, 9230), ('control 23', {'heights_mm': [5000, 3000, 3000, 4200, 4200, 3500, 3000], 'from': 1, 'to': 0, 'vmax': 1600, 'acc': 1000}, 4725), ('control 26', {'heights_mm': [4200, 5000, 4200, 4200, 3000, 3500, 3500, 3500], 'from': 7, 'to': 0, 'vmax': 4000, 'acc': 1000}, 10900), ('control 29', {'heights_mm': [3000, 3000, 3500, 3500, 3000, 4200, 3500, 3000, 3000, 4200, 3500, 5000], 'from': 0, 'to': 4, 'vmax': 1000, 'acc': 1000}, 14000)], [('regression: one floor up', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 0, 'to': 1, 'vmax': 2500, 'acc': 1000}, 3465), ('regression: between the two regimes', {'heights_mm': [3500, 3500, 3500, 3500, 3500, 3500], 'from': 0, 'to': 2, 'vmax': 2500, 'acc': 800}, 5917), ('sampled regression 58', {'heights_mm': [3500, 3500, 3500, 5000], 'from': 1, 'to': 0, 'vmax': 2500, 'acc': 600}, 4831), ('boundary: fractional milliseconds', {'heights_mm': [3500, 3500, 3500, 3500], 'from': 0, 'to': 3, 'vmax': 1600, 'acc': 600}, 9230), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('sampled regression 34', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3000, 3500], 'from': 3, 'to': 5, 'vmax': 4000, 'acc': 800}, 6205), ('control 37', {'heights_mm': [3000, 3000, 5000, 3000, 5000], 'from': 2, 'to': 4, 'vmax': 1000, 'acc': 1200}, 8834), ('control 40', {'heights_mm': [3000, 3500, 3500, 5000], 'from': 0, 'to': 2, 'vmax': 1600, 'acc': 1000}, 5663)], [('regression: short hop without reaching speed', {'heights_mm': [3000, 3000, 3000, 3000, 3000], 'from': 1, 'to': 2, 'vmax': 4000, 'acc': 800}, 3873), ('sampled regression 34', {'heights_mm': [3000, 5000, 3500, 4200, 3500, 3000, 3500], 'from': 3, 'to': 5, 'vmax': 4000, 'acc': 800}, 6205), ('sampled regression 79', {'heights_mm': [4200, 5000, 4200, 5000, 3500, 5000, 3500, 3500], 'from': 2, 'to': 0, 'vmax': 4000, 'acc': 800}, 6783), ('boundary: downward trip', {'heights_mm': [3000, 3500, 4200, 5000], 'from': 3, 'to': 1, 'vmax': 2500, 'acc': 1000}, 5580), ('boundary: long run at contract speed', {'heights_mm': [4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000], 'from': 0, 'to': 9, 'vmax': 2500, 'acc': 1000}, 16900), ('control 45', {'heights_mm': [5000, 3500, 3000, 3500, 4200, 3000, 3500, 3500, 3500, 4200], 'from': 3, 'to': 8, 'vmax': 1000, 'acc': 1200}, 18534), ('sampled regression 48', {'heights_mm': [5000, 3000, 3500, 3000, 3000, 3500, 3500, 3000, 5000, 3500], 'from': 9, 'to': 8, 'vmax': 4000, 'acc': 1000}, 4473), ('sampled regression 51', {'heights_mm': [4200, 4200, 3000, 5000, 5000, 5000, 3500], 'from': 6, 'to': 5, 'vmax': 4000, 'acc': 800}, 5000)]]
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: one floor up | 3465 | 3465 | Passed |
| sampled regression 10 | 3873 | 3873 | Passed |
| regression: short hop without reaching speed | 3873 | 3873 | Passed |
| boundary: downward trip | 5580 | 5580 | Passed |
| boundary: long run at contract speed | 16900 | 16900 | Passed |
| control 1 | 19521 | 19521 | Passed |
| control 4 | 0 | 0 | Passed |
| control 7 | 7164 | 7164 | Passed |
SHA-256 / 5937069fd545ba6061dd9cc43bea4be3700fe8494c86a69f8d9efff2645b8e33
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:53.034547+00:00.
Case digest / 63ceb1e3ee3bc1f6c6b87fa73b462df5c29dcb957169b30245d24ed92840f67f