Skip to content

Repository files navigation

BoxPacker

Build Status Scrutinizer Code Quality Download count Current version Documentation

An implementation of the 3D bin packing problem with weight as a fourth constraint: given items and a catalogue of boxes, how many cartons do you need, and what goes in each?

The same engine can also fill a single container (pallet, trailer, ocean box) as densely as possible and leave the rest unpacked.

Typical uses: e-commerce cartonization and shipping-cost calculation, warehouse box selection, and one-container load planning.

  • Your own Item/Box objects (no wrapper DTOs)
  • Rotation: any way up, keep-flat, or none
  • Weight limits and automatic weight balancing across cartons
  • Limited box stock, linked items, custom placement rules
  • Packed x/y/z coordinates and a 3D visualiser

Requires PHP 8.2+. composer require dvdoug/boxpacker

See documentation for more details.

License

BoxPacker is MIT-licensed.

About

4D bin packing / knapsack problem solver

Topics

Resources

Stars

658 stars

Watchers

38 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages