Palletization is harder than simple box packing because gravity exists. A solution is only valid if the resulting stack doesn't tip over when a forklift takes a corner too fast.
BinSolver addresses these challenges through algorithmic constraints that ensure load stability, weight distribution, and crush resistance.
1. Local Support Checks
Stability requires that every item has a solid foundation. BinSolver verifies the surface area beneath every placement using configurable parameters:
- minSupportRatio: (e.g., 0.8) Requires 80% of an item's bottom face to be in contact with items below.
- minSupportArea: Specifies a minimum absolute contact area in square units.
These checks prevent "overhangs" and ensure items are not placed precariously on edges.
2. Load Bearing & Crush Resistance
To prevent damage, the algorithm tracks vertical load accumulation. The maxLoad property defines how much weight an item can support.
Constraint Logic
If placing a new item increases the cumulative weight on any underlying item beyond its maxLoad, the placement is rejected, regardless of geometric fit.
3. Geometric Interlocking
Stable pallets often rely on interlocking patterns rather than simple columnar stacking. By mixing items of varying dimensions and rotating them appropriately, the solver creates structures where items bridge gaps in lower layers, tying the stack together effectively.
Implementation
The palletization feature offloads these calculations to the API. The following Python SDK example demonstrates how to define load constraints:
from binsolver import PackRequest, Item, Bin, StackingRules
items = [
# A heavy base item that can support weight
Item(
id="heavy-base", w=40, h=20, d=40, weight=50, quantity=4,
stacking=StackingRules(max_load=200)
),
# A fragile item that cannot support any weight
Item(
id="fragile-top", w=20, h=20, d=20, weight=5, quantity=10,
stacking=StackingRules(max_load=0)
)
]
bins = [
Bin(id="standard-pallet", w=48, h=72, d=40, max_weight=2500)
]
request = PackRequest(
items=items,
bins=bins,
objective="minBins"
) Here, "heavy-base" items can support significant weight, while "fragile-top" items have a maxLoad of 0, forcing them to the top of the stack.
Conclusion
Automated palletization ensures that physical constraints are respected mathematically, allowing warehouse teams to trust the generated packing plans without manual verification.