FAILURE MAP
← Case archive

FA-67401 / Elevator dispatch scheduling / Open access

Door dwell time calculation: dwell cap · case 01

Crowded stops hold the car far beyond the maximum dwell.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The maximum dwell is never applied.

THE FAILURE

The maximum dwell is never applied.

Unsuccessful approach: Capping only the base leaves the passenger time uncapped.

Case contract

Dwell time in deciseconds: base 40 for a hall call stop (or a stop with both hall and car calls), 25 for a car-call-only stop. Accessible mode extends the base by half (integer). Every passenger beyond the first adds 10. The result is capped at 150. From the third reopen onward the door nudges with a fixed dwell of 20.

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):
    base = 40 if x['call_type'] in ('hall', 'both') else 25
    if x['accessible']:
        base = base * 3 // 2
    pax = x['boarding'] + x['alighting']
    dwell = base + 10 * max(pax - 1, 0)
    dwell = dwell
    nudge = x['reopen_count'] >= 3
    if nudge:
        dwell = 20
    return {'dwell_ds': dwell, 'nudge': nudge}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 18', {'call_type': 'car', 'boarding': 8, 'alighting': 7, 'reopen_count': 2, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('boundary: stop with hall and car calls', {'call_type': 'both', 'boarding': 1, 'alighting': 1, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 50, 'nudge': False}), ('boundary: accessible car call stop', {'call_type': 'car', 'boarding': 1, 'alighting': 0, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 37, 'nudge': False}), ('control 1', {'call_type': 'both', 'boarding': 6, 'alighting': 3, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 4', {'call_type': 'hall', 'boarding': 5, 'alighting': 0, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 100, 'nudge': False}), ('control 7', {'call_type': 'both', 'boarding': 5, 'alighting': 1, 'reopen_count': 4, 'accessible': True}, {'dwell_ds': 20, 'nudge': True})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 80', {'call_type': 'both', 'boarding': 7, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('boundary: accessible busy hall stop', {'call_type': 'hall', 'boarding': 5, 'alighting': 3, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 130, 'nudge': False}), ('boundary: nobody boards or alights', {'call_type': 'car', 'boarding': 0, 'alighting': 0, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 25, 'nudge': False}), ('control 12', {'call_type': 'car', 'boarding': 0, 'alighting': 4, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 15', {'call_type': 'hall', 'boarding': 2, 'alighting': 5, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 100, 'nudge': False}), ('sampled regression 18', {'call_type': 'car', 'boarding': 8, 'alighting': 7, 'reopen_count': 2, 'accessible': False}, {'dwell_ds': 150, 'nudge': False})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 59', {'call_type': 'both', 'boarding': 4, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('boundary: third reopen', {'call_type': 'hall', 'boarding': 2, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('boundary: third reopen with nobody moving', {'call_type': 'car', 'boarding': 0, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 23', {'call_type': 'hall', 'boarding': 7, 'alighting': 3, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 130, 'nudge': False}), ('control 26', {'call_type': 'both', 'boarding': 3, 'alighting': 3, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 110, 'nudge': False}), ('control 29', {'call_type': 'both', 'boarding': 1, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 33', {'call_type': 'hall', 'boarding': 6, 'alighting': 5, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('boundary: third reopen with nobody moving', {'call_type': 'car', 'boarding': 0, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('boundary: single passenger', {'call_type': 'hall', 'boarding': 1, 'alighting': 0, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 40, 'nudge': False}), ('control 34', {'call_type': 'hall', 'boarding': 3, 'alighting': 5, 'reopen_count': 1, 'accessible': False}, {'dwell_ds': 110, 'nudge': False}), ('control 37', {'call_type': 'hall', 'boarding': 4, 'alighting': 0, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 40', {'call_type': 'car', 'boarding': 1, 'alighting': 8, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('boundary: stop with hall and car calls', {'call_type': 'both', 'boarding': 1, 'alighting': 1, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 50, 'nudge': False}), ('boundary: accessible car call stop', {'call_type': 'car', 'boarding': 1, 'alighting': 0, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 37, 'nudge': False}), ('boundary: accessible busy hall stop', {'call_type': 'hall', 'boarding': 5, 'alighting': 3, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 130, 'nudge': False}), ('control 45', {'call_type': 'both', 'boarding': 6, 'alighting': 0, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 48', {'call_type': 'hall', 'boarding': 3, 'alighting': 8, 'reopen_count': 2, 'accessible': False}, {'dwell_ds': 140, 'nudge': False}), ('control 51', {'call_type': 'hall', 'boarding': 2, 'alighting': 4, 'reopen_count': 1, 'accessible': False}, {'dwell_ds': 90, 'nudge': False})]]
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 fixtureActualExpectedOutcome
regression: crowd exceeds the cap{'dwell_ds': 190, 'nudge': False}{'dwell_ds': 150, 'nudge': False}Failed
sampled regression 56{'dwell_ds': 167, 'nudge': False}{'dwell_ds': 150, 'nudge': False}Failed
sampled regression 18{'dwell_ds': 165, 'nudge': False}{'dwell_ds': 150, 'nudge': False}Failed
boundary: stop with hall and car calls{'dwell_ds': 50, 'nudge': False}{'dwell_ds': 50, 'nudge': False}Passed
boundary: accessible car call stop{'dwell_ds': 37, 'nudge': False}{'dwell_ds': 37, 'nudge': False}Passed
control 1{'dwell_ds': 20, 'nudge': True}{'dwell_ds': 20, 'nudge': True}Passed
control 4{'dwell_ds': 100, 'nudge': False}{'dwell_ds': 100, 'nudge': False}Passed
control 7{'dwell_ds': 20, 'nudge': True}{'dwell_ds': 20, 'nudge': True}Passed

SHA-256 / 043599ebe068153f6e5a3d17265e9922fde9f10b25ca94ad56c42ae582efd627

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    base = 40 if x['call_type'] in ('hall', 'both') else 25
    if x['accessible']:
        base = base * 3 // 2
    pax = x['boarding'] + x['alighting']
    dwell = base + 10 * max(pax - 1, 0)
    dwell = min(base, 150) + 10 * max(pax - 1, 0)
    nudge = x['reopen_count'] >= 3
    if nudge:
        dwell = 20
    return {'dwell_ds': dwell, 'nudge': nudge}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 18', {'call_type': 'car', 'boarding': 8, 'alighting': 7, 'reopen_count': 2, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('boundary: stop with hall and car calls', {'call_type': 'both', 'boarding': 1, 'alighting': 1, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 50, 'nudge': False}), ('boundary: accessible car call stop', {'call_type': 'car', 'boarding': 1, 'alighting': 0, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 37, 'nudge': False}), ('control 1', {'call_type': 'both', 'boarding': 6, 'alighting': 3, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 4', {'call_type': 'hall', 'boarding': 5, 'alighting': 0, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 100, 'nudge': False}), ('control 7', {'call_type': 'both', 'boarding': 5, 'alighting': 1, 'reopen_count': 4, 'accessible': True}, {'dwell_ds': 20, 'nudge': True})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 80', {'call_type': 'both', 'boarding': 7, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('boundary: accessible busy hall stop', {'call_type': 'hall', 'boarding': 5, 'alighting': 3, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 130, 'nudge': False}), ('boundary: nobody boards or alights', {'call_type': 'car', 'boarding': 0, 'alighting': 0, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 25, 'nudge': False}), ('control 12', {'call_type': 'car', 'boarding': 0, 'alighting': 4, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 15', {'call_type': 'hall', 'boarding': 2, 'alighting': 5, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 100, 'nudge': False}), ('sampled regression 18', {'call_type': 'car', 'boarding': 8, 'alighting': 7, 'reopen_count': 2, 'accessible': False}, {'dwell_ds': 150, 'nudge': False})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 59', {'call_type': 'both', 'boarding': 4, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('boundary: third reopen', {'call_type': 'hall', 'boarding': 2, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('boundary: third reopen with nobody moving', {'call_type': 'car', 'boarding': 0, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 23', {'call_type': 'hall', 'boarding': 7, 'alighting': 3, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 130, 'nudge': False}), ('control 26', {'call_type': 'both', 'boarding': 3, 'alighting': 3, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 110, 'nudge': False}), ('control 29', {'call_type': 'both', 'boarding': 1, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 33', {'call_type': 'hall', 'boarding': 6, 'alighting': 5, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('boundary: third reopen with nobody moving', {'call_type': 'car', 'boarding': 0, 'alighting': 0, 'reopen_count': 3, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('boundary: single passenger', {'call_type': 'hall', 'boarding': 1, 'alighting': 0, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 40, 'nudge': False}), ('control 34', {'call_type': 'hall', 'boarding': 3, 'alighting': 5, 'reopen_count': 1, 'accessible': False}, {'dwell_ds': 110, 'nudge': False}), ('control 37', {'call_type': 'hall', 'boarding': 4, 'alighting': 0, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 40', {'call_type': 'car', 'boarding': 1, 'alighting': 8, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True})], [('regression: crowd exceeds the cap', {'call_type': 'hall', 'boarding': 8, 'alighting': 8, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 150, 'nudge': False}), ('sampled regression 56', {'call_type': 'car', 'boarding': 6, 'alighting': 8, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 150, 'nudge': False}), ('boundary: stop with hall and car calls', {'call_type': 'both', 'boarding': 1, 'alighting': 1, 'reopen_count': 0, 'accessible': False}, {'dwell_ds': 50, 'nudge': False}), ('boundary: accessible car call stop', {'call_type': 'car', 'boarding': 1, 'alighting': 0, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 37, 'nudge': False}), ('boundary: accessible busy hall stop', {'call_type': 'hall', 'boarding': 5, 'alighting': 3, 'reopen_count': 0, 'accessible': True}, {'dwell_ds': 130, 'nudge': False}), ('control 45', {'call_type': 'both', 'boarding': 6, 'alighting': 0, 'reopen_count': 4, 'accessible': False}, {'dwell_ds': 20, 'nudge': True}), ('control 48', {'call_type': 'hall', 'boarding': 3, 'alighting': 8, 'reopen_count': 2, 'accessible': False}, {'dwell_ds': 140, 'nudge': False}), ('control 51', {'call_type': 'hall', 'boarding': 2, 'alighting': 4, 'reopen_count': 1, 'accessible': False}, {'dwell_ds': 90, 'nudge': False})]]
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 fixtureActualExpectedOutcome
regression: crowd exceeds the cap{'dwell_ds': 190, 'nudge': False}{'dwell_ds': 150, 'nudge': False}Failed
sampled regression 56{'dwell_ds': 167, 'nudge': False}{'dwell_ds': 150, 'nudge': False}Failed
sampled regression 18{'dwell_ds': 165, 'nudge': False}{'dwell_ds': 150, 'nudge': False}Failed
boundary: stop with hall and car calls{'dwell_ds': 50, 'nudge': False}{'dwell_ds': 50, 'nudge': False}Passed
boundary: accessible car call stop{'dwell_ds': 37, 'nudge': False}{'dwell_ds': 37, 'nudge': False}Passed
control 1{'dwell_ds': 20, 'nudge': True}{'dwell_ds': 20, 'nudge': True}Passed
control 4{'dwell_ds': 100, 'nudge': False}{'dwell_ds': 100, 'nudge': False}Passed
control 7{'dwell_ds': 20, 'nudge': True}{'dwell_ds': 20, 'nudge': True}Passed

SHA-256 / b327718d272168fcffa46b341aa85e2fd28124c29ab7180c5388cac6b6de48f9

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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:52.578598+00:00.

Case digest / eb74c22fc48a91b65f15b376e92c82ddd176e0566ad297aeea207d2a913a7d11