FAILURE MAP
← Case archive

FA-66141 / Aviation weight and balance / Open access

Trim interpolation measured from the upper node · case 01

Values between nodes are mirrored: a CG just aft of a node gets nearly the next node trim.

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

ROOT CAUSE

The interpolation fraction uses distance to the upper node while anchoring on the lower node value.

VERIFIED REPAIR

Use (p - p0)/(p1 - p0) as the fraction from the lower node.

Unsuccessful approach: Dividing by the upper node %MAC instead of the node spacing compresses the fraction.

Case contract

Input {'pmac','flaps','tables':{flap string:[[%MAC, trim units] ascending]}}. Missing flap table -> 'ERR_FLAPS'; %MAC outside the table's inclusive range -> 'ERR_RANGE' (no extrapolation or clamping); otherwise linear interpolation between bracketing nodes, rounded to 0.1 unit.

Why this case matters

Takeoff stabilizer trim is read from a flap-specific table indexed by %MAC; out-of-table values must not be silently clamped.

1 / The failure

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

N = 1
observations = []
def solve(x):
    tables = x['tables']
    key = str(x['flaps'])
    if key not in tables: return 'ERR_FLAPS'
    t = tables[key]
    p = x['pmac']
    if p < t[0][0] or p > t[-1][0]: return 'ERR_RANGE'
    for (p0, u0), (p1, u1) in zip(t, t[1:]):
        if p0 <= p <= p1:
            u = u0 + (u1 - u0) * (p1 - p) / (p1 - p0)
            return round(u, 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['mid table flaps 5', {'pmac': 19.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.4], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.5, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 11, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 17.23, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.7], ['sampled case 2', {'pmac': 11.67, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.1], ['sampled case 3', {'pmac': 23.34, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8]], [['mid table flaps 5', {'pmac': 20.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.3], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.6, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 12, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 32.69, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 17.85, 'flaps': 20, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 3', {'pmac': 7.44, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE']], [['mid table flaps 5', {'pmac': 21.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.1], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.699999999999996, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 13, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 13.07, 'flaps': 10, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 13.47, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.9], ['sampled case 3', {'pmac': 38.52, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 22.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.8, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 14, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 27.81, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.9], ['sampled case 2', {'pmac': 14.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.2], ['sampled case 3', {'pmac': 6.07, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 23.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.9, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 15.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.0], ['sampled case 2', {'pmac': 26.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.0], ['sampled case 3', {'pmac': 25.32, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.2]]]
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
mid table flaps 55.75.4Failed
exact node6.15.0Failed
forward end of table5.36.6Failed
aft end of table4.12.9Failed
aft of tableERR_RANGEERR_RANGEPassed
forward of tableERR_RANGEERR_RANGEPassed
flap setting without tableERR_FLAPSERR_FLAPSPassed
flaps 15 between nodes3.33.7Failed
sampled case 15.45.7Failed
sampled case 25.86.1Failed
sampled case 33.84.8Failed

SHA-256 / 2c251a88fada48afc40fa47ab2b5b01f84893aa0f57f81849e68fc7604c7cdd0

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    tables = x['tables']
    key = str(x['flaps'])
    if key not in tables: return 'ERR_FLAPS'
    t = tables[key]
    p = x['pmac']
    if p < t[0][0] or p > t[-1][0]: return 'ERR_RANGE'
    for (p0, u0), (p1, u1) in zip(t, t[1:]):
        if p0 <= p <= p1:
            u = u0 + (u1 - u0) * (p - p0) / p1
            return round(u, 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['mid table flaps 5', {'pmac': 19.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.4], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.5, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 11, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 17.23, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.7], ['sampled case 2', {'pmac': 11.67, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.1], ['sampled case 3', {'pmac': 23.34, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8]], [['mid table flaps 5', {'pmac': 20.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.3], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.6, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 12, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 32.69, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 17.85, 'flaps': 20, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 3', {'pmac': 7.44, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE']], [['mid table flaps 5', {'pmac': 21.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.1], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.699999999999996, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 13, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 13.07, 'flaps': 10, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 13.47, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.9], ['sampled case 3', {'pmac': 38.52, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 22.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.8, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 14, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 27.81, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.9], ['sampled case 2', {'pmac': 14.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.2], ['sampled case 3', {'pmac': 6.07, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 23.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.9, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 15.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.0], ['sampled case 2', {'pmac': 26.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.0], ['sampled case 3', {'pmac': 25.32, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.2]]]
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
mid table flaps 55.95.4Failed
exact node5.85.0Failed
forward end of table6.66.6Passed
aft end of table3.82.9Failed
aft of tableERR_RANGEERR_RANGEPassed
forward of tableERR_RANGEERR_RANGEPassed
flap setting without tableERR_FLAPSERR_FLAPSPassed
flaps 15 between nodes4.03.7Failed
sampled case 16.05.7Failed
sampled case 26.36.1Failed
sampled case 34.94.8Failed

SHA-256 / 272d15d5e8d31947ea1271ab0920c64ab8c0169396906b85edd6fd622fec898a

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    tables = x['tables']
    key = str(x['flaps'])
    if key not in tables: return 'ERR_FLAPS'
    t = tables[key]
    p = x['pmac']
    if p < t[0][0] or p > t[-1][0]: return 'ERR_RANGE'
    for (p0, u0), (p1, u1) in zip(t, t[1:]):
        if p0 <= p <= p1:
            u = u0 + (u1 - u0) * (p - p0) / (p1 - p0)
            return round(u, 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['mid table flaps 5', {'pmac': 19.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.4], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.5, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 11, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 17.23, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.7], ['sampled case 2', {'pmac': 11.67, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.1], ['sampled case 3', {'pmac': 23.34, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8]], [['mid table flaps 5', {'pmac': 20.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.3], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.6, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 12, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 32.69, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 17.85, 'flaps': 20, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 3', {'pmac': 7.44, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE']], [['mid table flaps 5', {'pmac': 21.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.1], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.699999999999996, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 13, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 13.07, 'flaps': 10, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['sampled case 2', {'pmac': 13.47, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.9], ['sampled case 3', {'pmac': 38.52, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 22.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.8, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 14, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS'], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 27.81, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.9], ['sampled case 2', {'pmac': 14.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.2], ['sampled case 3', {'pmac': 6.07, 'flaps': 1, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_FLAPS']], [['mid table flaps 5', {'pmac': 23.25, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.8], ['exact node', {'pmac': 22.0, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['forward end of table', {'pmac': 8.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.6], ['aft end of table', {'pmac': 36.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 2.9], ['aft of table', {'pmac': 36.9, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['forward of table', {'pmac': 7.35, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 'ERR_RANGE'], ['flap setting without table', {'pmac': 20.0, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 5.0], ['flaps 15 between nodes', {'pmac': 29.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 3.7], ['sampled case 1', {'pmac': 15.63, 'flaps': 5, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 6.0], ['sampled case 2', {'pmac': 26.63, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.0], ['sampled case 3', {'pmac': 25.32, 'flaps': 15, 'tables': {'5': [[8.0, 7.2], [15.0, 6.1], [22.0, 5.0], [30.0, 3.6], [36.0, 2.4]], '15': [[8.0, 6.6], [18.0, 5.3], [26.0, 4.1], [36.0, 2.9]]}}, 4.2]]]
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
mid table flaps 55.45.4Passed
exact node5.05.0Passed
forward end of table6.66.6Passed
aft end of table2.92.9Passed
aft of tableERR_RANGEERR_RANGEPassed
forward of tableERR_RANGEERR_RANGEPassed
flap setting without tableERR_FLAPSERR_FLAPSPassed
flaps 15 between nodes3.73.7Passed
sampled case 15.75.7Passed
sampled case 26.16.1Passed
sampled case 34.84.8Passed

SHA-256 / 2ba317ddf29b1d1404863f657f5c9160e087c6003cdc00f2773195622a8cefd0

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

Case digest / 893be879b7a343a1528b2136b1b46a955c0be61e2b578544ff5e17ebf6c3d305