FAILURE MAP
← Case archive

FA-65946 / Aviation weight and balance / Open access

Negative payload returned instead of zero · case 01

A heavy aircraft with a full fuel load shows a negative payload allowance on the loadsheet.

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

ROOT CAUSE

The clamp tests whether the allowed takeoff weight is below OEW, ignoring the fuel that must also fit, so real negative payloads pass through.

VERIFIED REPAIR

Floor the payload at zero whenever it is below zero.

Unsuccessful approach: Taking the absolute value converts a deficit into a spurious positive payload.

Case contract

Input weights in kg. Allowed takeoff weight = lowest of MTOW, MLW+trip fuel, MZFW+takeoff fuel, MRW-taxi fuel; ties go to the earlier entry in that order. Allowed payload = allowed TOW - OEW - takeoff fuel, floored at 0. Return [allowed TOW, payload, limiting name].

Why this case matters

The classic loadsheet payload limitation takes the lowest of four structural limits, each translated to a takeoff weight with the correct fuel quantity.

1 / The failure

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

N = 1
observations = []
def solve(x):
    cands = [('MTOW', x['mtow']), ('MLW', x['mlw'] + x['trip_fuel']), ('MZFW', x['mzfw'] + x['takeoff_fuel']), ('MRW', x['mrw'] - x['taxi_fuel'])]
    best = cands[0]
    for c in cands[1:]:
        if c[1] < best[1]:
            best = c
    payload = best[1] - x['oew'] - x['takeoff_fuel']
    if best[1] < x['oew']:
        payload = 0
    return [best[1], payload, best[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16100, 'trip_fuel': 13000}, [70000, 11900, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5010, 'trip_fuel': 2000}, [63000, 15990, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5510}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 501, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69699, 7699, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15100, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 45200, 'mtow': 63600, 'mlw': 62300, 'mzfw': 57500, 'mrw': 64200, 'taxi_fuel': 500, 'takeoff_fuel': 9200, 'trip_fuel': 5700}, [63600, 9200, 'MTOW']], ['sampled case 2', {'oew': 35600, 'mtow': 48200, 'mlw': 46600, 'mzfw': 44800, 'mrw': 48400, 'taxi_fuel': 400, 'takeoff_fuel': 4100, 'trip_fuel': 500}, [47100, 7400, 'MLW']], ['sampled case 3', {'oew': 36100, 'mtow': 50400, 'mlw': 48100, 'mzfw': 42500, 'mrw': 50400, 'taxi_fuel': 800, 'takeoff_fuel': 20900, 'trip_fuel': 16300}, [49600, 0, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16200, 'trip_fuel': 13000}, [70000, 11800, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5020, 'trip_fuel': 2000}, [63000, 15980, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5520}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 502, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69698, 7698, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15200, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 48000, 'mtow': 71700, 'mlw': 60600, 'mzfw': 59700, 'mrw': 72100, 'taxi_fuel': 300, 'takeoff_fuel': 17500, 'trip_fuel': 14300}, [71700, 6200, 'MTOW']], ['sampled case 2', {'oew': 45100, 'mtow': 57700, 'mlw': 55900, 'mzfw': 50100, 'mrw': 57900, 'taxi_fuel': 200, 'takeoff_fuel': 5800, 'trip_fuel': 3300}, [55900, 5000, 'MZFW']], ['sampled case 3', {'oew': 38900, 'mtow': 70900, 'mlw': 64200, 'mzfw': 58600, 'mrw': 71100, 'taxi_fuel': 800, 'takeoff_fuel': 19800, 'trip_fuel': 17300}, [70300, 11600, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16300, 'trip_fuel': 13000}, [70000, 11700, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5030, 'trip_fuel': 2000}, [63000, 15970, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5530}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 503, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69697, 7697, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15300, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 41500, 'mtow': 65300, 'mlw': 54900, 'mzfw': 51800, 'mrw': 65500, 'taxi_fuel': 800, 'takeoff_fuel': 15200, 'trip_fuel': 11100}, [64700, 8000, 'MRW']], ['sampled case 2', {'oew': 48100, 'mtow': 69500, 'mlw': 66400, 'mzfw': 60800, 'mrw': 70100, 'taxi_fuel': 400, 'takeoff_fuel': 8000, 'trip_fuel': 3500}, [68800, 12700, 'MZFW']], ['sampled case 3', {'oew': 48200, 'mtow': 70500, 'mlw': 63100, 'mzfw': 61400, 'mrw': 70700, 'taxi_fuel': 500, 'takeoff_fuel': 10300, 'trip_fuel': 8800}, [70200, 11700, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16400, 'trip_fuel': 13000}, [70000, 11600, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5040, 'trip_fuel': 2000}, [63000, 15960, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5540}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 504, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69696, 7696, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15400, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 44100, 'mtow': 69600, 'mlw': 65500, 'mzfw': 61100, 'mrw': 70200, 'taxi_fuel': 200, 'takeoff_fuel': 3000, 'trip_fuel': 500}, [64100, 17000, 'MZFW']], ['sampled case 2', {'oew': 37600, 'mtow': 51800, 'mlw': 48800, 'mzfw': 47700, 'mrw': 52400, 'taxi_fuel': 800, 'takeoff_fuel': 6100, 'trip_fuel': 2300}, [51100, 7400, 'MLW']], ['sampled case 3', {'oew': 48900, 'mtow': 68600, 'mlw': 60100, 'mzfw': 56600, 'mrw': 69000, 'taxi_fuel': 300, 'takeoff_fuel': 23600, 'trip_fuel': 19400}, [68600, 0, 'MTOW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16500, 'trip_fuel': 13000}, [70000, 11500, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5050, 'trip_fuel': 2000}, [63000, 15950, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5550}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 505, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69695, 7695, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15500, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 40700, 'mtow': 68300, 'mlw': 61100, 'mzfw': 59900, 'mrw': 68300, 'taxi_fuel': 300, 'takeoff_fuel': 7200, 'trip_fuel': 4000}, [65100, 17200, 'MLW']], ['sampled case 2', {'oew': 41600, 'mtow': 69800, 'mlw': 66700, 'mzfw': 61300, 'mrw': 69800, 'taxi_fuel': 400, 'takeoff_fuel': 18100, 'trip_fuel': 14300}, [69400, 9700, 'MRW']], ['sampled case 3', {'oew': 46200, 'mtow': 65500, 'mlw': 55600, 'mzfw': 54600, 'mrw': 65700, 'taxi_fuel': 800, 'takeoff_fuel': 8400, 'trip_fuel': 4900}, [60500, 5900, 'MLW']]]]
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
long sector MTOW limited[70000, 11900, 'MTOW'][70000, 11900, 'MTOW']Passed
short sector MLW limited[63000, 15990, 'MLW'][63000, 15990, 'MLW']Passed
tankering MZFW limited[67000, 18000, 'MZFW'][67000, 18000, 'MZFW']Passed
ramp limited heavy taxi[69699, 7699, 'MRW'][69699, 7699, 'MRW']Passed
MTOW and MLW tie[68000, 14000, 'MTOW'][68000, 14000, 'MTOW']Passed
no payload possible[70000, -3100, 'MTOW'][70000, 0, 'MTOW']Failed
sampled case 1[63600, 9200, 'MTOW'][63600, 9200, 'MTOW']Passed
sampled case 2[47100, 7400, 'MLW'][47100, 7400, 'MLW']Passed
sampled case 3[49600, -7400, 'MRW'][49600, 0, 'MRW']Failed

SHA-256 / c500444088e28fe6df0fe5f69e7925d7079d07755789a5c6946fb4a580894f0d

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    cands = [('MTOW', x['mtow']), ('MLW', x['mlw'] + x['trip_fuel']), ('MZFW', x['mzfw'] + x['takeoff_fuel']), ('MRW', x['mrw'] - x['taxi_fuel'])]
    best = cands[0]
    for c in cands[1:]:
        if c[1] < best[1]:
            best = c
    payload = best[1] - x['oew'] - x['takeoff_fuel']
    if payload < 0:
        payload = abs(payload)
    return [best[1], payload, best[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16100, 'trip_fuel': 13000}, [70000, 11900, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5010, 'trip_fuel': 2000}, [63000, 15990, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5510}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 501, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69699, 7699, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15100, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 45200, 'mtow': 63600, 'mlw': 62300, 'mzfw': 57500, 'mrw': 64200, 'taxi_fuel': 500, 'takeoff_fuel': 9200, 'trip_fuel': 5700}, [63600, 9200, 'MTOW']], ['sampled case 2', {'oew': 35600, 'mtow': 48200, 'mlw': 46600, 'mzfw': 44800, 'mrw': 48400, 'taxi_fuel': 400, 'takeoff_fuel': 4100, 'trip_fuel': 500}, [47100, 7400, 'MLW']], ['sampled case 3', {'oew': 36100, 'mtow': 50400, 'mlw': 48100, 'mzfw': 42500, 'mrw': 50400, 'taxi_fuel': 800, 'takeoff_fuel': 20900, 'trip_fuel': 16300}, [49600, 0, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16200, 'trip_fuel': 13000}, [70000, 11800, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5020, 'trip_fuel': 2000}, [63000, 15980, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5520}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 502, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69698, 7698, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15200, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 48000, 'mtow': 71700, 'mlw': 60600, 'mzfw': 59700, 'mrw': 72100, 'taxi_fuel': 300, 'takeoff_fuel': 17500, 'trip_fuel': 14300}, [71700, 6200, 'MTOW']], ['sampled case 2', {'oew': 45100, 'mtow': 57700, 'mlw': 55900, 'mzfw': 50100, 'mrw': 57900, 'taxi_fuel': 200, 'takeoff_fuel': 5800, 'trip_fuel': 3300}, [55900, 5000, 'MZFW']], ['sampled case 3', {'oew': 38900, 'mtow': 70900, 'mlw': 64200, 'mzfw': 58600, 'mrw': 71100, 'taxi_fuel': 800, 'takeoff_fuel': 19800, 'trip_fuel': 17300}, [70300, 11600, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16300, 'trip_fuel': 13000}, [70000, 11700, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5030, 'trip_fuel': 2000}, [63000, 15970, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5530}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 503, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69697, 7697, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15300, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 41500, 'mtow': 65300, 'mlw': 54900, 'mzfw': 51800, 'mrw': 65500, 'taxi_fuel': 800, 'takeoff_fuel': 15200, 'trip_fuel': 11100}, [64700, 8000, 'MRW']], ['sampled case 2', {'oew': 48100, 'mtow': 69500, 'mlw': 66400, 'mzfw': 60800, 'mrw': 70100, 'taxi_fuel': 400, 'takeoff_fuel': 8000, 'trip_fuel': 3500}, [68800, 12700, 'MZFW']], ['sampled case 3', {'oew': 48200, 'mtow': 70500, 'mlw': 63100, 'mzfw': 61400, 'mrw': 70700, 'taxi_fuel': 500, 'takeoff_fuel': 10300, 'trip_fuel': 8800}, [70200, 11700, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16400, 'trip_fuel': 13000}, [70000, 11600, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5040, 'trip_fuel': 2000}, [63000, 15960, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5540}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 504, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69696, 7696, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15400, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 44100, 'mtow': 69600, 'mlw': 65500, 'mzfw': 61100, 'mrw': 70200, 'taxi_fuel': 200, 'takeoff_fuel': 3000, 'trip_fuel': 500}, [64100, 17000, 'MZFW']], ['sampled case 2', {'oew': 37600, 'mtow': 51800, 'mlw': 48800, 'mzfw': 47700, 'mrw': 52400, 'taxi_fuel': 800, 'takeoff_fuel': 6100, 'trip_fuel': 2300}, [51100, 7400, 'MLW']], ['sampled case 3', {'oew': 48900, 'mtow': 68600, 'mlw': 60100, 'mzfw': 56600, 'mrw': 69000, 'taxi_fuel': 300, 'takeoff_fuel': 23600, 'trip_fuel': 19400}, [68600, 0, 'MTOW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16500, 'trip_fuel': 13000}, [70000, 11500, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5050, 'trip_fuel': 2000}, [63000, 15950, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5550}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 505, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69695, 7695, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15500, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 40700, 'mtow': 68300, 'mlw': 61100, 'mzfw': 59900, 'mrw': 68300, 'taxi_fuel': 300, 'takeoff_fuel': 7200, 'trip_fuel': 4000}, [65100, 17200, 'MLW']], ['sampled case 2', {'oew': 41600, 'mtow': 69800, 'mlw': 66700, 'mzfw': 61300, 'mrw': 69800, 'taxi_fuel': 400, 'takeoff_fuel': 18100, 'trip_fuel': 14300}, [69400, 9700, 'MRW']], ['sampled case 3', {'oew': 46200, 'mtow': 65500, 'mlw': 55600, 'mzfw': 54600, 'mrw': 65700, 'taxi_fuel': 800, 'takeoff_fuel': 8400, 'trip_fuel': 4900}, [60500, 5900, 'MLW']]]]
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
long sector MTOW limited[70000, 11900, 'MTOW'][70000, 11900, 'MTOW']Passed
short sector MLW limited[63000, 15990, 'MLW'][63000, 15990, 'MLW']Passed
tankering MZFW limited[67000, 18000, 'MZFW'][67000, 18000, 'MZFW']Passed
ramp limited heavy taxi[69699, 7699, 'MRW'][69699, 7699, 'MRW']Passed
MTOW and MLW tie[68000, 14000, 'MTOW'][68000, 14000, 'MTOW']Passed
no payload possible[70000, 3100, 'MTOW'][70000, 0, 'MTOW']Failed
sampled case 1[63600, 9200, 'MTOW'][63600, 9200, 'MTOW']Passed
sampled case 2[47100, 7400, 'MLW'][47100, 7400, 'MLW']Passed
sampled case 3[49600, 7400, 'MRW'][49600, 0, 'MRW']Failed

SHA-256 / 0ec50c3f0cb76b8c5f9bed20d847771d675153f4d1a148a45faf5d5e357fcefe

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    cands = [('MTOW', x['mtow']), ('MLW', x['mlw'] + x['trip_fuel']), ('MZFW', x['mzfw'] + x['takeoff_fuel']), ('MRW', x['mrw'] - x['taxi_fuel'])]
    best = cands[0]
    for c in cands[1:]:
        if c[1] < best[1]:
            best = c
    payload = best[1] - x['oew'] - x['takeoff_fuel']
    if payload < 0:
        payload = 0
    return [best[1], payload, best[0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16100, 'trip_fuel': 13000}, [70000, 11900, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5010, 'trip_fuel': 2000}, [63000, 15990, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5510}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 501, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69699, 7699, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15100, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 45200, 'mtow': 63600, 'mlw': 62300, 'mzfw': 57500, 'mrw': 64200, 'taxi_fuel': 500, 'takeoff_fuel': 9200, 'trip_fuel': 5700}, [63600, 9200, 'MTOW']], ['sampled case 2', {'oew': 35600, 'mtow': 48200, 'mlw': 46600, 'mzfw': 44800, 'mrw': 48400, 'taxi_fuel': 400, 'takeoff_fuel': 4100, 'trip_fuel': 500}, [47100, 7400, 'MLW']], ['sampled case 3', {'oew': 36100, 'mtow': 50400, 'mlw': 48100, 'mzfw': 42500, 'mrw': 50400, 'taxi_fuel': 800, 'takeoff_fuel': 20900, 'trip_fuel': 16300}, [49600, 0, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16200, 'trip_fuel': 13000}, [70000, 11800, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5020, 'trip_fuel': 2000}, [63000, 15980, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5520}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 502, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69698, 7698, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15200, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 48000, 'mtow': 71700, 'mlw': 60600, 'mzfw': 59700, 'mrw': 72100, 'taxi_fuel': 300, 'takeoff_fuel': 17500, 'trip_fuel': 14300}, [71700, 6200, 'MTOW']], ['sampled case 2', {'oew': 45100, 'mtow': 57700, 'mlw': 55900, 'mzfw': 50100, 'mrw': 57900, 'taxi_fuel': 200, 'takeoff_fuel': 5800, 'trip_fuel': 3300}, [55900, 5000, 'MZFW']], ['sampled case 3', {'oew': 38900, 'mtow': 70900, 'mlw': 64200, 'mzfw': 58600, 'mrw': 71100, 'taxi_fuel': 800, 'takeoff_fuel': 19800, 'trip_fuel': 17300}, [70300, 11600, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16300, 'trip_fuel': 13000}, [70000, 11700, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5030, 'trip_fuel': 2000}, [63000, 15970, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5530}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 503, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69697, 7697, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15300, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 41500, 'mtow': 65300, 'mlw': 54900, 'mzfw': 51800, 'mrw': 65500, 'taxi_fuel': 800, 'takeoff_fuel': 15200, 'trip_fuel': 11100}, [64700, 8000, 'MRW']], ['sampled case 2', {'oew': 48100, 'mtow': 69500, 'mlw': 66400, 'mzfw': 60800, 'mrw': 70100, 'taxi_fuel': 400, 'takeoff_fuel': 8000, 'trip_fuel': 3500}, [68800, 12700, 'MZFW']], ['sampled case 3', {'oew': 48200, 'mtow': 70500, 'mlw': 63100, 'mzfw': 61400, 'mrw': 70700, 'taxi_fuel': 500, 'takeoff_fuel': 10300, 'trip_fuel': 8800}, [70200, 11700, 'MRW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16400, 'trip_fuel': 13000}, [70000, 11600, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5040, 'trip_fuel': 2000}, [63000, 15960, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5540}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 504, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69696, 7696, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15400, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 44100, 'mtow': 69600, 'mlw': 65500, 'mzfw': 61100, 'mrw': 70200, 'taxi_fuel': 200, 'takeoff_fuel': 3000, 'trip_fuel': 500}, [64100, 17000, 'MZFW']], ['sampled case 2', {'oew': 37600, 'mtow': 51800, 'mlw': 48800, 'mzfw': 47700, 'mrw': 52400, 'taxi_fuel': 800, 'takeoff_fuel': 6100, 'trip_fuel': 2300}, [51100, 7400, 'MLW']], ['sampled case 3', {'oew': 48900, 'mtow': 68600, 'mlw': 60100, 'mzfw': 56600, 'mrw': 69000, 'taxi_fuel': 300, 'takeoff_fuel': 23600, 'trip_fuel': 19400}, [68600, 0, 'MTOW']]], [['long sector MTOW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 16500, 'trip_fuel': 13000}, [70000, 11500, 'MTOW']], ['short sector MLW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 61000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 5050, 'trip_fuel': 2000}, [63000, 15950, 'MLW']], ['tankering MZFW limited', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 7000, 'trip_fuel': 5550}, [67000, 18000, 'MZFW']], ['ramp limited heavy taxi', {'oew': 42000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70200, 'taxi_fuel': 505, 'takeoff_fuel': 20000, 'trip_fuel': 16000}, [69695, 7695, 'MRW']], ['MTOW and MLW tie', {'oew': 42000, 'mtow': 68000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 12000, 'trip_fuel': 4000}, [68000, 14000, 'MTOW']], ['no payload possible', {'oew': 58000, 'mtow': 70000, 'mlw': 64000, 'mzfw': 60000, 'mrw': 70400, 'taxi_fuel': 300, 'takeoff_fuel': 15500, 'trip_fuel': 12000}, [70000, 0, 'MTOW']], ['sampled case 1', {'oew': 40700, 'mtow': 68300, 'mlw': 61100, 'mzfw': 59900, 'mrw': 68300, 'taxi_fuel': 300, 'takeoff_fuel': 7200, 'trip_fuel': 4000}, [65100, 17200, 'MLW']], ['sampled case 2', {'oew': 41600, 'mtow': 69800, 'mlw': 66700, 'mzfw': 61300, 'mrw': 69800, 'taxi_fuel': 400, 'takeoff_fuel': 18100, 'trip_fuel': 14300}, [69400, 9700, 'MRW']], ['sampled case 3', {'oew': 46200, 'mtow': 65500, 'mlw': 55600, 'mzfw': 54600, 'mrw': 65700, 'taxi_fuel': 800, 'takeoff_fuel': 8400, 'trip_fuel': 4900}, [60500, 5900, 'MLW']]]]
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
long sector MTOW limited[70000, 11900, 'MTOW'][70000, 11900, 'MTOW']Passed
short sector MLW limited[63000, 15990, 'MLW'][63000, 15990, 'MLW']Passed
tankering MZFW limited[67000, 18000, 'MZFW'][67000, 18000, 'MZFW']Passed
ramp limited heavy taxi[69699, 7699, 'MRW'][69699, 7699, 'MRW']Passed
MTOW and MLW tie[68000, 14000, 'MTOW'][68000, 14000, 'MTOW']Passed
no payload possible[70000, 0, 'MTOW'][70000, 0, 'MTOW']Passed
sampled case 1[63600, 9200, 'MTOW'][63600, 9200, 'MTOW']Passed
sampled case 2[47100, 7400, 'MLW'][47100, 7400, 'MLW']Passed
sampled case 3[49600, 0, 'MRW'][49600, 0, 'MRW']Passed

SHA-256 / 8c3be47d86ed752461125d335474fcfe216eefdb38ece2e7f0cd0d77826470aa

Verification & scope

A deterministic toy loading model with stipulated constants; it is not an approved aircraft flight manual procedure and makes no claim of regulatory conformance. 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:38.573325+00:00.

Case digest / b5a805eb456f717c88d4ab573b1872aac60c362556a1bb9b4ef242b9378c60e5