RULE / STACKING

Stacking in 3D packing

Stackability, stack counts, nesting height, density limits and stacking groups shape a legal column, checked at every level, not only the floor.

EXPRESSED WITHstackable · max_stacked_items · nesting_height · max_stack_density · stacking_group

Why it exists

Identical dimensions do not imply identical stacking policy, and the rule that only holds on the floor is the rule that breaks in the middle of the load. Stacking groups say which item classes may rest directly on which: an item that lists accepts_stacking_groups carries only those groups, and one that lists none carries any.

What a useful refusal looks like

The engine returns the rule that refused, the item it refused, and the measured value against the configured threshold. It also states how strongly that is backed: proven, observed, inferred, or unknown because a search limit was reached first.

See the fixtures for this rule
THE SAME REQUEST, WITH AND WITHOUT THE RULE

What this rule changes

One request, run twice by @packvium/engine while this page was built: once as written, once with only this rule taken out. The request diff is the whole input change; everything in the result diff follows from it.

WITHOUT THE RULEEverything fitted, proven best6/6
400×300×1200 · 100.0% used
carton × 6
Open in the Playground →
WITH THE RULEBest packing found3/6
400×300×1200 · 50.0% used
carton × 3
REFUSED · 3
carton#4Inferred

It needs another container and the inventory ran out container_inventory_exhausted

carton#5Inferred

It needs another container and the inventory ran out container_inventory_exhausted

carton#6Inferred

It needs another container and the inventory ran out container_inventory_exhausted

Open in the Playground →
REQUEST DIFF
  … unchanged lines: 9        },        "weight": "8 kg",+       "max_stacked_items": 2,        "keep_upright": true      }  … unchanged lines: 13
RESULT DIFF
  • statusEverything fitted, proven best → Best packing found
  • items packed6 → 3
  • carton#4packed → container_inventory_exhausted · inferred
  • carton#5packed → container_inventory_exhausted · inferred
  • carton#6packed → container_inventory_exhausted · inferred