FAILURE MAP
← Case archive

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

Temperature putaway: tie goes to fullest zone · case 01

Among equally narrow zones the one with fewest free positions is chosen.

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

ROOT CAUSE

The free-position tie-break sorts ascending.

THE FAILURE

The free-position tie-break sorts ascending.

Unsuccessful approach: Dropping the free-position tie-break falls back to zone id only.

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 = [[['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['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'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['generated mix 8', [[['Z0', -25, -18, 5]], [0, 4]], 'REJECT']], [['generated mix 27', [[['Z0', 2, 8, 1], ['Z1', 0, 8, 0], ['Z2', 0, 4, 1], ['Z3', 15, 25, 5], ['Z4', 15, 25, 1]], [15, 25]], 'Z3'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 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 63', [[['Z0', 0, 8, 0], ['Z1', 10, 30, 5], ['Z2', 0, 8, 1], ['Z3', 2, 8, 0], ['Z4', 10, 30, 12]], [10, 30]], 'Z4'], ['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 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['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'], ['generated mix 32', [[['Z0', 0, 4, 5]], [-5, 10]], 'Z0'], ['generated mix 40', [[['Z0', -25, -18, 0], ['Z1', 10, 30, 12], ['Z2', -25, -18, 12]], [0, 8]], 'REJECT'], ['generated mix 48', [[['Z0', -25, -18, 0], ['Z1', 15, 25, 0]], [0, 4]], 'REJECT'], ['generated mix 56', [[['Z0', -25, -18, 5]], [10, 30]], 'REJECT']], [['generated mix 43', [[['Z0', -25, -18, 0], ['Z1', -30, -15, 5], ['Z2', 0, 8, 12], ['Z3', 0, 8, 1]], [-5, 10]], 'Z2'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['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'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['generated mix 45', [[['Z0', 15, 25, 5], ['Z1', -30, -15, 5], ['Z2', 10, 30, 5], ['Z3', 0, 4, 5], ['Z4', 0, 8, 0]], [0, 8]], 'Z3'], ['generated mix 53', [[['Z0', 15, 25, 1], ['Z1', -30, -15, 12], ['Z2', 10, 30, 12], ['Z3', -30, -15, 1], ['Z4', 0, 4, 0]], [15, 25]], 'Z0']]]
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
tie most freeABFailed
generated mix 11Z0Z2Failed
exact matchCCPassed
narrowestBBPassed
frozenFFPassed
zone too wideREJECTREJECTPassed
full zoneBBPassed
generated mix 8REJECTREJECTPassed

SHA-256 / e4e55a1e3e7c7bdbfcff5bb657d3c4f40d40ffb0ff6a28a0affdac1dbd6220fd

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 = (zmax - zmin, 0, 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 = [[['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['generated mix 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['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'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['generated mix 8', [[['Z0', -25, -18, 5]], [0, 4]], 'REJECT']], [['generated mix 27', [[['Z0', 2, 8, 1], ['Z1', 0, 8, 0], ['Z2', 0, 4, 1], ['Z3', 15, 25, 5], ['Z4', 15, 25, 1]], [15, 25]], 'Z3'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['exact match', [[['C', 2, 8, 3]], [2, 8]], 'C'], ['narrowest', [[['A', 0, 8, 5], ['B', 2, 6, 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 63', [[['Z0', 0, 8, 0], ['Z1', 10, 30, 5], ['Z2', 0, 8, 1], ['Z3', 2, 8, 0], ['Z4', 10, 30, 12]], [10, 30]], 'Z4'], ['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 11', [[['Z0', 15, 25, 1], ['Z1', -25, -18, 5], ['Z2', 15, 25, 5]], [10, 30]], 'Z2'], ['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'], ['generated mix 32', [[['Z0', 0, 4, 5]], [-5, 10]], 'Z0'], ['generated mix 40', [[['Z0', -25, -18, 0], ['Z1', 10, 30, 12], ['Z2', -25, -18, 12]], [0, 8]], 'REJECT'], ['generated mix 48', [[['Z0', -25, -18, 0], ['Z1', 15, 25, 0]], [0, 4]], 'REJECT'], ['generated mix 56', [[['Z0', -25, -18, 5]], [10, 30]], 'REJECT']], [['generated mix 43', [[['Z0', -25, -18, 0], ['Z1', -30, -15, 5], ['Z2', 0, 8, 12], ['Z3', 0, 8, 1]], [-5, 10]], 'Z2'], ['tie most free', [[['A', 2, 8, 1], ['B', 2, 8, 4]], [0, 10]], 'B'], ['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'], ['full zone', [[['A', 2, 8, 0], ['B', 0, 8, 1]], [0, 8]], 'B'], ['generated mix 45', [[['Z0', 15, 25, 5], ['Z1', -30, -15, 5], ['Z2', 10, 30, 5], ['Z3', 0, 4, 5], ['Z4', 0, 8, 0]], [0, 8]], 'Z3'], ['generated mix 53', [[['Z0', 15, 25, 1], ['Z1', -30, -15, 12], ['Z2', 10, 30, 12], ['Z3', -30, -15, 1], ['Z4', 0, 4, 0]], [15, 25]], 'Z0']]]
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
tie most freeABFailed
generated mix 11Z0Z2Failed
exact matchCCPassed
narrowestBBPassed
frozenFFPassed
zone too wideREJECTREJECTPassed
full zoneBBPassed
generated mix 8REJECTREJECTPassed

SHA-256 / 3cc1a8e6189981cc6d00160f7f51a5096526ec7ef4e01395c72c70d9e173e1e2

HELD IN THE MEMBER ARCHIVE

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

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

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

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

Sign in to the archive ↗

Verification & scope

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

Case digest / 44308f417f7700badb4c64fe427df7a31ed17d8c34546ef5575e74da35539fe5