Tree search on packing classes

Objectives

This algorithm solves the feasibility objective, for a single bin (one bin type with one copy). It supports the rotations of the items and the eligibilities, but not the defects, the fixed items, the unloading constraints, the maximum weight and the resources.

It is an exact method: it either finds a packing of all the items, or proves that there is none. It is mainly useful to prove infeasibility: its running time doesn’t depend on the size of the bin.

Principle

It follows the exact algorithm of Fekete, Schepers and van der Veen (2007), based on the characterization of the packings by packing classes (Fekete and Schepers, 2004).

For each axis, the packing class of a packing is described by the pairs of items whose projections on the axis overlap. Two items don’t overlap iff their projections are disjoint along at least one axis. The search decides, for each axis and each pair of items, whether their projections overlap or are disjoint, but not which item comes first: a packing class represents many packings, and the positions are only computed at the end.

In the figure below, a packing and, for each axis, the graph of the pairs of items whose projections are disjoint along it. Each edge is oriented from the item which comes first along the axis. Every pair is an edge of at least one of the two graphs; B and D are disjoint along both axes.

../../_images/rectangle_tree_search_packing_classes_packing_class.svg

Characterization. Fekete and Schepers (2004) show that the items fit in the bin iff there are, for each axis, a set of pairs of items disjoint along it, such that:

  • every pair of items is disjoint along at least one axis;

  • for each axis, the graph of the pairs disjoint along it is a comparability graph: its edges can be oriented transitively (if \(a \to b\) and \(b \to c\), then \(a \to c\));

  • for each axis, the items of each clique of the graph of the pairs disjoint along it fit side by side in the length of the bin along the axis: the sum of their lengths along the axis is at most the length of the bin.

Given a transitive orientation, the position of an item along the axis is the total length of the longest chain of items before it. Two items disjoint along the axis are ordered by the orientation, so their projections don’t overlap; the chains of the orientation are cliques of the graph, so the items fit in the bin.

Conversely, the pairs disjoint along an axis in a packing satisfy these conditions, and the graph of the pairs which overlap along it is then an interval graph (the graph of the intersections of the projections of the items). The search only has to consider such packing classes, which allows stronger propagation (see the induced cycles below).

Strengths and weaknesses

The search reasons on the relative positions of the items, not on their coordinates, so its size doesn’t depend on the size of the bin. It is efficient when the infeasibility comes from the interactions between the items in two dimensions.

It has no reasoning on the coordinates of the items until the packing class is complete. When the infeasibility comes from the lengths of the items, which can’t be combined to fill the bin along an axis, it may explore many nodes. The Benders decomposition with contiguity, whose master problem decides the x-positions of the items, is then often faster; both algorithms are run in parallel in the exact mode.

Automatic selection

In the exact mode, it is run for the feasibility objective with a single bin, alongside the other algorithms. It can be selected with --use-tree-search-packing-classes 1 (CLI) or use_tree_search_packing_classes (Python).

It can also be used to solve the subproblems of the Benders decomposition, with --benders-decomposition-subproblem-use-tree-search-packing-classes 1 (CLI) or benders_decomposition_subproblem_use_tree_search_packing_classes (Python).

Source files

  • src/rectangle/tree_search_packing_classes.hpp, src/rectangle/tree_search_packing_classes.cpp: the algorithm

  • scripts/doc_figures/rectangle_tree_search_packing_classes.py: the figures of this page

References: