box-stacks algorithms

See boxstacks for the input/output format and CLI usage of this solver.

Sequential one-dimensional / rectangle

This algorithm solves the feasibility and knapsack objectives with a single bin.

It decomposes the problem in two phases:

  1. Group items into stacks by solving a one-dimensional variable-sized bin packing problem (each stack is a “bin” whose length is limited by the stacking constraints).

  2. Pack the resulting stacks into the bin’s footprint by solving a rectangle knapsack problem.

The stacks generated in the first step contain exactly all the items.

../_images/boxstacks_sequential_onedimensional_rectangle.png

This decomposition is much cheaper than the full tree search below, and is designed for instances where axle/weight constraints don’t force a sparse packing.