FAILURE MAP
← Case archive

FA-66056 / Aviation weight and balance / Open access

Landing exactly at MLW flagged as overweight · case 01

A flight planned to land at exactly the maximum landing weight is reported MLW.

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

ROOT CAUSE

The MLW comparison is inclusive although the limit itself is permitted.

VERIFIED REPAIR

Flag only landing weights strictly above MLW.

Unsuccessful approach: Rounding landing weight before comparing lets fractional exceedances under half a pound pass.

Case contract

Input {'tow','tocg','burn_gal','fuel_arm','density','mlw','env':[fwd,aft]}. Burned fuel weight = gallons*density removed at the fuel arm. Status 'MLW' if landing weight exceeds MLW (checked first), 'CG' if landing CG outside the inclusive envelope, else 'OK'. Return [LW r1, LCG r2, status].

Why this case matters

Landing CG differs from takeoff CG because fuel is removed at the tank arm; landing weight has its own structural limit.

1 / The failure

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

N = 1
observations = []
def solve(x):
    dens = x['density']
    bw = x['burn_gal'] * dens
    lw = x['tow'] - bw
    lm = x['tow'] * x['tocg'] - bw * x['fuel_arm']
    lcg = lm / lw
    fwd, aft = x['env']
    if lw >= x['mlw']: status = 'MLW'
    elif lcg < fwd or lcg > aft: status = 'CG'
    else: status = 'OK'
    return [round(lw, 1), round(lcg, 2), status]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 26.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2344.0, 41.6, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.2, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2518.8, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.65, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.21, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.9]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 61.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4591.3, 141.29, 'OK']], ['sampled case 1', {'tow': 3210.0, 'tocg': 43.86, 'burn_gal': 48.2, 'fuel_arm': 50.2, 'density': 6.7, 'mlw': 3144.0, 'env': [37.4, 44.6]}, [2887.1, 43.15, 'OK']], ['sampled case 2', {'tow': 2319.0, 'tocg': 45.94, 'burn_gal': 37.7, 'fuel_arm': 46.1, 'density': 6.7, 'mlw': 2223.0, 'env': [35.6, 44.7]}, [2066.4, 45.92, 'CG']], ['sampled case 3', {'tow': 2538.0, 'tocg': 42.69, 'burn_gal': 42.3, 'fuel_arm': 39.8, 'density': 6.7, 'mlw': 2436.0, 'env': [38.5, 45.3]}, [2254.6, 43.05, 'OK']], ['regression: maximum landing weight comparison', {'tow': 2335.0, 'tocg': 43.12, 'burn_gal': 21.8, 'fuel_arm': 46.4, 'density': 6.0, 'mlw': 2204.0, 'env': [36.7, 43.1]}, [2204.2, 42.93, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 27.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2338.0, 41.58, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.4, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2517.6, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.7, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.27, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.8]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 62.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4584.6, 141.28, 'OK']], ['sampled case 1', {'tow': 2616.0, 'tocg': 44.14, 'burn_gal': 50.6, 'fuel_arm': 35.7, 'density': 6.0, 'mlw': 2515.0, 'env': [35.7, 46.3]}, [2312.4, 45.25, 'OK']], ['sampled case 2', {'tow': 3505.0, 'tocg': 45.73, 'burn_gal': 51.8, 'fuel_arm': 36.9, 'density': 6.7, 'mlw': 3402.0, 'env': [38.6, 44.7]}, [3157.9, 46.7, 'CG']], ['sampled case 3', {'tow': 4317.0, 'tocg': 45.35, 'burn_gal': 46.0, 'fuel_arm': 30.4, 'density': 6.7, 'mlw': 3966.0, 'env': [37.2, 44.7]}, [4008.8, 46.5, 'MLW']], ['regression: maximum landing weight comparison', {'tow': 4939.0, 'tocg': 44.23, 'burn_gal': 27.0, 'fuel_arm': 57.7, 'density': 6.7, 'mlw': 4758.0, 'env': [39.0, 45.7]}, [4758.1, 43.72, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 28.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2332.0, 41.57, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.6, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2516.4, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.75, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.32, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.7]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 63.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4577.9, 141.26, 'OK']], ['sampled case 1', {'tow': 3241.0, 'tocg': 42.19, 'burn_gal': 26.4, 'fuel_arm': 41.7, 'density': 6.7, 'mlw': 2992.0, 'env': [38.5, 45.7]}, [3064.1, 42.22, 'MLW']], ['sampled case 2', {'tow': 2273.0, 'tocg': 38.95, 'burn_gal': 26.8, 'fuel_arm': 59.5, 'density': 6.7, 'mlw': 2176.0, 'env': [38.3, 44.8]}, [2093.4, 37.19, 'CG']], ['sampled case 3', {'tow': 4321.0, 'tocg': 45.0, 'burn_gal': 28.2, 'fuel_arm': 37.5, 'density': 6.7, 'mlw': 4074.0, 'env': [38.0, 44.9]}, [4132.1, 45.34, 'MLW']], ['regression: maximum landing weight comparison', {'tow': 5111.0, 'tocg': 44.01, 'burn_gal': 7.1, 'fuel_arm': 43.5, 'density': 6.0, 'mlw': 5068.0, 'env': [37.5, 43.8]}, [5068.4, 44.01, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 29.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2326.0, 41.55, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.8, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2515.2, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.800000000000004, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.38, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.6]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 64.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4571.2, 141.25, 'OK']], ['sampled case 1', {'tow': 2016.0, 'tocg': 40.79, 'burn_gal': 78.4, 'fuel_arm': 52.8, 'density': 6.0, 'mlw': 1662.0, 'env': [35.1, 46.3]}, [1545.6, 37.13, 'OK']], ['sampled case 2', {'tow': 5687.0, 'tocg': 39.23, 'burn_gal': 51.9, 'fuel_arm': 54.5, 'density': 6.7, 'mlw': 5345.0, 'env': [37.9, 46.1]}, [5339.3, 38.24, 'OK']], ['sampled case 3', {'tow': 5347.0, 'tocg': 40.15, 'burn_gal': 5.1, 'fuel_arm': 42.2, 'density': 6.7, 'mlw': 5370.0, 'env': [35.1, 43.8]}, [5312.8, 40.14, 'OK']], ['regression: maximum landing weight comparison', {'tow': 3719.0, 'tocg': 42.91, 'burn_gal': 46.1, 'fuel_arm': 43.7, 'density': 6.0, 'mlw': 3442.0, 'env': [36.8, 43.1]}, [3442.4, 42.85, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 30.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2320.0, 41.53, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 6.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2514.0, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.85, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.43, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.5]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 65.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4564.5, 141.24, 'OK']], ['sampled case 1', {'tow': 4773.0, 'tocg': 38.16, 'burn_gal': 54.7, 'fuel_arm': 51.7, 'density': 6.0, 'mlw': 4762.0, 'env': [38.1, 45.8]}, [4444.8, 37.16, 'CG']], ['sampled case 2', {'tow': 5036.0, 'tocg': 43.65, 'burn_gal': 50.5, 'fuel_arm': 57.4, 'density': 6.7, 'mlw': 4986.0, 'env': [39.0, 46.7]}, [4697.6, 42.66, 'OK']], ['sampled case 3', {'tow': 4947.0, 'tocg': 43.42, 'burn_gal': 41.6, 'fuel_arm': 57.9, 'density': 6.7, 'mlw': 4824.0, 'env': [39.6, 44.2]}, [4668.3, 42.56, 'OK']], ['regression: maximum landing weight comparison', {'tow': 3472.0, 'tocg': 38.61, 'burn_gal': 58.6, 'fuel_arm': 32.6, 'density': 6.7, 'mlw': 3079.0, 'env': [37.1, 45.7]}, [3079.4, 39.38, '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
normal trip[2344.0, 41.6, 'OK'][2344.0, 41.6, 'OK']Passed
landing overweight[2518.8, 40.91, 'MLW'][2518.8, 40.91, 'MLW']Passed
exactly max landing[2450.0, 40.83, 'MLW'][2450.0, 40.83, 'OK']Failed
burn moves CG forward out[2060.0, 34.21, 'CG'][2060.0, 34.21, 'CG']Passed
forward tank burn moves CG aft[4597.0, 150.54, 'CG'][4597.0, 150.54, 'CG']Passed
jet fuel density[4591.3, 141.29, 'OK'][4591.3, 141.29, 'OK']Passed
sampled case 1[2887.1, 43.15, 'OK'][2887.1, 43.15, 'OK']Passed
sampled case 2[2066.4, 45.92, 'CG'][2066.4, 45.92, 'CG']Passed
sampled case 3[2254.6, 43.05, 'OK'][2254.6, 43.05, 'OK']Passed
regression: maximum landing weight comparison[2204.2, 42.93, 'MLW'][2204.2, 42.93, 'MLW']Passed

SHA-256 / 1cee1dbbb740b286fbf29fab645c2ede4d80a71e7df70269fa3e7594d4e38654

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    dens = x['density']
    bw = x['burn_gal'] * dens
    lw = x['tow'] - bw
    lm = x['tow'] * x['tocg'] - bw * x['fuel_arm']
    lcg = lm / lw
    fwd, aft = x['env']
    if round(lw) > x['mlw']: status = 'MLW'
    elif lcg < fwd or lcg > aft: status = 'CG'
    else: status = 'OK'
    return [round(lw, 1), round(lcg, 2), status]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 26.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2344.0, 41.6, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.2, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2518.8, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.65, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.21, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.9]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 61.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4591.3, 141.29, 'OK']], ['sampled case 1', {'tow': 3210.0, 'tocg': 43.86, 'burn_gal': 48.2, 'fuel_arm': 50.2, 'density': 6.7, 'mlw': 3144.0, 'env': [37.4, 44.6]}, [2887.1, 43.15, 'OK']], ['sampled case 2', {'tow': 2319.0, 'tocg': 45.94, 'burn_gal': 37.7, 'fuel_arm': 46.1, 'density': 6.7, 'mlw': 2223.0, 'env': [35.6, 44.7]}, [2066.4, 45.92, 'CG']], ['sampled case 3', {'tow': 2538.0, 'tocg': 42.69, 'burn_gal': 42.3, 'fuel_arm': 39.8, 'density': 6.7, 'mlw': 2436.0, 'env': [38.5, 45.3]}, [2254.6, 43.05, 'OK']], ['regression: maximum landing weight comparison', {'tow': 2335.0, 'tocg': 43.12, 'burn_gal': 21.8, 'fuel_arm': 46.4, 'density': 6.0, 'mlw': 2204.0, 'env': [36.7, 43.1]}, [2204.2, 42.93, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 27.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2338.0, 41.58, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.4, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2517.6, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.7, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.27, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.8]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 62.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4584.6, 141.28, 'OK']], ['sampled case 1', {'tow': 2616.0, 'tocg': 44.14, 'burn_gal': 50.6, 'fuel_arm': 35.7, 'density': 6.0, 'mlw': 2515.0, 'env': [35.7, 46.3]}, [2312.4, 45.25, 'OK']], ['sampled case 2', {'tow': 3505.0, 'tocg': 45.73, 'burn_gal': 51.8, 'fuel_arm': 36.9, 'density': 6.7, 'mlw': 3402.0, 'env': [38.6, 44.7]}, [3157.9, 46.7, 'CG']], ['sampled case 3', {'tow': 4317.0, 'tocg': 45.35, 'burn_gal': 46.0, 'fuel_arm': 30.4, 'density': 6.7, 'mlw': 3966.0, 'env': [37.2, 44.7]}, [4008.8, 46.5, 'MLW']], ['regression: maximum landing weight comparison', {'tow': 4939.0, 'tocg': 44.23, 'burn_gal': 27.0, 'fuel_arm': 57.7, 'density': 6.7, 'mlw': 4758.0, 'env': [39.0, 45.7]}, [4758.1, 43.72, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 28.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2332.0, 41.57, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.6, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2516.4, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.75, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.32, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.7]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 63.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4577.9, 141.26, 'OK']], ['sampled case 1', {'tow': 3241.0, 'tocg': 42.19, 'burn_gal': 26.4, 'fuel_arm': 41.7, 'density': 6.7, 'mlw': 2992.0, 'env': [38.5, 45.7]}, [3064.1, 42.22, 'MLW']], ['sampled case 2', {'tow': 2273.0, 'tocg': 38.95, 'burn_gal': 26.8, 'fuel_arm': 59.5, 'density': 6.7, 'mlw': 2176.0, 'env': [38.3, 44.8]}, [2093.4, 37.19, 'CG']], ['sampled case 3', {'tow': 4321.0, 'tocg': 45.0, 'burn_gal': 28.2, 'fuel_arm': 37.5, 'density': 6.7, 'mlw': 4074.0, 'env': [38.0, 44.9]}, [4132.1, 45.34, 'MLW']], ['regression: maximum landing weight comparison', {'tow': 5111.0, 'tocg': 44.01, 'burn_gal': 7.1, 'fuel_arm': 43.5, 'density': 6.0, 'mlw': 5068.0, 'env': [37.5, 43.8]}, [5068.4, 44.01, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 29.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2326.0, 41.55, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.8, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2515.2, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.800000000000004, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.38, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.6]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 64.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4571.2, 141.25, 'OK']], ['sampled case 1', {'tow': 2016.0, 'tocg': 40.79, 'burn_gal': 78.4, 'fuel_arm': 52.8, 'density': 6.0, 'mlw': 1662.0, 'env': [35.1, 46.3]}, [1545.6, 37.13, 'OK']], ['sampled case 2', {'tow': 5687.0, 'tocg': 39.23, 'burn_gal': 51.9, 'fuel_arm': 54.5, 'density': 6.7, 'mlw': 5345.0, 'env': [37.9, 46.1]}, [5339.3, 38.24, 'OK']], ['sampled case 3', {'tow': 5347.0, 'tocg': 40.15, 'burn_gal': 5.1, 'fuel_arm': 42.2, 'density': 6.7, 'mlw': 5370.0, 'env': [35.1, 43.8]}, [5312.8, 40.14, 'OK']], ['regression: maximum landing weight comparison', {'tow': 3719.0, 'tocg': 42.91, 'burn_gal': 46.1, 'fuel_arm': 43.7, 'density': 6.0, 'mlw': 3442.0, 'env': [36.8, 43.1]}, [3442.4, 42.85, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 30.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2320.0, 41.53, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 6.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2514.0, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.85, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.43, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.5]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 65.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4564.5, 141.24, 'OK']], ['sampled case 1', {'tow': 4773.0, 'tocg': 38.16, 'burn_gal': 54.7, 'fuel_arm': 51.7, 'density': 6.0, 'mlw': 4762.0, 'env': [38.1, 45.8]}, [4444.8, 37.16, 'CG']], ['sampled case 2', {'tow': 5036.0, 'tocg': 43.65, 'burn_gal': 50.5, 'fuel_arm': 57.4, 'density': 6.7, 'mlw': 4986.0, 'env': [39.0, 46.7]}, [4697.6, 42.66, 'OK']], ['sampled case 3', {'tow': 4947.0, 'tocg': 43.42, 'burn_gal': 41.6, 'fuel_arm': 57.9, 'density': 6.7, 'mlw': 4824.0, 'env': [39.6, 44.2]}, [4668.3, 42.56, 'OK']], ['regression: maximum landing weight comparison', {'tow': 3472.0, 'tocg': 38.61, 'burn_gal': 58.6, 'fuel_arm': 32.6, 'density': 6.7, 'mlw': 3079.0, 'env': [37.1, 45.7]}, [3079.4, 39.38, '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
normal trip[2344.0, 41.6, 'OK'][2344.0, 41.6, 'OK']Passed
landing overweight[2518.8, 40.91, 'MLW'][2518.8, 40.91, 'MLW']Passed
exactly max landing[2450.0, 40.83, 'OK'][2450.0, 40.83, 'OK']Passed
burn moves CG forward out[2060.0, 34.21, 'CG'][2060.0, 34.21, 'CG']Passed
forward tank burn moves CG aft[4597.0, 150.54, 'CG'][4597.0, 150.54, 'CG']Passed
jet fuel density[4591.3, 141.29, 'OK'][4591.3, 141.29, 'OK']Passed
sampled case 1[2887.1, 43.15, 'OK'][2887.1, 43.15, 'OK']Passed
sampled case 2[2066.4, 45.92, 'CG'][2066.4, 45.92, 'CG']Passed
sampled case 3[2254.6, 43.05, 'OK'][2254.6, 43.05, 'OK']Passed
regression: maximum landing weight comparison[2204.2, 42.93, 'OK'][2204.2, 42.93, 'MLW']Failed

SHA-256 / 0e58f0535b30b60c2ad444dbb5fb1cac9166f8dacb108e6f0c96053b18c76b34

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    dens = x['density']
    bw = x['burn_gal'] * dens
    lw = x['tow'] - bw
    lm = x['tow'] * x['tocg'] - bw * x['fuel_arm']
    lcg = lm / lw
    fwd, aft = x['env']
    if lw > x['mlw']: status = 'MLW'
    elif lcg < fwd or lcg > aft: status = 'CG'
    else: status = 'OK'
    return [round(lw, 1), round(lcg, 2), status]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 26.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2344.0, 41.6, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.2, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2518.8, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.65, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.21, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.9]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 61.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4591.3, 141.29, 'OK']], ['sampled case 1', {'tow': 3210.0, 'tocg': 43.86, 'burn_gal': 48.2, 'fuel_arm': 50.2, 'density': 6.7, 'mlw': 3144.0, 'env': [37.4, 44.6]}, [2887.1, 43.15, 'OK']], ['sampled case 2', {'tow': 2319.0, 'tocg': 45.94, 'burn_gal': 37.7, 'fuel_arm': 46.1, 'density': 6.7, 'mlw': 2223.0, 'env': [35.6, 44.7]}, [2066.4, 45.92, 'CG']], ['sampled case 3', {'tow': 2538.0, 'tocg': 42.69, 'burn_gal': 42.3, 'fuel_arm': 39.8, 'density': 6.7, 'mlw': 2436.0, 'env': [38.5, 45.3]}, [2254.6, 43.05, 'OK']], ['regression: maximum landing weight comparison', {'tow': 2335.0, 'tocg': 43.12, 'burn_gal': 21.8, 'fuel_arm': 46.4, 'density': 6.0, 'mlw': 2204.0, 'env': [36.7, 43.1]}, [2204.2, 42.93, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 27.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2338.0, 41.58, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.4, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2517.6, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.7, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.27, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.8]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 62.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4584.6, 141.28, 'OK']], ['sampled case 1', {'tow': 2616.0, 'tocg': 44.14, 'burn_gal': 50.6, 'fuel_arm': 35.7, 'density': 6.0, 'mlw': 2515.0, 'env': [35.7, 46.3]}, [2312.4, 45.25, 'OK']], ['sampled case 2', {'tow': 3505.0, 'tocg': 45.73, 'burn_gal': 51.8, 'fuel_arm': 36.9, 'density': 6.7, 'mlw': 3402.0, 'env': [38.6, 44.7]}, [3157.9, 46.7, 'CG']], ['sampled case 3', {'tow': 4317.0, 'tocg': 45.35, 'burn_gal': 46.0, 'fuel_arm': 30.4, 'density': 6.7, 'mlw': 3966.0, 'env': [37.2, 44.7]}, [4008.8, 46.5, 'MLW']], ['regression: maximum landing weight comparison', {'tow': 4939.0, 'tocg': 44.23, 'burn_gal': 27.0, 'fuel_arm': 57.7, 'density': 6.7, 'mlw': 4758.0, 'env': [39.0, 45.7]}, [4758.1, 43.72, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 28.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2332.0, 41.57, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.6, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2516.4, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.75, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.32, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.7]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 63.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4577.9, 141.26, 'OK']], ['sampled case 1', {'tow': 3241.0, 'tocg': 42.19, 'burn_gal': 26.4, 'fuel_arm': 41.7, 'density': 6.7, 'mlw': 2992.0, 'env': [38.5, 45.7]}, [3064.1, 42.22, 'MLW']], ['sampled case 2', {'tow': 2273.0, 'tocg': 38.95, 'burn_gal': 26.8, 'fuel_arm': 59.5, 'density': 6.7, 'mlw': 2176.0, 'env': [38.3, 44.8]}, [2093.4, 37.19, 'CG']], ['sampled case 3', {'tow': 4321.0, 'tocg': 45.0, 'burn_gal': 28.2, 'fuel_arm': 37.5, 'density': 6.7, 'mlw': 4074.0, 'env': [38.0, 44.9]}, [4132.1, 45.34, 'MLW']], ['regression: maximum landing weight comparison', {'tow': 5111.0, 'tocg': 44.01, 'burn_gal': 7.1, 'fuel_arm': 43.5, 'density': 6.0, 'mlw': 5068.0, 'env': [37.5, 43.8]}, [5068.4, 44.01, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 29.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2326.0, 41.55, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.8, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2515.2, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.800000000000004, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.38, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.6]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 64.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4571.2, 141.25, 'OK']], ['sampled case 1', {'tow': 2016.0, 'tocg': 40.79, 'burn_gal': 78.4, 'fuel_arm': 52.8, 'density': 6.0, 'mlw': 1662.0, 'env': [35.1, 46.3]}, [1545.6, 37.13, 'OK']], ['sampled case 2', {'tow': 5687.0, 'tocg': 39.23, 'burn_gal': 51.9, 'fuel_arm': 54.5, 'density': 6.7, 'mlw': 5345.0, 'env': [37.9, 46.1]}, [5339.3, 38.24, 'OK']], ['sampled case 3', {'tow': 5347.0, 'tocg': 40.15, 'burn_gal': 5.1, 'fuel_arm': 42.2, 'density': 6.7, 'mlw': 5370.0, 'env': [35.1, 43.8]}, [5312.8, 40.14, 'OK']], ['regression: maximum landing weight comparison', {'tow': 3719.0, 'tocg': 42.91, 'burn_gal': 46.1, 'fuel_arm': 43.7, 'density': 6.0, 'mlw': 3442.0, 'env': [36.8, 43.1]}, [3442.4, 42.85, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 30.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2320.0, 41.53, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 6.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2514.0, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.85, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.43, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.5]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 65.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4564.5, 141.24, 'OK']], ['sampled case 1', {'tow': 4773.0, 'tocg': 38.16, 'burn_gal': 54.7, 'fuel_arm': 51.7, 'density': 6.0, 'mlw': 4762.0, 'env': [38.1, 45.8]}, [4444.8, 37.16, 'CG']], ['sampled case 2', {'tow': 5036.0, 'tocg': 43.65, 'burn_gal': 50.5, 'fuel_arm': 57.4, 'density': 6.7, 'mlw': 4986.0, 'env': [39.0, 46.7]}, [4697.6, 42.66, 'OK']], ['sampled case 3', {'tow': 4947.0, 'tocg': 43.42, 'burn_gal': 41.6, 'fuel_arm': 57.9, 'density': 6.7, 'mlw': 4824.0, 'env': [39.6, 44.2]}, [4668.3, 42.56, 'OK']], ['regression: maximum landing weight comparison', {'tow': 3472.0, 'tocg': 38.61, 'burn_gal': 58.6, 'fuel_arm': 32.6, 'density': 6.7, 'mlw': 3079.0, 'env': [37.1, 45.7]}, [3079.4, 39.38, '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
normal trip[2344.0, 41.6, 'OK'][2344.0, 41.6, 'OK']Passed
landing overweight[2518.8, 40.91, 'MLW'][2518.8, 40.91, 'MLW']Passed
exactly max landing[2450.0, 40.83, 'OK'][2450.0, 40.83, 'OK']Passed
burn moves CG forward out[2060.0, 34.21, 'CG'][2060.0, 34.21, 'CG']Passed
forward tank burn moves CG aft[4597.0, 150.54, 'CG'][4597.0, 150.54, 'CG']Passed
jet fuel density[4591.3, 141.29, 'OK'][4591.3, 141.29, 'OK']Passed
sampled case 1[2887.1, 43.15, 'OK'][2887.1, 43.15, 'OK']Passed
sampled case 2[2066.4, 45.92, 'CG'][2066.4, 45.92, 'CG']Passed
sampled case 3[2254.6, 43.05, 'OK'][2254.6, 43.05, 'OK']Passed
regression: maximum landing weight comparison[2204.2, 42.93, 'MLW'][2204.2, 42.93, 'MLW']Passed

SHA-256 / b8ee481b97220f7a49400300daecfbb70feb85f56e17033de15e34a2ad8ec858

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

Case digest / 6ea57690c356a626d60359d980cea11b13d9b5df38f6c457f194d4e9a3ecf670