FAILURE MAP
← Case archive

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

Face sizing: cheapest rather than smallest slot · case 01

Slow items are assigned to large, cheap-ranked slot types.

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

ROOT CAUSE

Fitting slot types are ranked by cost rank only.

VERIFIED REPAIR

Choose the smallest fitting capacity first, then cost rank, then type.

Unsuccessful approach: Choosing the largest fitting capacity wastes forward space.

Case contract

weekly eaches demand, days of cover, case pack cp, slot_types [[type, capacity_cases, cost_rank]]. Needed cases = ceil(weekly*days / (7*cp)). Choose the smallest capacity that holds it (then cost_rank, type) using 1 slot. If none holds it, use the largest capacity type (then cost_rank, type) and ceil(need/capacity) slots. Zero demand -> ["NONE", 0, 0].

Why this case matters

Forward pick faces are sized to hold a target number of days of demand.

1 / The failure

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

N = 1
observations = []
def solve(weekly, days, cp, slot_types):
    if weekly <= 0:
        return ['NONE', 0, 0]
    need = -(-(weekly * days) // (7 * cp))
    fits = [s for s in slot_types if s[1] >= need]
    if fits:
        t = min(fits, key=lambda s: (s[2], s[0]))
        return [t[0], need, 1]
    t = min(slot_types, key=lambda s: (-s[1], s[2], s[0]))
    return [t[0], need, -(-need // t[1])]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 8', [120, 5, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 8, 1]], ['generated mix 16', [1400, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 9, 1]]], [['generated mix 31', [84, 1, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 17', [70, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 3, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['generated mix 9', [350, 3, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 13, 1]], ['generated mix 18', [1400, 1, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 34, 1]], ['generated mix 26', [1400, 5, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 167, 17]]], [['generated mix 59', [84, 3, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 2, 1]], ['generated mix 41', [1, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 1, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 20', [700, 1, 12, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['M', 9, 2]], ['generated mix 28', [120, 3, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 9, 1]], ['generated mix 36', [700, 7, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 117, 3]]], [['generated mix 13', [1, 7, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 56', [1, 5, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 1, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['generated mix 32', [1400, 3, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 50, 5]], ['generated mix 40', [70, 5, 1, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 50, 2]], ['generated mix 48', [700, 5, 6, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['M', 84, 14]]], [['generated mix 49', [84, 1, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 2, 1]], ['generated mix 77', [20, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 1, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 42', [120, 3, 12, [['A', 10, 2], ['B', 10, 1]]], ['B', 5, 1]], ['generated mix 51', [1, 14, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 1, 1]], ['generated mix 59', [84, 3, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 2, 1]]]]
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
exact capacity['FLOW', 4, 1]['SHELF', 4, 1]Failed
smallest fit tie cost['FLOW', 6, 1]['FLOW', 6, 1]Passed
zero demand['NONE', 0, 0]['NONE', 0, 0]Passed
split tie['B', 700, 70]['B', 700, 70]Passed
split['PAL', 234, 6]['PAL', 234, 6]Passed
tiny demand one case['FLOW', 1, 1]['SHELF', 1, 1]Failed
generated mix 8['FLOW', 8, 1]['FLOW', 8, 1]Passed
generated mix 16['FLOW', 9, 1]['FLOW', 9, 1]Passed

SHA-256 / 0a7b9d500212b467fc7318143f321a483253cff0e0e5ce8e90e4ed986a84ffa5

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(weekly, days, cp, slot_types):
    if weekly <= 0:
        return ['NONE', 0, 0]
    need = -(-(weekly * days) // (7 * cp))
    fits = [s for s in slot_types if s[1] >= need]
    if fits:
        t = min(fits, key=lambda s: (-s[1], s[2], s[0]))
        return [t[0], need, 1]
    t = min(slot_types, key=lambda s: (-s[1], s[2], s[0]))
    return [t[0], need, -(-need // t[1])]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 8', [120, 5, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 8, 1]], ['generated mix 16', [1400, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 9, 1]]], [['generated mix 31', [84, 1, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 17', [70, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 3, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['generated mix 9', [350, 3, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 13, 1]], ['generated mix 18', [1400, 1, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 34, 1]], ['generated mix 26', [1400, 5, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 167, 17]]], [['generated mix 59', [84, 3, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 2, 1]], ['generated mix 41', [1, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 1, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 20', [700, 1, 12, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['M', 9, 2]], ['generated mix 28', [120, 3, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 9, 1]], ['generated mix 36', [700, 7, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 117, 3]]], [['generated mix 13', [1, 7, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 56', [1, 5, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 1, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['generated mix 32', [1400, 3, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 50, 5]], ['generated mix 40', [70, 5, 1, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 50, 2]], ['generated mix 48', [700, 5, 6, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['M', 84, 14]]], [['generated mix 49', [84, 1, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 2, 1]], ['generated mix 77', [20, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 1, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 42', [120, 3, 12, [['A', 10, 2], ['B', 10, 1]]], ['B', 5, 1]], ['generated mix 51', [1, 14, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 1, 1]], ['generated mix 59', [84, 3, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 2, 1]]]]
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
exact capacity['PAL', 4, 1]['SHELF', 4, 1]Failed
smallest fit tie cost['PAL', 6, 1]['FLOW', 6, 1]Failed
zero demand['NONE', 0, 0]['NONE', 0, 0]Passed
split tie['B', 700, 70]['B', 700, 70]Passed
split['PAL', 234, 6]['PAL', 234, 6]Passed
tiny demand one case['PAL', 1, 1]['SHELF', 1, 1]Failed
generated mix 8['PAL', 8, 1]['FLOW', 8, 1]Failed
generated mix 16['FLOW', 9, 1]['FLOW', 9, 1]Passed

SHA-256 / b1941ec2fc08f607e76419b79b029d83111927bc0cc471c2c2836efe7cf50976

3 / The verified repair

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

N = 1
observations = []
def solve(weekly, days, cp, slot_types):
    if weekly <= 0:
        return ['NONE', 0, 0]
    need = -(-(weekly * days) // (7 * cp))
    fits = [s for s in slot_types if s[1] >= need]
    if fits:
        t = min(fits, key=lambda s: (s[1], s[2], s[0]))
        return [t[0], need, 1]
    t = min(slot_types, key=lambda s: (-s[1], s[2], s[0]))
    return [t[0], need, -(-need // t[1])]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 8', [120, 5, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 8, 1]], ['generated mix 16', [1400, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 9, 1]]], [['generated mix 31', [84, 1, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 17', [70, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 3, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['generated mix 9', [350, 3, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 13, 1]], ['generated mix 18', [1400, 1, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 34, 1]], ['generated mix 26', [1400, 5, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 167, 17]]], [['generated mix 59', [84, 3, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 2, 1]], ['generated mix 41', [1, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 1, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 20', [700, 1, 12, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['M', 9, 2]], ['generated mix 28', [120, 3, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 9, 1]], ['generated mix 36', [700, 7, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 117, 3]]], [['generated mix 13', [1, 7, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 56', [1, 5, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 1, 1]], ['zero demand', [0, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['NONE', 0, 0]], ['split tie', [700, 7, 1, [['A', 10, 2], ['B', 10, 1]]], ['B', 700, 70]], ['exact capacity', [84, 4, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 4, 1]], ['generated mix 32', [1400, 3, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['FLOW', 50, 5]], ['generated mix 40', [70, 5, 1, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 50, 2]], ['generated mix 48', [700, 5, 6, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['M', 84, 14]]], [['generated mix 49', [84, 1, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 2, 1]], ['generated mix 77', [20, 5, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1]]], ['SHELF', 1, 1]], ['smallest fit tie cost', [70, 7, 12, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['FLOW', 6, 1]], ['split', [700, 14, 6, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['PAL', 234, 6]], ['tiny demand one case', [1, 1, 24, [['SHELF', 4, 1], ['CART', 10, 2], ['FLOW', 10, 1], ['PAL', 40, 3]]], ['SHELF', 1, 1]], ['generated mix 42', [120, 3, 12, [['A', 10, 2], ['B', 10, 1]]], ['B', 5, 1]], ['generated mix 51', [1, 14, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 1, 1]], ['generated mix 59', [84, 3, 24, [['S', 2, 1], ['M', 6, 1], ['X', 6, 1]]], ['S', 2, 1]]]]
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
exact capacity['SHELF', 4, 1]['SHELF', 4, 1]Passed
smallest fit tie cost['FLOW', 6, 1]['FLOW', 6, 1]Passed
zero demand['NONE', 0, 0]['NONE', 0, 0]Passed
split tie['B', 700, 70]['B', 700, 70]Passed
split['PAL', 234, 6]['PAL', 234, 6]Passed
tiny demand one case['SHELF', 1, 1]['SHELF', 1, 1]Passed
generated mix 8['FLOW', 8, 1]['FLOW', 8, 1]Passed
generated mix 16['FLOW', 9, 1]['FLOW', 9, 1]Passed

SHA-256 / 45d4823b03693c72d9bfd4512ad3e840e33adc93c8f93d5017ad65c9f8538b4b

Verification & scope

Stipulated days-of-supply sizing with whole cases. 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.349359+00:00.

Case digest / 141581646ed4f99849f95d4ababcf1b066d29633e752c5bbcb34784c029b351e