FAILURE MAP
← Case archive

FA-95216 / Warehouse slotting and bin packing / Open access

Temperature putaway: widest zone preferred · case 01

Products consume positions in wide-tolerance zones needed by less tolerant products.

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

ROOT CAUSE

Zone preference sorts range width descending.

VERIFIED REPAIR

Prefer the narrowest eligible range first.

Unsuccessful approach: Preferring most free positions first ignores range fit.

Case contract

zones [[zone, min_c, max_c, free_positions]], product [min_c, max_c]. A zone is eligible when its whole range lies inside the product range (inclusive) and it has free positions. Prefer the narrowest zone range, then most free positions, then zone id. None -> "REJECT".

Why this case matters

Cold chain putaway must keep product within its storage temperature range.

1 / The failure

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

N = 1
observations = []
def solve(zones, product):
    pmin, pmax = product
    best = None
    for zid, zmin, zmax, free in zones:
        if zmin < pmin or zmax > pmax:
            continue
        if free <= 0:
            continue
        key = (-(zmax - zmin), -free, zid)
        if best is None or key < best:
            best = key
    return best[2] if best else 'REJECT'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 8', [[['Z0', -25, -18, 5]], [0, 4]], 'REJECT']], [['generated mix 73', [[['Z0', 10, 30, 0], ['Z1', -30, -15, 5], ['Z2', 0, 8, 1], ['Z3', 15, 25, 1], ['Z4', 0, 4, 1]], [0, 8]], 'Z4'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['generated mix 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['generated mix 19', [[['Z0', -25, -18, 12]], [0, 8]], 'REJECT']], [['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 20', [[['Z0', 15, 25, 5], ['Z1', 10, 30, 1], ['Z2', 0, 4, 12], ['Z3', 15, 25, 0], ['Z4', 0, 4, 12]], [-30, -18]], 'REJECT'], ['generated mix 28', [[['Z0', 2, 8, 0]], [15, 25]], 'REJECT'], ['generated mix 36', [[['Z0', -30, -15, 0], ['Z1', 0, 4, 1], ['Z2', -25, -18, 12], ['Z3', 15, 25, 0]], [-5, 10]], 'Z1'], ['generated mix 44', [[['Z0', 0, 8, 12], ['Z1', 0, 4, 12]], [-25, -15]], 'REJECT']], [['generated mix 33', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 1], ['Z2', 2, 8, 0]], [0, 8]], 'Z0'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['generated mix 34', [[['Z0', 0, 8, 0], ['Z1', 0, 4, 5], ['Z2', 2, 8, 5], ['Z3', 0, 4, 1], ['Z4', 0, 8, 1]], [-30, -18]], 'REJECT'], ['generated mix 42', [[['Z0', 2, 8, 1], ['Z1', -30, -15, 12]], [-5, 10]], 'Z0']], [['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 44', [[['Z0', 0, 8, 12], ['Z1', 0, 4, 12]], [-25, -15]], 'REJECT'], ['generated mix 52', [[['Z0', 10, 30, 0], ['Z1', 0, 4, 0]], [-25, -15]], 'REJECT']]]
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
narrowestABFailed
generated mix 69Z1Z0Failed
exact matchCCPassed
full zoneBBPassed
frozenFFPassed
zone too wideREJECTREJECTPassed
tie most freeBBPassed
generated mix 8REJECTREJECTPassed

SHA-256 / 52f92902a1e3991938cc7dfd6c7e7183164fa4ea0f5664fb563db7fc4d7e616d

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(zones, product):
    pmin, pmax = product
    best = None
    for zid, zmin, zmax, free in zones:
        if zmin < pmin or zmax > pmax:
            continue
        if free <= 0:
            continue
        key = (-free, zmax - zmin, zid)
        if best is None or key < best:
            best = key
    return best[2] if best else 'REJECT'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 8', [[['Z0', -25, -18, 5]], [0, 4]], 'REJECT']], [['generated mix 73', [[['Z0', 10, 30, 0], ['Z1', -30, -15, 5], ['Z2', 0, 8, 1], ['Z3', 15, 25, 1], ['Z4', 0, 4, 1]], [0, 8]], 'Z4'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['generated mix 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['generated mix 19', [[['Z0', -25, -18, 12]], [0, 8]], 'REJECT']], [['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 20', [[['Z0', 15, 25, 5], ['Z1', 10, 30, 1], ['Z2', 0, 4, 12], ['Z3', 15, 25, 0], ['Z4', 0, 4, 12]], [-30, -18]], 'REJECT'], ['generated mix 28', [[['Z0', 2, 8, 0]], [15, 25]], 'REJECT'], ['generated mix 36', [[['Z0', -30, -15, 0], ['Z1', 0, 4, 1], ['Z2', -25, -18, 12], ['Z3', 15, 25, 0]], [-5, 10]], 'Z1'], ['generated mix 44', [[['Z0', 0, 8, 12], ['Z1', 0, 4, 12]], [-25, -15]], 'REJECT']], [['generated mix 33', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 1], ['Z2', 2, 8, 0]], [0, 8]], 'Z0'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['generated mix 34', [[['Z0', 0, 8, 0], ['Z1', 0, 4, 5], ['Z2', 2, 8, 5], ['Z3', 0, 4, 1], ['Z4', 0, 8, 1]], [-30, -18]], 'REJECT'], ['generated mix 42', [[['Z0', 2, 8, 1], ['Z1', -30, -15, 12]], [-5, 10]], 'Z0']], [['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 44', [[['Z0', 0, 8, 12], ['Z1', 0, 4, 12]], [-25, -15]], 'REJECT'], ['generated mix 52', [[['Z0', 10, 30, 0], ['Z1', 0, 4, 0]], [-25, -15]], 'REJECT']]]
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
narrowestABFailed
generated mix 69Z1Z0Failed
exact matchCCPassed
full zoneBBPassed
frozenFFPassed
zone too wideREJECTREJECTPassed
tie most freeBBPassed
generated mix 8REJECTREJECTPassed

SHA-256 / aba21973ba7ce48f05baab7dacc8f0299958aec0051a11ce59f0425b8eece687

3 / The verified repair

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

N = 1
observations = []
def solve(zones, product):
    pmin, pmax = product
    best = None
    for zid, zmin, zmax, free in zones:
        if zmin < pmin or zmax > pmax:
            continue
        if free <= 0:
            continue
        key = (zmax - zmin, -free, zid)
        if best is None or key < best:
            best = key
    return best[2] if best else 'REJECT'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 8', [[['Z0', -25, -18, 5]], [0, 4]], 'REJECT']], [['generated mix 73', [[['Z0', 10, 30, 0], ['Z1', -30, -15, 5], ['Z2', 0, 8, 1], ['Z3', 15, 25, 1], ['Z4', 0, 4, 1]], [0, 8]], 'Z4'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['generated mix 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['generated mix 19', [[['Z0', -25, -18, 12]], [0, 8]], 'REJECT']], [['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 20', [[['Z0', 15, 25, 5], ['Z1', 10, 30, 1], ['Z2', 0, 4, 12], ['Z3', 15, 25, 0], ['Z4', 0, 4, 12]], [-30, -18]], 'REJECT'], ['generated mix 28', [[['Z0', 2, 8, 0]], [15, 25]], 'REJECT'], ['generated mix 36', [[['Z0', -30, -15, 0], ['Z1', 0, 4, 1], ['Z2', -25, -18, 12], ['Z3', 15, 25, 0]], [-5, 10]], 'Z1'], ['generated mix 44', [[['Z0', 0, 8, 12], ['Z1', 0, 4, 12]], [-25, -15]], 'REJECT']], [['generated mix 33', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 1], ['Z2', 2, 8, 0]], [0, 8]], 'Z0'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['generated mix 34', [[['Z0', 0, 8, 0], ['Z1', 0, 4, 5], ['Z2', 2, 8, 5], ['Z3', 0, 4, 1], ['Z4', 0, 8, 1]], [-30, -18]], 'REJECT'], ['generated mix 42', [[['Z0', 2, 8, 1], ['Z1', -30, -15, 12]], [-5, 10]], 'Z0']], [['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 1]], [0, 8]], 'B'], ['generated mix 69', [[['Z0', 0, 4, 1], ['Z1', 2, 8, 5], ['Z2', 10, 30, 12], ['Z3', 10, 30, 0]], [-5, 10]], 'Z0'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['frozen', [[['F', -25, -18, 2], ['C', 0, 4, 9]], [-30, -15]], 'F'], ['zone too wide', [[['C', 0, 8, 3]], [2, 8]], 'REJECT'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 44', [[['Z0', 0, 8, 12], ['Z1', 0, 4, 12]], [-25, -15]], 'REJECT'], ['generated mix 52', [[['Z0', 10, 30, 0], ['Z1', 0, 4, 0]], [-25, -15]], 'REJECT']]]
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
narrowestBBPassed
generated mix 69Z0Z0Passed
exact matchCCPassed
full zoneBBPassed
frozenFFPassed
zone too wideREJECTREJECTPassed
tie most freeBBPassed
generated mix 8REJECTREJECTPassed

SHA-256 / 16b2338e883016f0d2c8beea752f6cd0184d9b0bedd1c38e880d001bcc155519

Verification & scope

Stipulated integer temperature ranges; no excursion or dwell time logic. 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:52:11.710401+00:00.

Case digest / 2b84c174978730c4b1eb7b60e5de644a353868925a9b74a82d545464a1ae04ae