FAILURE MAP
← Case archive

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

Replenishment: zero-quantity tasks emitted · case 01

Tasks with quantity 0 are sent to the floor and drivers travel for nothing.

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

ROOT CAUSE

Faces that cannot receive any full case are still turned into tasks.

THE FAILURE

Faces that cannot receive any full case are still turned into tasks.

Unsuccessful approach: Only dropping zero tasks for non-empty faces still emits empty tasks for stocked-out faces with no reserve.

Case contract

faces [[loc, on_hand, min, max, case_pack, reserve_units]], min >= 1. Replenish when on_hand <= min. Quantity is the largest number of full cases that keeps on_hand <= max, limited to full cases available in reserve. A stocked-out face whose max leaves no room for a full case still gets one case if reserve has one. Zero-quantity tasks are dropped. Tasks are ordered by on_hand/min ascending, then loc.

Why this case matters

Min/max replenishment keeps forward pick faces stocked from reserve.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(faces):
    tasks = []
    for loc, oh, mn, mx, cp, reserve in faces:
        if oh > mn:
            continue
        avail = reserve // cp * cp
        qty = (mx - oh) // cp * cp
        qty = min(qty, avail)
        if qty == 0 and oh == 0 and avail >= cp:
            qty = cp
        tasks.append((Fraction(oh, mn), loc, qty))
    tasks.sort()
    return [[loc, qty] for _, loc, qty in tasks]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['stockout no reserve', [[['B', 0, 2, 20, 6, 5]]], []], ['generated mix 6', [[['F0', 1, 12, 18, 6, 12], ['F1', 10, 10, 10, 1, 100], ['F2', 0, 6, 9, 12, 3]]], [['F0', 12]]], ['at min triggers', [[['A', 10, 10, 34, 12, 100]]], [['A', 24]]], ['reserve partial case', [[['A', 0, 5, 30, 12, 20]]], [['A', 12]]], ['priority by ratio', [[['X', 5, 10, 40, 5, 100], ['Y', 2, 8, 40, 5, 100], ['Z', 0, 6, 40, 5, 100]]], [['Z', 40], ['Y', 35], ['X', 35]]], ['above min idle', [[['A', 11, 10, 34, 12, 100]]], []], ['stockout small max', [[['B', 0, 2, 5, 6, 12]]], [['B', 6]]], ['generated mix 9', [[['F0', 6, 6, 9, 1, 100], ['F1', 1, 12, 18, 6, 0]]], [['F0', 3]]]], [['generated mix 12', [[['F0', 0, 6, 18, 6, 0], ['F1', 0, 12, 36, 4, 48]]], [['F1', 36]]], ['generated mix 26', [[['F0', 7, 6, 6, 12, 48], ['F1', 0, 4, 28, 6, 12], ['F2', 0, 6, 30, 6, 0], ['F3', 1, 6, 6, 1, 3]]], [['F1', 12], ['F3', 3]]], ['stockout small max', [[['B', 0, 2, 5, 6, 12]]], [['B', 6]]], ['priority by ratio', [[['X', 5, 10, 40, 5, 100], ['Y', 2, 8, 40, 5, 100], ['Z', 0, 6, 40, 5, 100]]], [['Z', 40], ['Y', 35], ['X', 35]]], ['above min idle', [[['A', 11, 10, 34, 12, 100]]], []], ['generated mix 9', [[['F0', 6, 6, 9, 1, 100], ['F1', 1, 12, 18, 6, 0]]], [['F0', 3]]], ['generated mix 18', [[['F0', 5, 6, 9, 6, 24], ['F1', 1, 12, 15, 4, 3], ['F2', 3, 12, 15, 12, 0], ['F3', 7, 6, 30, 6, 24]]], []], ['generated mix 27', [[['F0', 1, 12, 24, 6, 24]]], [['F0', 18]]]], [['generated mix 26', [[['F0', 7, 6, 6, 12, 48], ['F1', 0, 4, 28, 6, 12], ['F2', 0, 6, 30, 6, 0], ['F3', 1, 6, 6, 1, 3]]], [['F1', 12], ['F3', 3]]], ['generated mix 45', [[['F0', 1, 4, 7, 6, 100], ['F1', 13, 12, 12, 6, 3], ['F2', 5, 6, 9, 4, 3], ['F3', 0, 6, 36, 6, 0]]], [['F0', 6]]], ['at min triggers', [[['A', 10, 10, 34, 12, 100]]], [['A', 24]]], ['reserve partial case', [[['A', 0, 5, 30, 12, 20]]], [['A', 12]]], ['stockout no reserve', [[['B', 0, 2, 20, 6, 5]]], []], ['generated mix 20', [[['F0', 0, 12, 36, 4, 48]]], [['F0', 36]]], ['generated mix 29', [[['F0', 1, 12, 36, 1, 100], ['F1', 0, 4, 16, 1, 100], ['F2', 3, 12, 18, 4, 24], ['F3', 7, 6, 6, 1, 48]]], [['F1', 16], ['F0', 35], ['F2', 12]]], ['generated mix 37', [[['F0', 0, 4, 7, 12, 48]]], [['F0', 12]]]], [['generated mix 36', [[['F0', 0, 6, 6, 4, 3], ['F1', 5, 6, 12, 12, 48]]], []], ['generated mix 62', [[['F0', 0, 10, 34, 12, 3], ['F1', 5, 4, 28, 4, 100]]], []], ['stockout small max', [[['B', 0, 2, 5, 6, 12]]], [['B', 6]]], ['priority by ratio', [[['X', 5, 10, 40, 5, 100], ['Y', 2, 8, 40, 5, 100], ['Z', 0, 6, 40, 5, 100]]], [['Z', 40], ['Y', 35], ['X', 35]]], ['above min idle', [[['A', 11, 10, 34, 12, 100]]], []], ['generated mix 31', [[['F0', 9, 10, 10, 4, 100], ['F1', 5, 6, 36, 1, 24]]], [['F1', 24]]], ['generated mix 40', [[['F0', 7, 6, 18, 6, 48], ['F1', 13, 12, 24, 1, 0], ['F2', 7, 6, 12, 12, 24]]], []], ['generated mix 48', [[['F0', 0, 12, 12, 6, 0], ['F1', 0, 10, 22, 1, 24], ['F2', 0, 12, 15, 1, 12]]], [['F1', 22], ['F2', 12]]]], [['generated mix 47', [[['F0', 0, 10, 22, 12, 0], ['F1', 11, 10, 40, 12, 48]]], []], ['generated mix 76', [[['F0', 0, 10, 40, 1, 0]]], []], ['at min triggers', [[['A', 10, 10, 34, 12, 100]]], [['A', 24]]], ['reserve partial case', [[['A', 0, 5, 30, 12, 20]]], [['A', 12]]], ['stockout no reserve', [[['B', 0, 2, 20, 6, 5]]], []], ['generated mix 42', [[['F0', 3, 4, 7, 6, 100], ['F1', 11, 12, 42, 6, 48], ['F2', 0, 6, 30, 6, 0]]], [['F1', 30]]], ['generated mix 51', [[['F0', 4, 4, 28, 6, 12], ['F1', 1, 6, 30, 12, 0], ['F2', 9, 10, 34, 6, 3]]], [['F0', 12]]], ['generated mix 59', [[['F0', 0, 10, 16, 6, 100], ['F1', 1, 12, 36, 6, 24]]], [['F0', 12], ['F1', 24]]]]]
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
stockout no reserve[['B', 0]][]Failed
generated mix 6[['F2', 0], ['F0', 12], ['F1', 0]][['F0', 12]]Failed
at min triggers[['A', 24]][['A', 24]]Passed
reserve partial case[['A', 12]][['A', 12]]Passed
priority by ratio[['Z', 40], ['Y', 35], ['X', 35]][['Z', 40], ['Y', 35], ['X', 35]]Passed
above min idle[][]Passed
stockout small max[['B', 6]][['B', 6]]Passed
generated mix 9[['F1', 0], ['F0', 3]][['F0', 3]]Failed

SHA-256 / a148dba6b28e91700c4b543a7e3d63eba41d83e5bba4670849eee075bc41b617

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(faces):
    tasks = []
    for loc, oh, mn, mx, cp, reserve in faces:
        if oh > mn:
            continue
        avail = reserve // cp * cp
        qty = (mx - oh) // cp * cp
        qty = min(qty, avail)
        if qty == 0 and oh == 0 and avail >= cp:
            qty = cp
        if qty == 0 and oh > 0:
            continue
        tasks.append((Fraction(oh, mn), loc, qty))
    tasks.sort()
    return [[loc, qty] for _, loc, qty in tasks]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['stockout no reserve', [[['B', 0, 2, 20, 6, 5]]], []], ['generated mix 6', [[['F0', 1, 12, 18, 6, 12], ['F1', 10, 10, 10, 1, 100], ['F2', 0, 6, 9, 12, 3]]], [['F0', 12]]], ['at min triggers', [[['A', 10, 10, 34, 12, 100]]], [['A', 24]]], ['reserve partial case', [[['A', 0, 5, 30, 12, 20]]], [['A', 12]]], ['priority by ratio', [[['X', 5, 10, 40, 5, 100], ['Y', 2, 8, 40, 5, 100], ['Z', 0, 6, 40, 5, 100]]], [['Z', 40], ['Y', 35], ['X', 35]]], ['above min idle', [[['A', 11, 10, 34, 12, 100]]], []], ['stockout small max', [[['B', 0, 2, 5, 6, 12]]], [['B', 6]]], ['generated mix 9', [[['F0', 6, 6, 9, 1, 100], ['F1', 1, 12, 18, 6, 0]]], [['F0', 3]]]], [['generated mix 12', [[['F0', 0, 6, 18, 6, 0], ['F1', 0, 12, 36, 4, 48]]], [['F1', 36]]], ['generated mix 26', [[['F0', 7, 6, 6, 12, 48], ['F1', 0, 4, 28, 6, 12], ['F2', 0, 6, 30, 6, 0], ['F3', 1, 6, 6, 1, 3]]], [['F1', 12], ['F3', 3]]], ['stockout small max', [[['B', 0, 2, 5, 6, 12]]], [['B', 6]]], ['priority by ratio', [[['X', 5, 10, 40, 5, 100], ['Y', 2, 8, 40, 5, 100], ['Z', 0, 6, 40, 5, 100]]], [['Z', 40], ['Y', 35], ['X', 35]]], ['above min idle', [[['A', 11, 10, 34, 12, 100]]], []], ['generated mix 9', [[['F0', 6, 6, 9, 1, 100], ['F1', 1, 12, 18, 6, 0]]], [['F0', 3]]], ['generated mix 18', [[['F0', 5, 6, 9, 6, 24], ['F1', 1, 12, 15, 4, 3], ['F2', 3, 12, 15, 12, 0], ['F3', 7, 6, 30, 6, 24]]], []], ['generated mix 27', [[['F0', 1, 12, 24, 6, 24]]], [['F0', 18]]]], [['generated mix 26', [[['F0', 7, 6, 6, 12, 48], ['F1', 0, 4, 28, 6, 12], ['F2', 0, 6, 30, 6, 0], ['F3', 1, 6, 6, 1, 3]]], [['F1', 12], ['F3', 3]]], ['generated mix 45', [[['F0', 1, 4, 7, 6, 100], ['F1', 13, 12, 12, 6, 3], ['F2', 5, 6, 9, 4, 3], ['F3', 0, 6, 36, 6, 0]]], [['F0', 6]]], ['at min triggers', [[['A', 10, 10, 34, 12, 100]]], [['A', 24]]], ['reserve partial case', [[['A', 0, 5, 30, 12, 20]]], [['A', 12]]], ['stockout no reserve', [[['B', 0, 2, 20, 6, 5]]], []], ['generated mix 20', [[['F0', 0, 12, 36, 4, 48]]], [['F0', 36]]], ['generated mix 29', [[['F0', 1, 12, 36, 1, 100], ['F1', 0, 4, 16, 1, 100], ['F2', 3, 12, 18, 4, 24], ['F3', 7, 6, 6, 1, 48]]], [['F1', 16], ['F0', 35], ['F2', 12]]], ['generated mix 37', [[['F0', 0, 4, 7, 12, 48]]], [['F0', 12]]]], [['generated mix 36', [[['F0', 0, 6, 6, 4, 3], ['F1', 5, 6, 12, 12, 48]]], []], ['generated mix 62', [[['F0', 0, 10, 34, 12, 3], ['F1', 5, 4, 28, 4, 100]]], []], ['stockout small max', [[['B', 0, 2, 5, 6, 12]]], [['B', 6]]], ['priority by ratio', [[['X', 5, 10, 40, 5, 100], ['Y', 2, 8, 40, 5, 100], ['Z', 0, 6, 40, 5, 100]]], [['Z', 40], ['Y', 35], ['X', 35]]], ['above min idle', [[['A', 11, 10, 34, 12, 100]]], []], ['generated mix 31', [[['F0', 9, 10, 10, 4, 100], ['F1', 5, 6, 36, 1, 24]]], [['F1', 24]]], ['generated mix 40', [[['F0', 7, 6, 18, 6, 48], ['F1', 13, 12, 24, 1, 0], ['F2', 7, 6, 12, 12, 24]]], []], ['generated mix 48', [[['F0', 0, 12, 12, 6, 0], ['F1', 0, 10, 22, 1, 24], ['F2', 0, 12, 15, 1, 12]]], [['F1', 22], ['F2', 12]]]], [['generated mix 47', [[['F0', 0, 10, 22, 12, 0], ['F1', 11, 10, 40, 12, 48]]], []], ['generated mix 76', [[['F0', 0, 10, 40, 1, 0]]], []], ['at min triggers', [[['A', 10, 10, 34, 12, 100]]], [['A', 24]]], ['reserve partial case', [[['A', 0, 5, 30, 12, 20]]], [['A', 12]]], ['stockout no reserve', [[['B', 0, 2, 20, 6, 5]]], []], ['generated mix 42', [[['F0', 3, 4, 7, 6, 100], ['F1', 11, 12, 42, 6, 48], ['F2', 0, 6, 30, 6, 0]]], [['F1', 30]]], ['generated mix 51', [[['F0', 4, 4, 28, 6, 12], ['F1', 1, 6, 30, 12, 0], ['F2', 9, 10, 34, 6, 3]]], [['F0', 12]]], ['generated mix 59', [[['F0', 0, 10, 16, 6, 100], ['F1', 1, 12, 36, 6, 24]]], [['F0', 12], ['F1', 24]]]]]
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
stockout no reserve[['B', 0]][]Failed
generated mix 6[['F2', 0], ['F0', 12]][['F0', 12]]Failed
at min triggers[['A', 24]][['A', 24]]Passed
reserve partial case[['A', 12]][['A', 12]]Passed
priority by ratio[['Z', 40], ['Y', 35], ['X', 35]][['Z', 40], ['Y', 35], ['X', 35]]Passed
above min idle[][]Passed
stockout small max[['B', 6]][['B', 6]]Passed
generated mix 9[['F0', 3]][['F0', 3]]Passed

SHA-256 / 215a16e88b60e20290bd2da37a7990de336a1e5e0886bec63ccf15750fba9d7d

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 min/max policy with whole-case moves only. 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:08.965278+00:00.

Case digest / e146430c328a2bfe91f84e7ec4e79b7a0e5c40606bf17ecdd7c944a094720319