3D Bin Packing
Optimize 3D box placement in containers using WASM solver. Solves the 3D bin packing problem by placing boxes of various sizes into containers. Supports…
Solves the 3D bin packing problem by placing boxes of various sizes into containers. Supports multiple packing strategies (BLF, Extreme Points, GA, BRKGA, SA) with optional gravity and stability constraints.
What is 3D Bin Packing and How Is It Solved?
3D bin packing is the problem of placing a set of rectangular boxes into one or more containers to maximize space utilization. It extends the classical 2D packing problem by adding a height dimension, along with practical constraints like gravity (items must be supported from below) and stability (items must not topple).
Exact solutions are computationally infeasible for more than ~15 items. Heuristic strategies include: BLF (Bottom-Left-Fill) which places each item at the lowest, leftmost feasible position; Extreme Points which tracks candidate placement corners; and metaheuristics (GA, BRKGA, Simulated Annealing) that search for better packing sequences.
3D bin packing has applications in container loading, pallet building, truck/van loading, and e-commerce carton selection. Effective packing can improve container utilization from 60-70% (manual) to 80-90% (optimized), reducing the number of containers and shipments needed.
Formula: Utilization = Σ(box volumes) / Container Volume × 100% BLF: For each box, find position (x,y,z) with minimum y, then x, then z Extreme Points: Maintain set of candidate positions at container corners and box corners after each placement
Example Calculation
Container 600 × 400 × 300 mm. 5 boxes of 200 × 200 × 150 mm (volume = 6,000 cm³ each) and 3 boxes of 300 × 200 × 150 mm (volume = 9,000 cm³ each). Total box volume = 30,000 + 27,000 = 57,000 cm³. Container volume = 72,000 cm³. Best packing achieves 57,000/72,000 = 79.2% utilization.
When to Use This Calculator
- A logistics planner loading mixed-size boxes into containers or pallets and needing to maximize space utilization
- An e-commerce fulfillment center selecting the optimal carton size for multi-item orders to minimize void fill and shipping costs
- A warehouse engineer designing standard packing configurations for recurring shipments with varied box dimensions
- A freight coordinator verifying that all items in an order physically fit within the selected container before booking
Common Mistakes to Avoid
- Disabling gravity and stability constraints for unrealistic results — theoretical packing without physics produces utilization numbers that are impossible in practice; always enable gravity for actionable results
- Using the fastest algorithm when utilization matters — BLF is fast but can leave 10-15% more empty space than GA or BRKGA; for important loads, invest the extra computation time
- Ignoring box orientation restrictions — some products cannot be rotated or inverted (liquids, fragile electronics, items with 'this way up' markings); set rotation constraints accordingly
- Not accounting for box weight distribution — heavy boxes should go on the bottom for stability; placing light boxes underneath heavy ones can cause crushing and collapse during transport
How to Interpret Results
- Utilization above 80% with gravity constraints is excellent; 70-80% is good for mixed-size loads; below 60% suggests the box and container sizes are poorly matched
- If some boxes are listed as 'Not placed', either the container is too small, the weight limit is exceeded, or the remaining space cannot accommodate the box dimensions
- Compare strategies: if GA or SA achieves 5%+ higher utilization than BLF, the extra computation time pays for itself in reduced container count
Related Standards & References
- Bin packing is NP-hard (Garey & Johnson, Computers and Intractability, 1979) — exact optimization is intractable at scale, motivating heuristics
- Bottom-Left-Fill (BLF) and extreme-point placement — standard constructive heuristics for 3D container loading
- ISO 668 — series-1 freight container internal dimensions, the real-world bin sizes for export load planning
Frequently Asked Questions
Which packing strategy should I choose?
BLF is fastest and works well for uniform box sizes. Extreme Points gives better results for mixed sizes. For critical loads where utilization matters most, use GA or BRKGA with a 5-10 second time limit — they explore many packing sequences and typically achieve 5-10% higher utilization than greedy heuristics.
How do gravity and stability constraints affect utilization?
Enabling gravity ensures boxes rest on the floor or on top of other boxes (no floating). Stability requires sufficient support area underneath (typically 60-80% of the base must be supported). These constraints reduce theoretical utilization by 5-15% but are essential for real-world applications where unsupported boxes would fall during transport.