FAILURE MAP
← Case archive

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

UOM breakdown: zero-count unit rows · case 01

Pick tasks contain rows for zero pallets or zero cases.

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

ROOT CAUSE

Every allowed unit gets a row even when its count is zero.

THE FAILURE

Every allowed unit gets a row even when its count is zero.

Unsuccessful approach: Suppressing zero rows except for eaches still emits an empty EA row.

Case contract

qty eaches; pack [eaches per inner, per case, per pallet] with 0 meaning the level does not exist; allowed unit codes for the pick location. Greedy from largest allowed defined unit: PAL, CS, IP, EA. Return [[unit, count]] for nonzero counts in that order, then ["UNPICKABLE", eaches] if a remainder cannot be expressed.

Why this case matters

Pick tasks are expressed in the largest unit a location can present.

1 / The failure

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

N = 1
observations = []
def solve(qty, pack, allowed):
    levels = [('PAL', pack[2]), ('CS', pack[1]), ('IP', pack[0]), ('EA', 1)]
    rem = qty
    out = []
    for unit, size in levels:
        if unit not in allowed or size <= 0:
            continue
        n = rem // size
        if True:
            out.append([unit, n])
            rem -= n * size
    if rem:
        out.append(['UNPICKABLE', rem])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['full breakdown', [251, [6, 24, 240], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 1], ['IP', 1], ['EA', 5]]], ['generated mix 4', [500, [4, 12, 120], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 4], ['CS', 1], ['IP', 2]]], ['case and each', [50, [6, 24, 0], ['CS', 'EA']], [['CS', 2], ['EA', 2]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['generated mix 7', [3, [4, 48, 480], ['PAL', 'CS', 'IP']], [['UNPICKABLE', 3]]], ['generated mix 15', [250, [4, 24, 480], ['PAL', 'IP', 'EA']], [['IP', 62], ['EA', 2]]]], [['generated mix 6', [25, [4, 24, 480], ['PAL', 'CS', 'IP', 'EA']], [['CS', 1], ['EA', 1]]], ['generated mix 42', [120, [0, 12, 120], ['PAL', 'IP', 'EA']], [['PAL', 1]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['full breakdown', [251, [6, 24, 240], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 1], ['IP', 1], ['EA', 5]]], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['generated mix 10', [13, [6, 12, 0], ['PAL', 'CS', 'IP', 'EA']], [['CS', 1], ['EA', 1]]], ['generated mix 18', [50, [0, 24, 240], ['CS']], [['CS', 2], ['UNPICKABLE', 2]]]], [['generated mix 16', [3, [6, 48, 0], ['PAL', 'CS', 'IP', 'EA']], [['EA', 3]]], ['generated mix 69', [24, [4, 48, 960], ['PAL', 'CS', 'IP', 'EA']], [['IP', 6]]], ['pallet not allowed', [500, [6, 24, 240], ['CS', 'EA']], [['CS', 20], ['EA', 20]]], ['case and each', [50, [6, 24, 0], ['CS', 'EA']], [['CS', 2], ['EA', 2]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['generated mix 21', [250, [6, 12, 120], ['PAL', 'IP', 'EA']], [['PAL', 2], ['IP', 1], ['EA', 4]]], ['generated mix 29', [500, [4, 12, 0], ['CS', 'IP', 'EA']], [['CS', 41], ['IP', 2]]]], [['generated mix 26', [13, [0, 48, 0], ['PAL', 'CS', 'EA']], [['EA', 13]]], ['generated mix 22', [0, [6, 24, 480], ['CS', 'EA']], []], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['zero qty', [0, [6, 24, 240], ['EA']], []], ['pallet not allowed', [500, [6, 24, 240], ['CS', 'EA']], [['CS', 20], ['EA', 20]]], ['case and each', [50, [6, 24, 0], ['CS', 'EA']], [['CS', 2], ['EA', 2]]], ['generated mix 33', [1000, [4, 12, 0], ['CS', 'IP', 'EA']], [['CS', 83], ['IP', 1]]], ['generated mix 41', [24, [4, 48, 480], ['CS', 'IP']], [['IP', 6]]]], [['generated mix 36', [25, [4, 48, 0], ['PAL', 'CS', 'IP', 'EA']], [['IP', 6], ['EA', 1]]], ['generated mix 43', [120, [6, 24, 240], ['PAL', 'CS', 'EA']], [['CS', 5]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['full breakdown', [251, [6, 24, 240], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 1], ['IP', 1], ['EA', 5]]], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['zero qty', [0, [6, 24, 240], ['EA']], []], ['generated mix 44', [1000, [0, 12, 240], ['CS', 'IP']], [['CS', 83], ['UNPICKABLE', 4]]], ['generated mix 52', [50, [4, 48, 0], ['EA']], [['EA', 50]]]]]
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
full breakdown[['PAL', 1], ['CS', 0], ['IP', 1], ['EA', 5]][['PAL', 1], ['IP', 1], ['EA', 5]]Failed
generated mix 4[['PAL', 4], ['CS', 1], ['IP', 2], ['EA', 0]][['PAL', 4], ['CS', 1], ['IP', 2]]Failed
case and each[['CS', 2], ['EA', 2]][['CS', 2], ['EA', 2]]Passed
undefined inner[['EA', 13]][['EA', 13]]Passed
inner only[['IP', 3], ['UNPICKABLE', 1]][['IP', 3], ['UNPICKABLE', 1]]Passed
no each picking[['CS', 2], ['IP', 0], ['UNPICKABLE', 2]][['CS', 2], ['UNPICKABLE', 2]]Failed
generated mix 7[['PAL', 0], ['CS', 0], ['IP', 0], ['UNPICKABLE', 3]][['UNPICKABLE', 3]]Failed
generated mix 15[['PAL', 0], ['IP', 62], ['EA', 2]][['IP', 62], ['EA', 2]]Failed

SHA-256 / c109edfd945cdf6f3f09603d4fd6e0d6f292e7d9cefaaca74ee5546849386d4b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(qty, pack, allowed):
    levels = [('PAL', pack[2]), ('CS', pack[1]), ('IP', pack[0]), ('EA', 1)]
    rem = qty
    out = []
    for unit, size in levels:
        if unit not in allowed or size <= 0:
            continue
        n = rem // size
        if n or unit == 'EA':
            out.append([unit, n])
            rem -= n * size
    if rem:
        out.append(['UNPICKABLE', rem])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['full breakdown', [251, [6, 24, 240], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 1], ['IP', 1], ['EA', 5]]], ['generated mix 4', [500, [4, 12, 120], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 4], ['CS', 1], ['IP', 2]]], ['case and each', [50, [6, 24, 0], ['CS', 'EA']], [['CS', 2], ['EA', 2]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['generated mix 7', [3, [4, 48, 480], ['PAL', 'CS', 'IP']], [['UNPICKABLE', 3]]], ['generated mix 15', [250, [4, 24, 480], ['PAL', 'IP', 'EA']], [['IP', 62], ['EA', 2]]]], [['generated mix 6', [25, [4, 24, 480], ['PAL', 'CS', 'IP', 'EA']], [['CS', 1], ['EA', 1]]], ['generated mix 42', [120, [0, 12, 120], ['PAL', 'IP', 'EA']], [['PAL', 1]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['full breakdown', [251, [6, 24, 240], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 1], ['IP', 1], ['EA', 5]]], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['generated mix 10', [13, [6, 12, 0], ['PAL', 'CS', 'IP', 'EA']], [['CS', 1], ['EA', 1]]], ['generated mix 18', [50, [0, 24, 240], ['CS']], [['CS', 2], ['UNPICKABLE', 2]]]], [['generated mix 16', [3, [6, 48, 0], ['PAL', 'CS', 'IP', 'EA']], [['EA', 3]]], ['generated mix 69', [24, [4, 48, 960], ['PAL', 'CS', 'IP', 'EA']], [['IP', 6]]], ['pallet not allowed', [500, [6, 24, 240], ['CS', 'EA']], [['CS', 20], ['EA', 20]]], ['case and each', [50, [6, 24, 0], ['CS', 'EA']], [['CS', 2], ['EA', 2]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['generated mix 21', [250, [6, 12, 120], ['PAL', 'IP', 'EA']], [['PAL', 2], ['IP', 1], ['EA', 4]]], ['generated mix 29', [500, [4, 12, 0], ['CS', 'IP', 'EA']], [['CS', 41], ['IP', 2]]]], [['generated mix 26', [13, [0, 48, 0], ['PAL', 'CS', 'EA']], [['EA', 13]]], ['generated mix 22', [0, [6, 24, 480], ['CS', 'EA']], []], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['zero qty', [0, [6, 24, 240], ['EA']], []], ['pallet not allowed', [500, [6, 24, 240], ['CS', 'EA']], [['CS', 20], ['EA', 20]]], ['case and each', [50, [6, 24, 0], ['CS', 'EA']], [['CS', 2], ['EA', 2]]], ['generated mix 33', [1000, [4, 12, 0], ['CS', 'IP', 'EA']], [['CS', 83], ['IP', 1]]], ['generated mix 41', [24, [4, 48, 480], ['CS', 'IP']], [['IP', 6]]]], [['generated mix 36', [25, [4, 48, 0], ['PAL', 'CS', 'IP', 'EA']], [['IP', 6], ['EA', 1]]], ['generated mix 43', [120, [6, 24, 240], ['PAL', 'CS', 'EA']], [['CS', 5]]], ['inner only', [13, [4, 12, 0], ['IP']], [['IP', 3], ['UNPICKABLE', 1]]], ['full breakdown', [251, [6, 24, 240], ['PAL', 'CS', 'IP', 'EA']], [['PAL', 1], ['IP', 1], ['EA', 5]]], ['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['zero qty', [0, [6, 24, 240], ['EA']], []], ['generated mix 44', [1000, [0, 12, 240], ['CS', 'IP']], [['CS', 83], ['UNPICKABLE', 4]]], ['generated mix 52', [50, [4, 48, 0], ['EA']], [['EA', 50]]]]]
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
full breakdown[['PAL', 1], ['IP', 1], ['EA', 5]][['PAL', 1], ['IP', 1], ['EA', 5]]Passed
generated mix 4[['PAL', 4], ['CS', 1], ['IP', 2], ['EA', 0]][['PAL', 4], ['CS', 1], ['IP', 2]]Failed
case and each[['CS', 2], ['EA', 2]][['CS', 2], ['EA', 2]]Passed
undefined inner[['EA', 13]][['EA', 13]]Passed
inner only[['IP', 3], ['UNPICKABLE', 1]][['IP', 3], ['UNPICKABLE', 1]]Passed
no each picking[['CS', 2], ['UNPICKABLE', 2]][['CS', 2], ['UNPICKABLE', 2]]Passed
generated mix 7[['UNPICKABLE', 3]][['UNPICKABLE', 3]]Passed
generated mix 15[['IP', 62], ['EA', 2]][['IP', 62], ['EA', 2]]Passed

SHA-256 / 08fc3097129df4dfdc1fca850ac73d20fed1164bf92d30916d8d72fa70b18c02

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

Greedy stipulated conversion with integer pack sizes. 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:12.196684+00:00.

Case digest / 1bc987225f8926913e582a75cd040965d9d2ea393cd3388d1b9c2a5452b576ef