FA-95136 / Warehouse slotting and bin packing / Open access
Re-slot plan: two SKUs sent to one slot · case 01
Two accepted moves target the same destination slot.
ROOT CAUSE
Destinations of accepted moves are not checked for reuse.
VERIFIED REPAIR
Reject a candidate whose target slot was already chosen.
Unsuccessful approach: Checking the target against moved SKU codes compares slots with SKUs and never matches.
Case contract
cands [[sku, from_slot, to_slot, weekly_picks, travel_from, travel_to]]. Weekly benefit = picks*(travel_from - travel_to); keep candidates with benefit >= move_cost; rank by benefit desc, sku, from, to. Greedily accept up to max_moves: each SKU moves once, each target is used once, and a target that is the from_slot of any candidate is occupied unless that slot was already vacated by an accepted move. Return [[sku, to_slot, benefit]].
Why this case matters
Periodic re-slotting moves SKUs whose velocity changed toward better locations.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cands, move_cost, max_moves):
occupied = {c[1] for c in cands}
ranked = []
for sku, frm, to, picks, tf, tt in cands:
benefit = picks * (tf - tt)
if benefit >= move_cost:
ranked.append((-benefit, sku, frm, to))
ranked.sort()
plan = []
moved = set()
targets = set()
vacated = set()
for nb, sku, frm, to in ranked:
if len(plan) >= max_moves:
break
if sku in moved:
continue
if to in occupied and to not in vacated:
continue
plan.append([sku, to, -nb])
moved.add(sku)
targets.add(to)
vacated.add(frm)
return plan
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 6', [[['K3', 'S1', 'S3', 20, 50, 10], ['K3', 'S4', 'S7', 40, 50, 40]], 400, 2], [['K3', 'S3', 800]]], ['generated mix 14', [[['K3', 'S7', 'S4', 10, 10, 30], ['K4', 'S6', 'S3', 10, 50, 5], ['K2', 'S5', 'S6', 5, 30, 10]], 200, 3], [['K4', 'S3', 450]]], ['generated mix 22', [[['K1', 'S2', 'S1', 20, 30, 40]], 400, 1], []]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['chain into vacated', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 400], ['B', 'S1', 300]]], ['sku once', [[['A', 'S1', 'S8', 10, 50, 10], ['A', 'S1', 'S9', 10, 50, 20]], 0, 5], [['A', 'S8', 400]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 9', [[['K1', 'S6', 'S1', 20, 20, 20], ['K3', 'S5', 'S6', 40, 20, 20]], 0, 3], [['K1', 'S1', 0], ['K3', 'S6', 0]]], ['generated mix 17', [[['K1', 'S2', 'S6', 5, 20, 20], ['K2', 'S7', 'S1', 10, 50, 30]], 50, 3], [['K2', 'S1', 200]]], ['generated mix 25', [[['K1', 'S3', 'S6', 10, 10, 5], ['K3', 'S7', 'S1', 10, 50, 5], ['K2', 'S3', 'S4', 40, 50, 20]], 200, 2], [['K2', 'S4', 1200], ['K3', 'S1', 450]]], ['generated mix 33', [[['K3', 'S5', 'S3', 40, 50, 5], ['K2', 'S4', 'S6', 10, 20, 10], ['K4', 'S5', 'S2', 5, 50, 5], ['K4', 'S6', 'S3', 5, 20, 40], ['K4', 'S4', 'S6', 40, 30, 30]], 200, 2], [['K3', 'S3', 1800], ['K4', 'S2', 225]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['generated mix 20', [[['K1', 'S3', 'S7', 5, 50, 40], ['K3', 'S4', 'S5', 20, 10, 10], ['K2', 'S6', 'S5', 5, 30, 30], ['K3', 'S2', 'S5', 40, 50, 20], ['K4', 'S5', 'S7', 10, 10, 30], ['K2', 'S5', 'S4', 40, 30, 5]], 0, 1], [['K1', 'S7', 50]]], ['generated mix 28', [[['K3', 'S4', 'S2', 10, 50, 30], ['K2', 'S1', 'S3', 10, 50, 30], ['K4', 'S1', 'S2', 20, 50, 5]], 400, 2], [['K4', 'S2', 900]]], ['generated mix 36', [[['K3', 'S5', 'S2', 40, 30, 10]], 100, 3], [['K3', 'S2', 800]]], ['generated mix 44', [[['K3', 'S5', 'S2', 40, 20, 30], ['K3', 'S6', 'S2', 5, 50, 5], ['K3', 'S2', 'S3', 10, 20, 20], ['K4', 'S3', 'S1', 20, 50, 20], ['K4', 'S7', 'S1', 10, 30, 5]], 0, 2], [['K4', 'S1', 600], ['K3', 'S3', 0]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['chain into vacated', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 400], ['B', 'S1', 300]]], ['sku once', [[['A', 'S1', 'S8', 10, 50, 10], ['A', 'S1', 'S9', 10, 50, 20]], 0, 5], [['A', 'S8', 400]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 31', [[['K4', 'S4', 'S2', 10, 10, 5]], 200, 1], []], ['generated mix 39', [[['K3', 'S1', 'S2', 40, 50, 40], ['K1', 'S2', 'S7', 20, 30, 30]], 50, 1], []], ['generated mix 47', [[['K2', 'S2', 'S5', 40, 30, 40]], 100, 2], []], ['generated mix 55', [[['K2', 'S2', 'S5', 20, 10, 10], ['K1', 'S2', 'S5', 20, 30, 10], ['K4', 'S2', 'S1', 5, 30, 30], ['K2', 'S6', 'S4', 5, 30, 40]], 100, 1], [['K1', 'S5', 400]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['generated mix 42', [[['K3', 'S7', 'S2', 10, 20, 40], ['K1', 'S6', 'S2', 10, 20, 20], ['K2', 'S5', 'S2', 20, 30, 20], ['K4', 'S7', 'S4', 40, 50, 30]], 200, 2], [['K4', 'S4', 800], ['K2', 'S2', 200]]], ['generated mix 50', [[['K4', 'S4', 'S7', 40, 50, 5], ['K3', 'S3', 'S4', 5, 50, 10], ['K1', 'S1', 'S4', 5, 30, 40], ['K1', 'S2', 'S3', 5, 10, 20], ['K1', 'S7', 'S6', 5, 10, 40]], 50, 1], []], ['generated mix 58', [[['K1', 'S7', 'S4', 20, 50, 40], ['K1', 'S4', 'S7', 20, 20, 20]], 0, 3], []], ['generated mix 66', [[['K3', 'S4', 'S7', 10, 20, 40], ['K1', 'S2', 'S5', 20, 10, 10], ['K4', 'S6', 'S7', 10, 20, 20], ['K1', 'S2', 'S1', 20, 10, 20]], 200, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| shared target | [['A', 'S9', 400], ['B', 'S9', 300]] | [['A', 'S9', 400]] | Failed |
| threshold equal kept | [['A', 'S9', 100]] | [['A', 'S9', 100]] | Passed |
| limit | [['A', 'S8', 400]] | [['A', 'S8', 400]] | Passed |
| occupied target | [['A', 'S9', 200]] | [['A', 'S9', 200]] | Passed |
| negative benefit | [] | [] | Passed |
| generated mix 6 | [['K3', 'S3', 800]] | [['K3', 'S3', 800]] | Passed |
| generated mix 14 | [['K4', 'S3', 450]] | [['K4', 'S3', 450]] | Passed |
| generated mix 22 | [] | [] | Passed |
SHA-256 / 865c7ae168f626df19175c8977bd880c7e294eb0601aaa0f50a3123fd9fff062
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cands, move_cost, max_moves):
occupied = {c[1] for c in cands}
ranked = []
for sku, frm, to, picks, tf, tt in cands:
benefit = picks * (tf - tt)
if benefit >= move_cost:
ranked.append((-benefit, sku, frm, to))
ranked.sort()
plan = []
moved = set()
targets = set()
vacated = set()
for nb, sku, frm, to in ranked:
if len(plan) >= max_moves:
break
if sku in moved or to in moved:
continue
if to in occupied and to not in vacated:
continue
plan.append([sku, to, -nb])
moved.add(sku)
targets.add(to)
vacated.add(frm)
return plan
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 6', [[['K3', 'S1', 'S3', 20, 50, 10], ['K3', 'S4', 'S7', 40, 50, 40]], 400, 2], [['K3', 'S3', 800]]], ['generated mix 14', [[['K3', 'S7', 'S4', 10, 10, 30], ['K4', 'S6', 'S3', 10, 50, 5], ['K2', 'S5', 'S6', 5, 30, 10]], 200, 3], [['K4', 'S3', 450]]], ['generated mix 22', [[['K1', 'S2', 'S1', 20, 30, 40]], 400, 1], []]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['chain into vacated', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 400], ['B', 'S1', 300]]], ['sku once', [[['A', 'S1', 'S8', 10, 50, 10], ['A', 'S1', 'S9', 10, 50, 20]], 0, 5], [['A', 'S8', 400]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 9', [[['K1', 'S6', 'S1', 20, 20, 20], ['K3', 'S5', 'S6', 40, 20, 20]], 0, 3], [['K1', 'S1', 0], ['K3', 'S6', 0]]], ['generated mix 17', [[['K1', 'S2', 'S6', 5, 20, 20], ['K2', 'S7', 'S1', 10, 50, 30]], 50, 3], [['K2', 'S1', 200]]], ['generated mix 25', [[['K1', 'S3', 'S6', 10, 10, 5], ['K3', 'S7', 'S1', 10, 50, 5], ['K2', 'S3', 'S4', 40, 50, 20]], 200, 2], [['K2', 'S4', 1200], ['K3', 'S1', 450]]], ['generated mix 33', [[['K3', 'S5', 'S3', 40, 50, 5], ['K2', 'S4', 'S6', 10, 20, 10], ['K4', 'S5', 'S2', 5, 50, 5], ['K4', 'S6', 'S3', 5, 20, 40], ['K4', 'S4', 'S6', 40, 30, 30]], 200, 2], [['K3', 'S3', 1800], ['K4', 'S2', 225]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['generated mix 20', [[['K1', 'S3', 'S7', 5, 50, 40], ['K3', 'S4', 'S5', 20, 10, 10], ['K2', 'S6', 'S5', 5, 30, 30], ['K3', 'S2', 'S5', 40, 50, 20], ['K4', 'S5', 'S7', 10, 10, 30], ['K2', 'S5', 'S4', 40, 30, 5]], 0, 1], [['K1', 'S7', 50]]], ['generated mix 28', [[['K3', 'S4', 'S2', 10, 50, 30], ['K2', 'S1', 'S3', 10, 50, 30], ['K4', 'S1', 'S2', 20, 50, 5]], 400, 2], [['K4', 'S2', 900]]], ['generated mix 36', [[['K3', 'S5', 'S2', 40, 30, 10]], 100, 3], [['K3', 'S2', 800]]], ['generated mix 44', [[['K3', 'S5', 'S2', 40, 20, 30], ['K3', 'S6', 'S2', 5, 50, 5], ['K3', 'S2', 'S3', 10, 20, 20], ['K4', 'S3', 'S1', 20, 50, 20], ['K4', 'S7', 'S1', 10, 30, 5]], 0, 2], [['K4', 'S1', 600], ['K3', 'S3', 0]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['chain into vacated', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 400], ['B', 'S1', 300]]], ['sku once', [[['A', 'S1', 'S8', 10, 50, 10], ['A', 'S1', 'S9', 10, 50, 20]], 0, 5], [['A', 'S8', 400]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 31', [[['K4', 'S4', 'S2', 10, 10, 5]], 200, 1], []], ['generated mix 39', [[['K3', 'S1', 'S2', 40, 50, 40], ['K1', 'S2', 'S7', 20, 30, 30]], 50, 1], []], ['generated mix 47', [[['K2', 'S2', 'S5', 40, 30, 40]], 100, 2], []], ['generated mix 55', [[['K2', 'S2', 'S5', 20, 10, 10], ['K1', 'S2', 'S5', 20, 30, 10], ['K4', 'S2', 'S1', 5, 30, 30], ['K2', 'S6', 'S4', 5, 30, 40]], 100, 1], [['K1', 'S5', 400]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['generated mix 42', [[['K3', 'S7', 'S2', 10, 20, 40], ['K1', 'S6', 'S2', 10, 20, 20], ['K2', 'S5', 'S2', 20, 30, 20], ['K4', 'S7', 'S4', 40, 50, 30]], 200, 2], [['K4', 'S4', 800], ['K2', 'S2', 200]]], ['generated mix 50', [[['K4', 'S4', 'S7', 40, 50, 5], ['K3', 'S3', 'S4', 5, 50, 10], ['K1', 'S1', 'S4', 5, 30, 40], ['K1', 'S2', 'S3', 5, 10, 20], ['K1', 'S7', 'S6', 5, 10, 40]], 50, 1], []], ['generated mix 58', [[['K1', 'S7', 'S4', 20, 50, 40], ['K1', 'S4', 'S7', 20, 20, 20]], 0, 3], []], ['generated mix 66', [[['K3', 'S4', 'S7', 10, 20, 40], ['K1', 'S2', 'S5', 20, 10, 10], ['K4', 'S6', 'S7', 10, 20, 20], ['K1', 'S2', 'S1', 20, 10, 20]], 200, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| shared target | [['A', 'S9', 400], ['B', 'S9', 300]] | [['A', 'S9', 400]] | Failed |
| threshold equal kept | [['A', 'S9', 100]] | [['A', 'S9', 100]] | Passed |
| limit | [['A', 'S8', 400]] | [['A', 'S8', 400]] | Passed |
| occupied target | [['A', 'S9', 200]] | [['A', 'S9', 200]] | Passed |
| negative benefit | [] | [] | Passed |
| generated mix 6 | [['K3', 'S3', 800]] | [['K3', 'S3', 800]] | Passed |
| generated mix 14 | [['K4', 'S3', 450]] | [['K4', 'S3', 450]] | Passed |
| generated mix 22 | [] | [] | Passed |
SHA-256 / 7de724b163a1372f317bfbe42da93d315f166ac440d5cab73b9bf8e280e7d31a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cands, move_cost, max_moves):
occupied = {c[1] for c in cands}
ranked = []
for sku, frm, to, picks, tf, tt in cands:
benefit = picks * (tf - tt)
if benefit >= move_cost:
ranked.append((-benefit, sku, frm, to))
ranked.sort()
plan = []
moved = set()
targets = set()
vacated = set()
for nb, sku, frm, to in ranked:
if len(plan) >= max_moves:
break
if sku in moved or to in targets:
continue
if to in occupied and to not in vacated:
continue
plan.append([sku, to, -nb])
moved.add(sku)
targets.add(to)
vacated.add(frm)
return plan
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 6', [[['K3', 'S1', 'S3', 20, 50, 10], ['K3', 'S4', 'S7', 40, 50, 40]], 400, 2], [['K3', 'S3', 800]]], ['generated mix 14', [[['K3', 'S7', 'S4', 10, 10, 30], ['K4', 'S6', 'S3', 10, 50, 5], ['K2', 'S5', 'S6', 5, 30, 10]], 200, 3], [['K4', 'S3', 450]]], ['generated mix 22', [[['K1', 'S2', 'S1', 20, 30, 40]], 400, 1], []]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['chain into vacated', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 400], ['B', 'S1', 300]]], ['sku once', [[['A', 'S1', 'S8', 10, 50, 10], ['A', 'S1', 'S9', 10, 50, 20]], 0, 5], [['A', 'S8', 400]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 9', [[['K1', 'S6', 'S1', 20, 20, 20], ['K3', 'S5', 'S6', 40, 20, 20]], 0, 3], [['K1', 'S1', 0], ['K3', 'S6', 0]]], ['generated mix 17', [[['K1', 'S2', 'S6', 5, 20, 20], ['K2', 'S7', 'S1', 10, 50, 30]], 50, 3], [['K2', 'S1', 200]]], ['generated mix 25', [[['K1', 'S3', 'S6', 10, 10, 5], ['K3', 'S7', 'S1', 10, 50, 5], ['K2', 'S3', 'S4', 40, 50, 20]], 200, 2], [['K2', 'S4', 1200], ['K3', 'S1', 450]]], ['generated mix 33', [[['K3', 'S5', 'S3', 40, 50, 5], ['K2', 'S4', 'S6', 10, 20, 10], ['K4', 'S5', 'S2', 5, 50, 5], ['K4', 'S6', 'S3', 5, 20, 40], ['K4', 'S4', 'S6', 40, 30, 30]], 200, 2], [['K3', 'S3', 1800], ['K4', 'S2', 225]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['generated mix 20', [[['K1', 'S3', 'S7', 5, 50, 40], ['K3', 'S4', 'S5', 20, 10, 10], ['K2', 'S6', 'S5', 5, 30, 30], ['K3', 'S2', 'S5', 40, 50, 20], ['K4', 'S5', 'S7', 10, 10, 30], ['K2', 'S5', 'S4', 40, 30, 5]], 0, 1], [['K1', 'S7', 50]]], ['generated mix 28', [[['K3', 'S4', 'S2', 10, 50, 30], ['K2', 'S1', 'S3', 10, 50, 30], ['K4', 'S1', 'S2', 20, 50, 5]], 400, 2], [['K4', 'S2', 900]]], ['generated mix 36', [[['K3', 'S5', 'S2', 40, 30, 10]], 100, 3], [['K3', 'S2', 800]]], ['generated mix 44', [[['K3', 'S5', 'S2', 40, 20, 30], ['K3', 'S6', 'S2', 5, 50, 5], ['K3', 'S2', 'S3', 10, 20, 20], ['K4', 'S3', 'S1', 20, 50, 20], ['K4', 'S7', 'S1', 10, 30, 5]], 0, 2], [['K4', 'S1', 600], ['K3', 'S3', 0]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['chain into vacated', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 400], ['B', 'S1', 300]]], ['sku once', [[['A', 'S1', 'S8', 10, 50, 10], ['A', 'S1', 'S9', 10, 50, 20]], 0, 5], [['A', 'S8', 400]]], ['negative benefit', [[['A', 'S1', 'S9', 10, 20, 30]], 0, 5], []], ['generated mix 31', [[['K4', 'S4', 'S2', 10, 10, 5]], 200, 1], []], ['generated mix 39', [[['K3', 'S1', 'S2', 40, 50, 40], ['K1', 'S2', 'S7', 20, 30, 30]], 50, 1], []], ['generated mix 47', [[['K2', 'S2', 'S5', 40, 30, 40]], 100, 2], []], ['generated mix 55', [[['K2', 'S2', 'S5', 20, 10, 10], ['K1', 'S2', 'S5', 20, 30, 10], ['K4', 'S2', 'S1', 5, 30, 30], ['K2', 'S6', 'S4', 5, 30, 40]], 100, 1], [['K1', 'S5', 400]]]], [['shared target', [[['A', 'S1', 'S9', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 5], [['A', 'S9', 400]]], ['threshold equal kept', [[['A', 'S1', 'S9', 10, 30, 20]], 100, 5], [['A', 'S9', 100]]], ['limit', [[['A', 'S1', 'S8', 10, 50, 10], ['B', 'S2', 'S9', 10, 40, 10]], 0, 1], [['A', 'S8', 400]]], ['occupied target', [[['A', 'S1', 'S9', 10, 30, 10], ['B', 'S2', 'S1', 10, 40, 10]], 0, 5], [['A', 'S9', 200]]], ['generated mix 42', [[['K3', 'S7', 'S2', 10, 20, 40], ['K1', 'S6', 'S2', 10, 20, 20], ['K2', 'S5', 'S2', 20, 30, 20], ['K4', 'S7', 'S4', 40, 50, 30]], 200, 2], [['K4', 'S4', 800], ['K2', 'S2', 200]]], ['generated mix 50', [[['K4', 'S4', 'S7', 40, 50, 5], ['K3', 'S3', 'S4', 5, 50, 10], ['K1', 'S1', 'S4', 5, 30, 40], ['K1', 'S2', 'S3', 5, 10, 20], ['K1', 'S7', 'S6', 5, 10, 40]], 50, 1], []], ['generated mix 58', [[['K1', 'S7', 'S4', 20, 50, 40], ['K1', 'S4', 'S7', 20, 20, 20]], 0, 3], []], ['generated mix 66', [[['K3', 'S4', 'S7', 10, 20, 40], ['K1', 'S2', 'S5', 20, 10, 10], ['K4', 'S6', 'S7', 10, 20, 20], ['K1', 'S2', 'S1', 20, 10, 20]], 200, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| shared target | [['A', 'S9', 400]] | [['A', 'S9', 400]] | Passed |
| threshold equal kept | [['A', 'S9', 100]] | [['A', 'S9', 100]] | Passed |
| limit | [['A', 'S8', 400]] | [['A', 'S8', 400]] | Passed |
| occupied target | [['A', 'S9', 200]] | [['A', 'S9', 200]] | Passed |
| negative benefit | [] | [] | Passed |
| generated mix 6 | [['K3', 'S3', 800]] | [['K3', 'S3', 800]] | Passed |
| generated mix 14 | [['K4', 'S3', 450]] | [['K4', 'S3', 450]] | Passed |
| generated mix 22 | [] | [] | Passed |
SHA-256 / f0740ef1b563078f5f0504161eb6ae8a7c8351e4d7fd12fb6832665f5176eebb
Verification & scope
Greedy stipulated planner; no swap sequencing or labour scheduling. 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:10.919063+00:00.
Case digest / d8477cc5368786100d5bb94c5c658a7071e9aa001feb10f5a35ff7e48c593eb2