rectangle-guillotine algorithms

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

Tree search with maximal spaces

This algorithm solves the feasibility and knapsack objectives, and, through sequential feasibility, the open-dimension-x, open-dimension-y and bin-packing-with-leftovers objectives, with a single bin.

It generates unlimited-staged guillotine patterns.

It is a tree search algorithm where a block of items is packed at each stage, in the unused spaces of the bin, which are the leaves of the cut tree of the pattern and never overlap.

../_images/rectangleguillotine_tree_search_maximal_spaces_root_children.svg

See the detailed description.

Column generation strips

This algorithm solves the knapsack, open-dimension-x and open-dimension-y objectives.

It generates k-staged guillotine patterns. It is fast when k = 2. When k >= 4, it becomes impractical.

It is a tree search algorithm where a whole strip is packed at each stage. Contrary to the tree search maximal spaces algorithm, the strips are not generated beforehand, but dynamically in the nodes through column generation.

../_images/rectangleguillotine_column_generation_strips.svg

See the detailed description.

Sequential strips / one-dimensional

This algorithm solves the bin-packing and bin-packing-with-leftovers objectives.

It is a two-phase heuristic: it first generates strips containing all the items by solving a strip packing problem, then groups the strips into bins by solving a one-dimensional bin packing problem.

../_images/rectangleguillotine_sequential_strips_onedimensional.svg

See the detailed description.

Tree search hypergraph

This algorithm solves the feasibility and knapsack objectives exactly.

It generates unlimited-staged guillotine patterns.

This is a kind of tree search algorithm, but instead of generating children from one parent node, children are generated from two parent nodes: two blocks are combined either side by side or one above the other. The blocks are processed best first, guided by a dynamic programming bound, until the best block is proven optimal.

../_images/rectangleguillotine_tree_search_hypergraph_combinations.svg

See the detailed description.

Tree search hypergraph with infinite copies

This algorithm solves the feasibility and knapsack objectives.

It generates unlimited-staged guillotine patterns.

This algorithm works the same way as the tree search hypergraph algorithm, except that the item type quantities are not taken into account, so it can be solved by dynamic programming. Therefore, it is very fast, and it gives a bound, but the generated solution might be infeasible regarding the available number of item copies.

../_images/rectangleguillotine_tree_search_hypergraph_infinite_copies_combinations.svg

See the detailed description.

Dual feasible functions

This algorithm computes a bound for the bin-packing objective.

See rectangle