FAILURE MAP
← Case archive

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

UOM breakdown: remainder silently dropped · case 01

Order lines are short-picked without an exception when the remainder cannot be expressed in allowed units.

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

ROOT CAUSE

The leftover eaches after the greedy pass are discarded.

THE FAILURE

The leftover eaches after the greedy pass are discarded.

Unsuccessful approach: Reporting qty minus remainder states the picked amount, not the unpickable one.

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 n:
            out.append([unit, n])
            rem -= n * size
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['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]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['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]]], ['zero qty', [0, [6, 24, 240], ['EA']], []], ['generated mix 8', [1000, [0, 48, 0], ['CS', 'IP']], [['CS', 20], ['UNPICKABLE', 40]]]], [['generated mix 14', [50, [0, 48, 480], ['PAL', 'CS', 'IP']], [['CS', 1], ['UNPICKABLE', 2]]], ['generated mix 13', [13, [4, 24, 480], ['PAL', 'IP']], [['IP', 3], ['UNPICKABLE', 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 9', [250, [6, 48, 480], ['PAL', 'CS']], [['CS', 5], ['UNPICKABLE', 10]]], ['generated mix 19', [500, [0, 48, 480], ['PAL', 'CS', 'EA']], [['PAL', 1], ['EA', 20]]]], [['generated mix 62', [500, [6, 12, 240], ['PAL', 'CS']], [['PAL', 2], ['CS', 1], ['UNPICKABLE', 8]]], ['generated mix 44', [1000, [0, 12, 240], ['CS', 'IP']], [['CS', 83], ['UNPICKABLE', 4]]], ['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 20', [0, [6, 12, 0], ['PAL', 'CS', 'IP']], []], ['generated mix 28', [50, [4, 48, 0], ['PAL', 'CS', 'IP', 'EA']], [['CS', 1], ['EA', 2]]]], [['generated mix 7', [3, [4, 48, 480], ['PAL', 'CS', 'IP']], [['UNPICKABLE', 3]]], ['generated mix 65', [500, [4, 12, 240], ['PAL', 'CS']], [['PAL', 2], ['CS', 1], ['UNPICKABLE', 8]]], ['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 32', [25, [4, 24, 240], ['PAL', 'CS', 'EA']], [['CS', 1], ['EA', 1]]], ['generated mix 40', [3, [4, 48, 480], ['IP']], [['UNPICKABLE', 3]]]], [['generated mix 27', [25, [4, 48, 960], ['IP']], [['IP', 6], ['UNPICKABLE', 1]]], ['generated mix 7', [3, [4, 48, 480], ['PAL', 'CS', 'IP']], [['UNPICKABLE', 3]]], ['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
no each picking[['CS', 2]][['CS', 2], ['UNPICKABLE', 2]]Failed
inner only[['IP', 3]][['IP', 3], ['UNPICKABLE', 1]]Failed
full breakdown[['PAL', 1], ['IP', 1], ['EA', 5]][['PAL', 1], ['IP', 1], ['EA', 5]]Passed
undefined inner[['EA', 13]][['EA', 13]]Passed
pallet not allowed[['CS', 20], ['EA', 20]][['CS', 20], ['EA', 20]]Passed
case and each[['CS', 2], ['EA', 2]][['CS', 2], ['EA', 2]]Passed
zero qty[][]Passed
generated mix 8[['CS', 20]][['CS', 20], ['UNPICKABLE', 40]]Failed

SHA-256 / 3790e50855154a93d5c248be49908fca4b8f74cfea992d9a3bee140f00f870e2

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:
            out.append([unit, n])
            rem -= n * size
    if rem:
        out.append(['UNPICKABLE', qty - rem])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['no each picking', [50, [6, 24, 0], ['CS', 'IP']], [['CS', 2], ['UNPICKABLE', 2]]], ['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]]], ['undefined inner', [13, [0, 12, 0], ['IP', 'EA']], [['EA', 13]]], ['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]]], ['zero qty', [0, [6, 24, 240], ['EA']], []], ['generated mix 8', [1000, [0, 48, 0], ['CS', 'IP']], [['CS', 20], ['UNPICKABLE', 40]]]], [['generated mix 14', [50, [0, 48, 480], ['PAL', 'CS', 'IP']], [['CS', 1], ['UNPICKABLE', 2]]], ['generated mix 13', [13, [4, 24, 480], ['PAL', 'IP']], [['IP', 3], ['UNPICKABLE', 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 9', [250, [6, 48, 480], ['PAL', 'CS']], [['CS', 5], ['UNPICKABLE', 10]]], ['generated mix 19', [500, [0, 48, 480], ['PAL', 'CS', 'EA']], [['PAL', 1], ['EA', 20]]]], [['generated mix 62', [500, [6, 12, 240], ['PAL', 'CS']], [['PAL', 2], ['CS', 1], ['UNPICKABLE', 8]]], ['generated mix 44', [1000, [0, 12, 240], ['CS', 'IP']], [['CS', 83], ['UNPICKABLE', 4]]], ['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 20', [0, [6, 12, 0], ['PAL', 'CS', 'IP']], []], ['generated mix 28', [50, [4, 48, 0], ['PAL', 'CS', 'IP', 'EA']], [['CS', 1], ['EA', 2]]]], [['generated mix 7', [3, [4, 48, 480], ['PAL', 'CS', 'IP']], [['UNPICKABLE', 3]]], ['generated mix 65', [500, [4, 12, 240], ['PAL', 'CS']], [['PAL', 2], ['CS', 1], ['UNPICKABLE', 8]]], ['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 32', [25, [4, 24, 240], ['PAL', 'CS', 'EA']], [['CS', 1], ['EA', 1]]], ['generated mix 40', [3, [4, 48, 480], ['IP']], [['UNPICKABLE', 3]]]], [['generated mix 27', [25, [4, 48, 960], ['IP']], [['IP', 6], ['UNPICKABLE', 1]]], ['generated mix 7', [3, [4, 48, 480], ['PAL', 'CS', 'IP']], [['UNPICKABLE', 3]]], ['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
no each picking[['CS', 2], ['UNPICKABLE', 48]][['CS', 2], ['UNPICKABLE', 2]]Failed
inner only[['IP', 3], ['UNPICKABLE', 12]][['IP', 3], ['UNPICKABLE', 1]]Failed
full breakdown[['PAL', 1], ['IP', 1], ['EA', 5]][['PAL', 1], ['IP', 1], ['EA', 5]]Passed
undefined inner[['EA', 13]][['EA', 13]]Passed
pallet not allowed[['CS', 20], ['EA', 20]][['CS', 20], ['EA', 20]]Passed
case and each[['CS', 2], ['EA', 2]][['CS', 2], ['EA', 2]]Passed
zero qty[][]Passed
generated mix 8[['CS', 20], ['UNPICKABLE', 960]][['CS', 20], ['UNPICKABLE', 40]]Failed

SHA-256 / 2037f47247d6844aaa7ade19b7b73a331d5be71ae39a4eb366f020772081bbe6

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

Case digest / 65e2e248189548330aec8bf9305385f00e8a3c95cb41460b22c8490aea7a72f2