{"abstract":"A cheaper but bulkier carton is chosen, increasing dimensional weight charges.","category":"Warehouse slotting and bin packing","checks":8,"contract":"Item dims [a,b,c], weight kg, sioc flag (ships in own container). cartons [[id, L, W, H, max_kg, cost]]. SIOC items return \"SIOC\". Otherwise add 1 unit of dunnage per side (2 per dimension); the item fits a carton if the sorted padded dims are each <= the sorted inner dims (any orientation) and kg <= max_kg. Choose the smallest inner volume, then cost, then id. None -> \"NO_FIT\".","evaluation_group":"w2-warehouse-slotting-carton-select","failed_approach":"Ranking by the longest side is not volume and picks long thin cartons over compact ones.","family":"w2-warehouse-slotting-carton-select-selection-key","id":"FA-94966","implementations":{"attempt":{"sha256":"cf332650726389d781bf66cf0a912ac2fd12fe7542f9c7c54b0aeabbc2765f2b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(dims, kg, sioc, cartons):\n    if sioc:\n        return 'SIOC'\n    need = sorted(d + 2 for d in dims)\n    best = None\n    for cid, L, W, H, max_kg, cost in cartons:\n        inner = sorted([L, W, H])\n        if any(n > c for n, c in zip(need, inner)):\n            continue\n        if kg > max_kg:\n            continue\n        key = (max(L, W, H), cost, cid)\n        if best is None or key < best[0]:\n            best = (key, cid)\n    return best[1] if best else 'NO_FIT'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['weight at limit', [[3, 3, 3], 10, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['sioc', [[3, 3, 3], 1, True, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'SIOC'], ['volume tie by cost', [[3, 3, 3], 1, False, [['A', 10, 10, 10, 9, 60], ['B', 20, 10, 5, 9, 55]]], 'B'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['generated mix 6', [[13, 6, 9], 19, False, [['C0', 16, 6, 30, 5, 55], ['C1', 6, 12, 6, 5, 70], ['C2', 6, 8, 12, 20, 90], ['C3', 10, 20, 6, 20, 70], ['C4', 24, 8, 30, 10, 70]]], 'NO_FIT']], [['generated mix 30', [[14, 13, 10], 1, False, [['C0', 16, 8, 8, 10, 55], ['C1', 20, 20, 20, 5, 55], ['C2', 32, 20, 20, 20, 40], ['C3', 24, 20, 4, 20, 40], ['C4', 16, 12, 4, 20, 55]]], 'C1'], ['generated mix 19', [[11, 3, 5], 1, False, [['C0', 6, 20, 4, 20, 90], ['C1', 20, 20, 6, 5, 40], ['C2', 32, 6, 4, 20, 55], ['C3', 12, 8, 30, 20, 90], ['C4', 32, 20, 8, 10, 55], ['C5', 20, 6, 12, 20, 40]]], 'C5'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['generated mix 7', [[7, 9, 14], 5, True, [['C0', 16, 16, 4, 20, 55], ['C1', 20, 16, 8, 10, 70], ['C2', 24, 6, 4, 5, 40], ['C3', 10, 8, 30, 10, 90], ['C4', 20, 8, 30, 5, 90], ['C5', 24, 12, 12, 10, 90]]], 'SIOC'], ['generated mix 15', [[2, 8, 6], 1, False, [['C0', 32, 12, 4, 5, 40], ['C1', 16, 12, 6, 5, 55], ['C2', 16, 12, 20, 20, 40]]], 'C1']], [['generated mix 78', [[3, 7, 14], 5, False, [['C0', 24, 12, 12, 20, 40], ['C1', 20, 16, 8, 30, 40], ['C2', 24, 12, 30, 30, 55], ['C3', 10, 8, 30, 20, 40], ['C4', 16, 6, 6, 10, 40], ['C5', 20, 20, 6, 5, 40]]], 'C3'], ['generated mix 59', [[7, 2, 2], 10.5, False, [['C0', 12, 12, 8, 30, 90], ['C1', 24, 6, 6, 30, 55], ['C2', 20, 12, 8, 5, 55], ['C3', 12, 8, 8, 10, 90], ['C4', 10, 16, 4, 5, 70]]], 'C1'], ['volume tie by cost', [[3, 3, 3], 1, False, [['A', 10, 10, 10, 9, 60], ['B', 20, 10, 5, 9, 55]]], 'B'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['generated mix 18', [[10, 14, 4], 4.5, False, [['C0', 32, 16, 20, 10, 55], ['C1', 32, 6, 8, 30, 90], ['C2', 16, 6, 6, 20, 40], ['C3', 6, 8, 30, 5, 55], ['C4', 10, 6, 20, 20, 40], ['C5', 32, 20, 6, 20, 90]]], 'C5'], ['generated mix 26', [[14, 4, 3], 19, False, [['C0', 32, 12, 8, 10, 70], ['C1', 6, 8, 4, 10, 55], ['C2', 20, 20, 8, 5, 55], ['C3', 12, 6, 12, 20, 55], ['C4', 16, 8, 20, 10, 40], ['C5', 6, 6, 20, 20, 40]]], 'C5']], [['generated mix 20', [[11, 5, 6], 4.5, False, [['C0', 6, 20, 6, 10, 40], ['C1', 16, 20, 20, 5, 55], ['C2', 32, 8, 8, 5, 90], ['C3', 6, 6, 6, 30, 90], ['C4', 16, 16, 20, 20, 40], ['C5', 32, 12, 12, 20, 55]]], 'C2'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['generated mix 31', [[14, 6, 13], 19, False, [['C0', 16, 6, 20, 5, 40], ['C1', 24, 8, 6, 10, 70], ['C2', 6, 12, 4, 20, 90], ['C3', 10, 8, 4, 20, 55], ['C4', 12, 8, 12, 5, 40]]], 'NO_FIT'], ['generated mix 39', [[13, 2, 3], 9.5, False, [['C0', 24, 12, 6, 5, 90], ['C1', 32, 8, 6, 30, 90]]], 'C1']], [['generated mix 76', [[6, 3, 11], 1, False, [['C0', 16, 20, 30, 10, 40], ['C1', 10, 16, 30, 20, 40]]], 'C1'], ['generated mix 19', [[11, 3, 5], 1, False, [['C0', 6, 20, 4, 20, 90], ['C1', 20, 20, 6, 5, 40], ['C2', 32, 6, 4, 20, 55], ['C3', 12, 8, 30, 20, 90], ['C4', 32, 20, 8, 10, 55], ['C5', 20, 6, 12, 20, 40]]], 'C5'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['generated mix 41', [[11, 14, 6], 19, False, [['C0', 6, 12, 20, 30, 90], ['C1', 6, 6, 4, 20, 70]]], 'NO_FIT'], ['generated mix 49', [[5, 14, 9], 1, False, [['C0', 32, 20, 8, 5, 70], ['C1', 12, 8, 12, 5, 55], ['C2', 20, 6, 8, 5, 90], ['C3', 12, 20, 20, 30, 40], ['C4', 6, 12, 30, 20, 40], ['C5', 10, 16, 8, 5, 90]]], 'C3']]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"4950ec00f21409ca0df0f6464de5fc446c2dfe43f3d21da51b66c41e3709c418","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(dims, kg, sioc, cartons):\n    if sioc:\n        return 'SIOC'\n    need = sorted(d + 2 for d in dims)\n    best = None\n    for cid, L, W, H, max_kg, cost in cartons:\n        inner = sorted([L, W, H])\n        if any(n > c for n, c in zip(need, inner)):\n            continue\n        if kg > max_kg:\n            continue\n        key = (cost, cid)\n        if best is None or key < best[0]:\n            best = (key, cid)\n    return best[1] if best else 'NO_FIT'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['weight at limit', [[3, 3, 3], 10, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['sioc', [[3, 3, 3], 1, True, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'SIOC'], ['volume tie by cost', [[3, 3, 3], 1, False, [['A', 10, 10, 10, 9, 60], ['B', 20, 10, 5, 9, 55]]], 'B'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['generated mix 6', [[13, 6, 9], 19, False, [['C0', 16, 6, 30, 5, 55], ['C1', 6, 12, 6, 5, 70], ['C2', 6, 8, 12, 20, 90], ['C3', 10, 20, 6, 20, 70], ['C4', 24, 8, 30, 10, 70]]], 'NO_FIT']], [['generated mix 30', [[14, 13, 10], 1, False, [['C0', 16, 8, 8, 10, 55], ['C1', 20, 20, 20, 5, 55], ['C2', 32, 20, 20, 20, 40], ['C3', 24, 20, 4, 20, 40], ['C4', 16, 12, 4, 20, 55]]], 'C1'], ['generated mix 19', [[11, 3, 5], 1, False, [['C0', 6, 20, 4, 20, 90], ['C1', 20, 20, 6, 5, 40], ['C2', 32, 6, 4, 20, 55], ['C3', 12, 8, 30, 20, 90], ['C4', 32, 20, 8, 10, 55], ['C5', 20, 6, 12, 20, 40]]], 'C5'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['generated mix 7', [[7, 9, 14], 5, True, [['C0', 16, 16, 4, 20, 55], ['C1', 20, 16, 8, 10, 70], ['C2', 24, 6, 4, 5, 40], ['C3', 10, 8, 30, 10, 90], ['C4', 20, 8, 30, 5, 90], ['C5', 24, 12, 12, 10, 90]]], 'SIOC'], ['generated mix 15', [[2, 8, 6], 1, False, [['C0', 32, 12, 4, 5, 40], ['C1', 16, 12, 6, 5, 55], ['C2', 16, 12, 20, 20, 40]]], 'C1']], [['generated mix 78', [[3, 7, 14], 5, False, [['C0', 24, 12, 12, 20, 40], ['C1', 20, 16, 8, 30, 40], ['C2', 24, 12, 30, 30, 55], ['C3', 10, 8, 30, 20, 40], ['C4', 16, 6, 6, 10, 40], ['C5', 20, 20, 6, 5, 40]]], 'C3'], ['generated mix 59', [[7, 2, 2], 10.5, False, [['C0', 12, 12, 8, 30, 90], ['C1', 24, 6, 6, 30, 55], ['C2', 20, 12, 8, 5, 55], ['C3', 12, 8, 8, 10, 90], ['C4', 10, 16, 4, 5, 70]]], 'C1'], ['volume tie by cost', [[3, 3, 3], 1, False, [['A', 10, 10, 10, 9, 60], ['B', 20, 10, 5, 9, 55]]], 'B'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['generated mix 18', [[10, 14, 4], 4.5, False, [['C0', 32, 16, 20, 10, 55], ['C1', 32, 6, 8, 30, 90], ['C2', 16, 6, 6, 20, 40], ['C3', 6, 8, 30, 5, 55], ['C4', 10, 6, 20, 20, 40], ['C5', 32, 20, 6, 20, 90]]], 'C5'], ['generated mix 26', [[14, 4, 3], 19, False, [['C0', 32, 12, 8, 10, 70], ['C1', 6, 8, 4, 10, 55], ['C2', 20, 20, 8, 5, 55], ['C3', 12, 6, 12, 20, 55], ['C4', 16, 8, 20, 10, 40], ['C5', 6, 6, 20, 20, 40]]], 'C5']], [['generated mix 20', [[11, 5, 6], 4.5, False, [['C0', 6, 20, 6, 10, 40], ['C1', 16, 20, 20, 5, 55], ['C2', 32, 8, 8, 5, 90], ['C3', 6, 6, 6, 30, 90], ['C4', 16, 16, 20, 20, 40], ['C5', 32, 12, 12, 20, 55]]], 'C2'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['generated mix 31', [[14, 6, 13], 19, False, [['C0', 16, 6, 20, 5, 40], ['C1', 24, 8, 6, 10, 70], ['C2', 6, 12, 4, 20, 90], ['C3', 10, 8, 4, 20, 55], ['C4', 12, 8, 12, 5, 40]]], 'NO_FIT'], ['generated mix 39', [[13, 2, 3], 9.5, False, [['C0', 24, 12, 6, 5, 90], ['C1', 32, 8, 6, 30, 90]]], 'C1']], [['generated mix 76', [[6, 3, 11], 1, False, [['C0', 16, 20, 30, 10, 40], ['C1', 10, 16, 30, 20, 40]]], 'C1'], ['generated mix 19', [[11, 3, 5], 1, False, [['C0', 6, 20, 4, 20, 90], ['C1', 20, 20, 6, 5, 40], ['C2', 32, 6, 4, 20, 55], ['C3', 12, 8, 30, 20, 90], ['C4', 32, 20, 8, 10, 55], ['C5', 20, 6, 12, 20, 40]]], 'C5'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['generated mix 41', [[11, 14, 6], 19, False, [['C0', 6, 12, 20, 30, 90], ['C1', 6, 6, 4, 20, 70]]], 'NO_FIT'], ['generated mix 49', [[5, 14, 9], 1, False, [['C0', 32, 20, 8, 5, 70], ['C1', 12, 8, 12, 5, 55], ['C2', 20, 6, 8, 5, 90], ['C3', 12, 20, 20, 30, 40], ['C4', 6, 12, 30, 20, 40], ['C5', 10, 16, 8, 5, 90]]], 'C3']]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"1ff2b4b80ada7c634b258923e510e4bb6a40bf4360e2b911ac09a790cd48141f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(dims, kg, sioc, cartons):\n    if sioc:\n        return 'SIOC'\n    need = sorted(d + 2 for d in dims)\n    best = None\n    for cid, L, W, H, max_kg, cost in cartons:\n        inner = sorted([L, W, H])\n        if any(n > c for n, c in zip(need, inner)):\n            continue\n        if kg > max_kg:\n            continue\n        key = (L * W * H, cost, cid)\n        if best is None or key < best[0]:\n            best = (key, cid)\n    return best[1] if best else 'NO_FIT'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['weight at limit', [[3, 3, 3], 10, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['sioc', [[3, 3, 3], 1, True, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'SIOC'], ['volume tie by cost', [[3, 3, 3], 1, False, [['A', 10, 10, 10, 9, 60], ['B', 20, 10, 5, 9, 55]]], 'B'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['generated mix 6', [[13, 6, 9], 19, False, [['C0', 16, 6, 30, 5, 55], ['C1', 6, 12, 6, 5, 70], ['C2', 6, 8, 12, 20, 90], ['C3', 10, 20, 6, 20, 70], ['C4', 24, 8, 30, 10, 70]]], 'NO_FIT']], [['generated mix 30', [[14, 13, 10], 1, False, [['C0', 16, 8, 8, 10, 55], ['C1', 20, 20, 20, 5, 55], ['C2', 32, 20, 20, 20, 40], ['C3', 24, 20, 4, 20, 40], ['C4', 16, 12, 4, 20, 55]]], 'C1'], ['generated mix 19', [[11, 3, 5], 1, False, [['C0', 6, 20, 4, 20, 90], ['C1', 20, 20, 6, 5, 40], ['C2', 32, 6, 4, 20, 55], ['C3', 12, 8, 30, 20, 90], ['C4', 32, 20, 8, 10, 55], ['C5', 20, 6, 12, 20, 40]]], 'C5'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['generated mix 7', [[7, 9, 14], 5, True, [['C0', 16, 16, 4, 20, 55], ['C1', 20, 16, 8, 10, 70], ['C2', 24, 6, 4, 5, 40], ['C3', 10, 8, 30, 10, 90], ['C4', 20, 8, 30, 5, 90], ['C5', 24, 12, 12, 10, 90]]], 'SIOC'], ['generated mix 15', [[2, 8, 6], 1, False, [['C0', 32, 12, 4, 5, 40], ['C1', 16, 12, 6, 5, 55], ['C2', 16, 12, 20, 20, 40]]], 'C1']], [['generated mix 78', [[3, 7, 14], 5, False, [['C0', 24, 12, 12, 20, 40], ['C1', 20, 16, 8, 30, 40], ['C2', 24, 12, 30, 30, 55], ['C3', 10, 8, 30, 20, 40], ['C4', 16, 6, 6, 10, 40], ['C5', 20, 20, 6, 5, 40]]], 'C3'], ['generated mix 59', [[7, 2, 2], 10.5, False, [['C0', 12, 12, 8, 30, 90], ['C1', 24, 6, 6, 30, 55], ['C2', 20, 12, 8, 5, 55], ['C3', 12, 8, 8, 10, 90], ['C4', 10, 16, 4, 5, 70]]], 'C1'], ['volume tie by cost', [[3, 3, 3], 1, False, [['A', 10, 10, 10, 9, 60], ['B', 20, 10, 5, 9, 55]]], 'B'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['generated mix 18', [[10, 14, 4], 4.5, False, [['C0', 32, 16, 20, 10, 55], ['C1', 32, 6, 8, 30, 90], ['C2', 16, 6, 6, 20, 40], ['C3', 6, 8, 30, 5, 55], ['C4', 10, 6, 20, 20, 40], ['C5', 32, 20, 6, 20, 90]]], 'C5'], ['generated mix 26', [[14, 4, 3], 19, False, [['C0', 32, 12, 8, 10, 70], ['C1', 6, 8, 4, 10, 55], ['C2', 20, 20, 8, 5, 55], ['C3', 12, 6, 12, 20, 55], ['C4', 16, 8, 20, 10, 40], ['C5', 6, 6, 20, 20, 40]]], 'C5']], [['generated mix 20', [[11, 5, 6], 4.5, False, [['C0', 6, 20, 6, 10, 40], ['C1', 16, 20, 20, 5, 55], ['C2', 32, 8, 8, 5, 90], ['C3', 6, 6, 6, 30, 90], ['C4', 16, 16, 20, 20, 40], ['C5', 32, 12, 12, 20, 55]]], 'C2'], ['long thin carton', [[3, 3, 3], 1, False, [['LONG', 40, 6, 6, 30, 50], ['CUBE', 12, 12, 12, 30, 60]]], 'LONG'], ['padding pushes to M', [[11, 3, 3], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['generated mix 31', [[14, 6, 13], 19, False, [['C0', 16, 6, 20, 5, 40], ['C1', 24, 8, 6, 10, 70], ['C2', 6, 12, 4, 20, 90], ['C3', 10, 8, 4, 20, 55], ['C4', 12, 8, 12, 5, 40]]], 'NO_FIT'], ['generated mix 39', [[13, 2, 3], 9.5, False, [['C0', 24, 12, 6, 5, 90], ['C1', 32, 8, 6, 30, 90]]], 'C1']], [['generated mix 76', [[6, 3, 11], 1, False, [['C0', 16, 20, 30, 10, 40], ['C1', 10, 16, 30, 20, 40]]], 'C1'], ['generated mix 19', [[11, 3, 5], 1, False, [['C0', 6, 20, 4, 20, 90], ['C1', 20, 20, 6, 5, 40], ['C2', 32, 6, 4, 20, 55], ['C3', 12, 8, 30, 20, 90], ['C4', 32, 20, 8, 10, 55], ['C5', 20, 6, 12, 20, 40]]], 'C5'], ['weight over limit', [[3, 3, 3], 10.5, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'M'], ['no fit', [[40, 3, 3], 1, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'NO_FIT'], ['cheap but bulky', [[3, 3, 3], 1, False, [['BIG', 30, 30, 30, 30, 40], ['SMALL', 10, 10, 10, 30, 60]]], 'SMALL'], ['rotated fit', [[4, 10, 8], 3, False, [['S', 12, 10, 6, 10, 50], ['M', 16, 12, 10, 20, 70], ['L', 24, 18, 14, 30, 95]]], 'S'], ['generated mix 41', [[11, 14, 6], 19, False, [['C0', 6, 12, 20, 30, 90], ['C1', 6, 6, 4, 20, 70]]], 'NO_FIT'], ['generated mix 49', [[5, 14, 9], 1, False, [['C0', 32, 20, 8, 5, 70], ['C1', 12, 8, 12, 5, 55], ['C2', 20, 6, 8, 5, 90], ['C3', 12, 20, 20, 30, 40], ['C4', 6, 12, 30, 20, 40], ['C5', 10, 16, 8, 5, 90]]], 'C3']]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated fit rule with uniform dunnage; no void-fill or multi-item cartonization. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-warehouse-slotting-carton-select-selection-key","generated_at":"2026-09-29T14:52:09.332027+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Cartonization picks the shipping box, which drives material cost and dimensional weight.","repair":"Rank fitting cartons by inner volume, then cost, then id.","root_cause":"The carton ranking key orders by cost first and ignores inner volume.","sha256":"022d5df128b72a358efb084c035cbad82badf3fc2cd1d0e59d8126773fa41f0e","title":"Carton selection: cheapest instead of smallest · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.733,"exit_code":1,"observations":[{"actual":"SMALL","check":"cheap but bulky","expected":"SMALL","passed":true},{"actual":"CUBE","check":"long thin carton","expected":"LONG","passed":false},{"actual":"S","check":"rotated fit","expected":"S","passed":true},{"actual":"S","check":"weight at limit","expected":"S","passed":true},{"actual":"SIOC","check":"sioc","expected":"SIOC","passed":true},{"actual":"A","check":"volume tie by cost","expected":"B","passed":false},{"actual":"M","check":"padding pushes to M","expected":"M","passed":true},{"actual":"NO_FIT","check":"generated mix 6","expected":"NO_FIT","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cheap but bulky\", \"actual\": \"SMALL\", \"expected\": \"SMALL\", \"passed\": true}, {\"check\": \"long thin carton\", \"actual\": \"CUBE\", \"expected\": \"LONG\", \"passed\": false}, {\"check\": \"rotated fit\", \"actual\": \"S\", \"expected\": \"S\", \"passed\": true}, {\"check\": \"weight at limit\", \"actual\": \"S\", \"expected\": \"S\", \"passed\": true}, {\"check\": \"sioc\", \"actual\": \"SIOC\", \"expected\": \"SIOC\", \"passed\": true}, {\"check\": \"volume tie by cost\", \"actual\": \"A\", \"expected\": \"B\", \"passed\": false}, {\"check\": \"padding pushes to M\", \"actual\": \"M\", \"expected\": \"M\", \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": \"NO_FIT\", \"expected\": \"NO_FIT\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.06,"exit_code":1,"observations":[{"actual":"BIG","check":"cheap but bulky","expected":"SMALL","passed":false},{"actual":"LONG","check":"long thin carton","expected":"LONG","passed":true},{"actual":"S","check":"rotated fit","expected":"S","passed":true},{"actual":"S","check":"weight at limit","expected":"S","passed":true},{"actual":"SIOC","check":"sioc","expected":"SIOC","passed":true},{"actual":"B","check":"volume tie by cost","expected":"B","passed":true},{"actual":"M","check":"padding pushes to M","expected":"M","passed":true},{"actual":"NO_FIT","check":"generated mix 6","expected":"NO_FIT","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cheap but bulky\", \"actual\": \"BIG\", \"expected\": \"SMALL\", \"passed\": false}, {\"check\": \"long thin carton\", \"actual\": \"LONG\", \"expected\": \"LONG\", \"passed\": true}, {\"check\": \"rotated fit\", \"actual\": \"S\", \"expected\": \"S\", \"passed\": true}, {\"check\": \"weight at limit\", \"actual\": \"S\", \"expected\": \"S\", \"passed\": true}, {\"check\": \"sioc\", \"actual\": \"SIOC\", \"expected\": \"SIOC\", \"passed\": true}, {\"check\": \"volume tie by cost\", \"actual\": \"B\", \"expected\": \"B\", \"passed\": true}, {\"check\": \"padding pushes to M\", \"actual\": \"M\", \"expected\": \"M\", \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": \"NO_FIT\", \"expected\": \"NO_FIT\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.353,"exit_code":0,"observations":[{"actual":"SMALL","check":"cheap but bulky","expected":"SMALL","passed":true},{"actual":"LONG","check":"long thin carton","expected":"LONG","passed":true},{"actual":"S","check":"rotated fit","expected":"S","passed":true},{"actual":"S","check":"weight at limit","expected":"S","passed":true},{"actual":"SIOC","check":"sioc","expected":"SIOC","passed":true},{"actual":"B","check":"volume tie by cost","expected":"B","passed":true},{"actual":"M","check":"padding pushes to M","expected":"M","passed":true},{"actual":"NO_FIT","check":"generated mix 6","expected":"NO_FIT","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"cheap but bulky\", \"actual\": \"SMALL\", \"expected\": \"SMALL\", \"passed\": true}, {\"check\": \"long thin carton\", \"actual\": \"LONG\", \"expected\": \"LONG\", \"passed\": true}, {\"check\": \"rotated fit\", \"actual\": \"S\", \"expected\": \"S\", \"passed\": true}, {\"check\": \"weight at limit\", \"actual\": \"S\", \"expected\": \"S\", \"passed\": true}, {\"check\": \"sioc\", \"actual\": \"SIOC\", \"expected\": \"SIOC\", \"passed\": true}, {\"check\": \"volume tie by cost\", \"actual\": \"B\", \"expected\": \"B\", \"passed\": true}, {\"check\": \"padding pushes to M\", \"actual\": \"M\", \"expected\": \"M\", \"passed\": true}, {\"check\": \"generated mix 6\", \"actual\": \"NO_FIT\", \"expected\": \"NO_FIT\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}