Professional Documents
Culture Documents
Pisinger, D., & Sigurd, M. (2007) - Using Decomposition Techniques and Constraint Programming For Solving The Two-Dimensional Bin-Packing Problem
Pisinger, D., & Sigurd, M. (2007) - Using Decomposition Techniques and Constraint Programming For Solving The Two-Dimensional Bin-Packing Problem
Pisinger, D., & Sigurd, M. (2007) - Using Decomposition Techniques and Constraint Programming For Solving The Two-Dimensional Bin-Packing Problem
T he two-dimensional bin-packing problem is the problem of orthogonally packing a given set of rectangles
into a minimum number of two-dimensional rectangular bins. The problem is -hard and very difficult
to solve in practice as no good mixed integer programming (MIP) formulation has been found for the packing
problem. We propose an algorithm based on the well-known Dantzig-Wolfe decomposition where the master
problem deals with the production constraints on the rectangles while the subproblem deals with the packing
of rectangles into a single bin. The latter problem is solved as a constraint-satisfaction problem (CSP), which
makes it possible to formulate a number of additional constraints that may be difficult to formulate as MIP
models. This includes guillotine-cutting requirements, relative positions, fixed positions and irregular bins. The
CSP approach uses forward propagation to prune inferior arrangements of rectangles. Unsuccessful attempts
to pack rectangles into a bin are brought back to the master model as valid inequalities. Hence, CSP is used
not only to solve the pricing problem but also to generate valid inequalities in a branch-and-cut system. Using
delayed column-generation, we obtain lower bounds of very good quality in reasonable time. In all instances
considered, we obtain similar or better bounds than previously published. Several instances with up to n = 100
rectangles are solved to optimality through the developed branch-and-price-and-cut algorithm.
Key words: programming, integer, algorithms, branch and bound; programming, integer, algorithms, cutting
plane; production-scheduling, cutting stock
History: Accepted by John Hooker, Area Editor for Constraint Programming and Optimization; received
December 2002; revised June 2004, July 2005; accepted January 2006.
only a small part of it needs to be considered to filled into the bins. After each iteration the prices are
prove optimality. The subproblem of finding a column adjusted and the algorithm is repeated.
with largest negative reduced cost to enter the master For a comprehensive overview of models and
model is known as the pricing problem. Expressing algorithms for two-dimensional cutting problems see
the negativeness of the reduced costs as a constraint, Belov (2003). Specialized algorithms for the 2DBPP
the pricing problem may be converted into a CSP. are in Martello and Vigo (1998) and Fekete and
Delayed column-generation only solves the master Schepers (2001), which present several lower bounds
problem to LP-optimality, so to find an IP-optimal on the solution value using, respectively, partition-
solution the approach needs to be combined with ing of rectangles in various classes and dual feasible
branch-and-bound, known as a branch-and-price algo- functions. Boschetti and Mingozzi (2003a) presented
rithm. a new lower bound that dominates the bounds of
Practical implementations of hybrid algorithms Martello and Vigo (1998) and Fekete and Schepers
using CSP for solving the subproblems have been (2001). Boschetti and Mingozzi (2003b) generalized
reported in Junker et al. (1999) (crew scheduling) these bounds to the case where rectangles may be
and Eremin and Wallace (2001) (minimal perturbation rotated 90 degrees. Considering the same variant of
scheduling problem). the problem, Dell’Amico et al. (2002) presented a
We present a hybrid algorithm for solving the lower bound and an exact branch-and-bound algo-
two-dimensional bin-packing problem (2DBPP). The rithm. Exact algorithms based on integer program-
2DBPP seeks to pack a set of n rectangles with ming were presented in Chen et al. (1995) for the
dimensions wi × hi into identical larger rectangular more general three-dimensional case. Padberg (2000)
bins with dimensions W × H using the fewest bins present an extended formulation and subjects it to
possible. The rectangles may not be rotated, they may polyhedral analysis, reaching a tighter LP relaxation.
not overlap, and they must be parallel to the sides A framework for deriving lower bounds through col-
of the bin. The 2DBPP is a straightforward general- umn-generation was implicitly presented in Gilmore
ization of the one-dimensional bin-packing problem and Gomory (1961, 1963) through a straightforward
(1DBPP) in which a set of weights have to be packed generalization of the techniques developed for the
into the minimum number of bins. Both problems are 1DBPP. However, few column-generation algorithms
known to be -hard in the strong sense and are also for the 2DBPP have been presented, perhaps because
in practice very difficult to solve (Martello and Vigo the pricing problem for 1DBPP is a simple knap-
1998). sack problem for which several good algorithms
Numerous heuristics for 2DBPP have been pre- are available (Kellerer et al. 2004), while the pric-
sented. Greedy heuristics based on concepts like next- ing problem of 2DBPP becomes a two-dimensional
fit, first-fit, best-fit, and their performance ratios are knapsack problem (2DKP) that is much harder to
surveyed in Lodi et al. (2002). The first local-search solve due to the geometrical structure. Hadjiconstanti-
algorithm was presented by Bengtsson (1982). Start- nou and Christofides (1995) studied the 2DKP but
ing with a packing of a subset of the rectangles, the were able to solve instances of only moderate size.
remaining rectangles are iteratively packed into the Fekete and Schepers (2007) presented a two-phase
bin having maximum unused space. Metaheuristics algorithm that first selects a subset of rectangles with
based on tabu search were presented in Lodi et al. large profits, and then tests feasibility through an
(1999), while Faroe et al. (2003) used the concept enumerative algorithm based on isomorphic pack-
of guided local search (Voudouris and Tsang 1999). ing classes. Caprara and Monaci (2004) presented a
Dowsland (1993) presented a simulated-annealing algo- 13 − -approximation algorithm for the 2DKP and
rithm for the strip-packing problem in two dimen- developed four exact algorithms based on various
sions, which tries to pack the rectangles into one enumeration schemes. Belov (2003) chose a different
containing rectangle. When a feasible packing has direction, restricting the 2DBPP to two-stage guillo-
been found, the height of the containing rectangle tine patterns that can be solved through dynamic
is reduced and a new feasible packing is sought. programming (see e.g. Hifi 2001). For this simpler
Monaci and Toth (2006) presented a heuristic based problem he was able to solve various problems from
on column-generation and set-covering. The algorithm the literature, using a branch-and-price framework.
works in two phases: first a large number of feasi- We present a hybrid algorithm for the 2DBPP based
ble single bin-packings are generated by four different on column-generation where the associated pricing
heuristics. Then the set-covering problem involving problem is solved through CSP. Following the idea of
the generated packings is solved by a heuristic algo- Fekete and Schepers (2007), the associated 2DKP is
rithm. Boschetti and Mingozzi (2003b) presented an split into a one-dimensional multi-constrained knap-
iterative greedy heuristic. Each rectangle is assigned a sack problem (1DMCKP) that selects a subset of rect-
price that is used to define the order of the rectangles angles, and a feasibility test checking whether the set
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
38 INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS
of rectangles fits into a single bin. The latter problem through column-generation are tighter than any pre-
is solved through CSP, which not only leads to a well- vious bounds and the developed algorithm can also
performing algorithm, but also adds flexibility to the solve larger problems to optimality than previously
packing patterns returned. Using CSP we are able to reported.
model constraints as guillotine-cutting requirements,
relative positions, fixed positions, and irregular bins.
Handling such constraints is necessary to solve real
2. Problem Formulation
Assume that a set =
1 n
of rectangles is
two-dimensional packing and cutting problems.
given, rectangle i having width wi and height hi .
An important property of lower bounds from col-
Infinitely many bins are available, each having
umn-generation is their ability to handle additional
width W and height H. Using the modeling technique
constraints from the branching process, resulting in
of Onodera et al. (1991) and Chen et al. (1995) we for-
tighter bounds as constraints are added. Except for
mulate the 2DBPP in ILP form as follows: the binary
the bounds of Fekete and Schepers (2007), most
variable lij is 1 iff rectangle i is located left of rect-
bounds return the same lower bound throughout the
angle j, and similarly bij is 1 iff rectangle i is located
branching process except if some special auxiliary
below rectangle j. The lower left coordinates of rect-
properties (like the closing of a bin) can be used to
angle i are xi yi while mi is the number of the bin
strengthen the bound.
containing rectangle i, and v is the number of bins
We also present a framework in which additional
used. Finally, the binary variable pij attains the value 1
constraints detected by the CSP subproblem can be
iff mi < mj .
brought back to the ancestor problem: unsuccessful
To ensure that no two rectangles overlap, the fol-
attempts to pack sets of rectangles into a single bin are
lowing inequalities must hold
added to the 1DMCKP as valid inequalities, result-
ing in a branch-and-cut system. Finally, we show how lij + lji + bij + bji + pij + pji ≥ 1 i j ∈ i < j (1)
Lagrangian relaxation can be seen as a third way of
decomposing the problem into a linear master prob- lij = 1 ⇒ xi + wi ≤ xj bij = 1 ⇒ yi + hi ≤ yj
lem and a subproblem solved through CSP, which (2)
pij = 1 ⇒ mi + 1 ≤ mj
makes it possible to terminate the column-generation
earlier in a branch-and-bound algorithm, avoiding No part of the rectangles may exceed the bin, hence
some tailing-off problems shown by Lasdon (1970). 0 ≤ xi ≤ W −wi and 0 ≤ yi ≤ H −hi . As v is the number
In the following section we formulate the prob- of bins used we have 1 ≤ mi ≤ v.
lem formally as an integer-linear model. Unfortu- The 2DBPP can now be formulated as the following
nately, the LP-relaxation of the model leads to a lower MIP:
bound that is quite weak, so the model is difficult
to solve by general MIP solvers. A tighter formula- min v
tion based on Dantzig-Wolfe decomposition is hence pro-
s.t. lij + lji + bij + bji + pij + pji ≥ 1 i j ∈ i < j
posed in §2.1. The master problem is a set-covering
problem, solved through delayed column-generation as xi − xj + Wlij ≤ W − wi i j ∈
described in §3, while the pricing problem becomes a
two-dimensional knapsack problem. In §4 the pricing yi − yj + Hbij ≤ H − hi i j ∈
problem is split into a 1DMCKP selecting the most
profitable rectangles to pack, and a two-dimensional mi − mj + npij ≤ n − 1 i j ∈
packing problem in the decision form, and §5 shows
0 ≤ xi ≤ W − wi i∈ (3)
how the decision problem may be solved through a
combination of constraint programming and branch- 0 ≤ y i ≤ H − hi i∈
and-cut. Section 6 describes a heuristic algorithm for
solving the pricing problem, and §7 shows how we 1 ≤ mi ≤ v i∈
avoid tailing-off problems in the column-generation.
Section 8 describes how an initial feasible solu- lij bij pij ∈
0 1
i j ∈
tion may be obtained through heuristic methods,
x i yi ∈ i∈
and how the primal bound is improved during
the search. Section 9 describes the branch-and-price mi v ∈ i ∈
algorithm. We conclude with an extensive compu-
tational study in §10 where the developed branch- The model has 3n2 binary variables and 3n continuous
and-price algorithm is tested on a set of randomly variables. The number of constraints is 7n2 /2 + 6n.
generated test instances from Berkey and Wang (1987) Unfortunately the formulation contains several sym-
and Martello and Vigo (1998). The bounds obtained metric solutions so it is very difficult to solve by
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS 39
ordinary MIP solvers. To break some of the symme- infeasible, but infeasible branch-and-bound nodes can
tries we add the additional constraints mi ≤ i, i ∈ safely be pruned).
demanding that rectangle 1 is placed in the first bin, In every iteration of the column-generation we will
rectangle 2 is placed in one of the two first bins, etc. solve the RMP. Let i , i ∈ be the dual variables
However, the model remains difficult to solve. associated with the current solution xp to the RMP.
The dual linear program of (5) is
2.1. Set-Covering Model
p
If is the set of all feasible packings of a single max i i i ≤ 1 ∀ p ∈ i ≥ 0 ∀ i ∈ (7)
bin, we may reformulate the 2DBPP as a set-covering r∈ r∈
where v ∈
left right below above
. The three prop- 1
agation rules are applied whenever a realtion rij has 8
11
11
9
been selected, i.e., for a fixed pair of indices i, j. 2 12
6 8
This means that (12) can be evaluated in constant 12 5 4
7
time, and (13)–(14) can be evaluated in On time. All 5
9
relations and domain reductions obtained by the for- 7 2 2
6
programming, which unfortunately is difficult to gen- a one-dimensional 0-1 knapsack problem (1DKPP) of
eralize to more stages. the form
To handle this constraint we maintain a counter for
each subset S, saying how many times the direction max pi xi wi hi xi ≤ WH xi ∈
0 1
i ∈ (15)
has been changed before reaching the current subset. i∈ i∈
check whether xj > xj , and return false in this case. to the knapsack problem (15). The inequality cuts
Otherwise we set xj = xj and continue evaluating (10) off the present solution to (15) and it can easily be
for the succeeding rectangles. A similar approach is shown that repeating the above process will lead to
used for the y coordinates. an integer optimal solution to the pricing problem in
• Irregularities in the Bins: One or more of the the end. The set of all generated valid inequalities is
bins available may have some part of the area defec- denoted . In this way we get the one-dimensional
tive. This is easily handled by placing a dummy rect- multi-constrained knapsack problem (1DMCKP) of
angle with fixed position at the defective position. the form
If more than one bin is defective, additional con-
straints should be added to the model such that the max pi xi
i∈
two dummy rectangles are not placed in the same
bin. If more than one area of the bin is defective, s.t. wi hi xi ≤ WH
an additional constraint is added to ensure that the i∈ (17)
corresponding dummy rectangles are placed in the
xi ≤ C − 1 C ∈
same bin. i∈C
• Border Positions: It may be demanded that a
xi ∈
0 1
i ∈
given rectangle j be placed at the border of a bin
without specifying the actual position. The applica- This problem may be solved through a general
tion may demand that the rectangle is easily acces- MIP solver but computational experiments showed
sible, or that it should interact outwardly (e.g., in that this was inefficient when the number of con-
VLSI design where some modules must be wired to straints became very large. Hence a specialized
the surroundings). This is handled by the additional branch-and-bound algorithm was developed, which
constraint sorts the items according to non-increasing efficien-
cies pi /wi hi , and repeatedly branches on the most
∀ i ∈ rij
= left or efficient free variable xi . Upper bounds are derived
∀ i ∈ rij
= right or from the LP relaxation of (15) in which both the
integrality constraints and the cardinality constraints
∀ i ∈ rij
= below or have been relaxed. Backtracking occurs whenever the
∀ i ∈ rij
= above upper bound does not exceed the current incumbent
solution, or when some of the constraints are violated.
the constraint is checked in each iteration using time Unfortunately, the branch-and-cut process may con-
On for each rectangle j. verge very slowly if the generated inequalities in
are weak. Hence, instead of adding inequalities of the
5.2. Solving the Pricing Problem Through form (16) whenever the rectangles D do not fit into
CSP and Branch-and-Cut the bin, we would like to identify the smallest subset
As mentioned in §4 we split the pricing problem (8) D ⊆ D that does notfit into the bin, giving rise to
into a one-dimensional optimization problem and a the tighter inequality i∈D xi ≤ D − 1. The latter sep-
two-dimensional packing-decision problem. The one- aration problem may be solved through a modifica-
dimensional optimization chooses a subset of the tion of the CSP algorithm to avoid aggressive forward
rectangles with the largest profit sum subject to a restric- propagation. The disadvantage of forward propaga-
tion on the available area. This model is recognized as tion is that information from all rectangles i ∈ D is
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS 43
generation procedure, and only when it fails to find the heuristic pricing algorithm. In every step of the
a single bin packing with negative reduced cost will column-generation procedure, we successively run
we apply the exact 2DKP algorithm from §4. one of the eight variants until a single bin-packing
The heuristic pricing algorithm is based on the with negative reduced cost is found. Only if none of
greedy paradigm. It starts with an empty bin and the eight variants produce such a packing is the exact
greedily places rectangles in the bin until no more pricing algorithm applied. The randomized heuristic
rectangles can be placed. The algorithm keeps track pricing algorithms may be run several times before
of all the free-space rectangles in the bin. The free-space applying the exact pricing algorithm.
rectangles comprise a collection of maximal rectan-
gles f satisfying f ∩ i = for all i ∈ . Maximal means 7. Early Termination of Column
that a free-space rectangle is bounded on all sides by Generation
rectangles or the bin sides. Notice that the free-space
Delayed column-generation has the disadvantage that
rectangles may overlap and that f = W × H \ i. the last pricing problems may have an objective value
In every iteration a rectangle is placed in one of the close to 0. This is known as the tailing-off problem,
free-space rectangles where it fits and the set of new which results in a huge number of columns being
free-space rectangles is determined for the bin. Two generated without changing the optimal value of the
different strategies for selecting a rectangle to place restricted master problem significantly. In general, if
and two different strategies for selecting a free-space the column-generation is terminated before comple-
have been considered. tion, this will result in a non-valid lower bound.
Lasdon (1970) presents a bound on the optimal objec-
6.1. Choosing a Rectangle
tive value of the full master problem, which can be
The objective of the heuristic pricing algorithm is
computed in constant time given the optimal objective
to determine a two-dimensional packing that mini-
value of the current master LP and an optimal solu-
mizes the corresponding reduced cost. Since we are
tion to the pricing problem.
interested only in packings with negative reduced
If m is an upper bound on the optimal number of
cost, we can discard all rectangles with nonnega-
bins, and z is the optimal objective value of the cur-
tive reduced price. A natural, greedy strategy is thus
rent restricted master LP and c is the reduced cost
to add the rectangle with lowest reduced price/area
of the minimum reduced-cost column, we get the fol-
ratio in every iteration, since this gives us the lowest
lowing lower bound on the optimal objective value
reduced cost compared to the area. The above strat-
of (5):
egy may tend to add smaller rectangles before larger
a = z + mc (18)
ones, since the small rectangles may often have a bet-
ter price/area ratio. This may, however, prevent the If a = m we may terminate the column-generation,
larger rectangles from being added, since there may knowing that the present upper bound equals the
not be room for them later on. Another strategy is lower bound. The objective value of the restricted
to disregard the area of the rectangles and simply master problem is available in every iteration, but
choose the rectangle with the lowest reduced price in the minimum reduced cost is available only when we
every iteration. Randomized versions of both strate- solve the pricing problem with the exact algorithm.
gies are also considered. In the randomized versions, Hence the lower bound can only be computed in iter-
the probability of choosing a rectangle is proportional ations where the exact pricing algorithm is used.
to the reduced price/area ratio, or the reduced price
of the rectangle. 8. The Primal Bound
Column-generation provides fairly tight lower bounds
6.2. Choosing a Free-Space Rectangle for the optimal solution to 2DBPP. To bound the opti-
Having chosen a rectangle i to place into the bin, we mal solution from above we start out by running a
need to choose a free-space rectangle to place it in. heuristic algorithm that finds very high-quality solu-
Two strategies have been considered: (1) Smallest Rect- tions. Although the column-generation in principle
angle. Choose the smallest free-space rectangle f that can start with the identity matrix as initial columns,
can hold i. (2) Maximize Largest. Choose the free-space our computational experiments showed that the com-
rectangle f that maximizes the largest free-space rect- putational effort could be decreased considerably by
angle in the bin after placing i in f . feeding the algorithm with a near-optimal set of
If no free-space rectangle exists that can hold the columns. Hence a state-of-the-art heuristic from Faroe
chosen rectangle i, we discard i and choose another et al. (2003) was chosen to provide the initial columns
rectangle. When there are no more rectangles left, the as well as an initial upper bound.
heuristic terminates. The heuristic, based on guided local search (GLS) as
Combining the strategies for choosing a rectangle described in Voudouris (1997); Voudouris and Tsang
and free-space rectangle we obtain eight variants of (1999), attempt to pack all the rectangles into a fixed
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS 45
I 20 10 304 418 655 124 01 272 74 01 71 13 1 01
I 40 10 452 1113 4744 5 05 535 376 73 129 08 11 04
I 60 10 2022 1447 2345 28 1711 802 473 157 15 18 43 0
I 80 10 207 1242 13906 12 72 1076 134 32 0 21 07 0
I 100 10 1199 4918 23105 12 550 1324 2832 762 0 42 139 0
II 20 10 00 21 0 1 00 21 0 0 0 0 0 0
II 40 10 1610 2172 23 1 1510 42 1466 285 01 0 02 0
II 60 10 06 625 0 1 00 625 0 0 0 0 0 0
II 80 9 3614 3016 704 12 3533 832 154 644 0 04 0 0
II 100 10 03 978 0 1 00 978 0 0 0 0 0 0
III 20 10 399 474 477 1 02 251 186 37 0 01 06 0
III 40 10 3060 1513 13593 46 1972 494 578 332 109 08 05 02
III 60 10 5176 282 28476 1 4674 74 1396 673 11 02 37 0
III 80 10 3947 3537 24561 1 3435 991 1921 614 11 08 64 0
III 100 9 4818 8531 28749 1 4069 1227 5494 181 0 41 11 0
IV 20 10 00 21 0 1 00 21 0 0 0 0 0 0
IV 40 10 01 419 0 1 00 419 0 0 0 0 0 0
IV 60 8 7202 3885 9683 1 7051 625 2085 1175 0 0 06 0
IV 80 7 10801 7785 21006 12 10653 833 4919 2033 0 04 08 0
IV 100 9 3655 4628 5108 1 3528 1038 2532 1058 0 04 0 0
V 20 10 500 389 501 1 01 265 111 13 0 02 04 0
V 40 10 375 1141 6093 1 74 519 47 149 03 15 22 0
V 60 9 4029 2055 20059 1 3510 781 991 281 02 22 26 0
V 80 8 8016 309 60289 1 7291 1047 1462 578 03 28 45 02
V 100 7 16145 6981 109306 86 11910 1286 3827 1815 53 26 155 04
VI 20 10 00 21 0 1 00 21 0 0 0 0 0 0
VI 40 10 9682 5031 97 1 9324 418 3829 78 04 0 06 0
VI 60 9 3604 2196 4003 12 3516 622 958 616 0 0 03 0
VI 80 10 05 83 0 1 00 83 0 0 0 0 0 0
VI 100 8 7230 7235 10752 1 7196 1034 4285 1916 0 08 0 0
VII 20 10 205 369 1202 1 06 255 7 44 0 0 06 0
VII 40 8 10996 1307 28324 22 10516 513 417 365 12 04 29 02
VII 60 7 14608 2979 69104 14 14021 761 1253 965 0 33 64 0
VII 80 2 28923 4934 152631 14 28073 1033 1983 1918 0 55 127 0
VII 100 7 11193 4271 45882 12 10647 1275 1815 1181 0 49 115 0
VIII 20 10 302 366 741 1 03 258 72 36 0 01 04 0
VIII 40 9 3707 799 7731 1 3502 514 162 123 0 06 19 0
VIII 60 7 10908 1984 55493 14 10535 763 554 667 0 1 57 0
VIII 80 9 3872 2197 25859 1 3520 1026 756 415 0 11 34 0
VIII 100 6 18254 4717 123398 14 17586 1281 1947 1489 0 54 119 0
IX 20 10 00 343 1287 1 00 343 0 0 0 0 0 0
IX 40 10 304 70 5297 1 02 678 19 03 0 0 0 0
IX 60 10 216 1051 12582 1 04 1037 13 01 0 0 0 0
IX 80 10 345 1404 2204 1 16 1377 27 0 0 0 0 0
IX 100 10 301 173 33607 14 23 1695 31 02 02 0 0 0
X 20 10 464 613 636 1 229 242 183 186 02 0 03 0
X 40 9 3812 1776 637 1 3523 474 927 374 01 0 14 0
X 60 7 11044 5436 31725 12 10554 702 3184 155 0 05 48 0
X 80 3 25210 1166 110972 16 24546 93 7259 3471 0 02 93 0
X 100 2 28886 17985 139281 16 28108 1161 11661 5163 0 5 82 0
Avg. 8.8 5432 2914 25797 17 5020 745 1485 676 09 11 30 00
1
Problem class; 2 no. of items; 3 no. of problems solved to optimality; 4 avg. CPU time used; 5 avg. no. of columns generated; 6 avg. no. of cuts generated;
7
avg. no. of branch-and-bound nodes; 8 avg. CPU time used for computing the lower bound in the root node; 9 avg. no. of columns generated by the initial
GLS algorithm + slack columns; 10 no. of columns generated by the deterministic heuristic pricing algorithm; 11 no. of columns generated by the randomized
heuristic pricing algorithm; 12 no. of columns generated by the exact pricing algorithm; 13 no. of columns in the optimal solution generated by the initial guided
local search algorithm; 14 no. of columns in the optimal solution generated by the heuristic pricing algorithm; 15 no. of columns in the optimal solution generated
by the exact pricing algorithm.
number m of bins. A feasible packing will have no search iteration until the algorithm is trapped in a
overlap between rectangles, so the objective function local minimum. GLS then selects a pair of rectangles
minimizes the sum of overlaps between each pair of with the overlap feature, assigns a punishment to this
rectangles. The neighborhood of the local search algo- feature, and re-optimizes the problem with respect to
rithm is based on selecting a rectangle and sliding it a modified objective function. To minimize the num-
either horizontally, vertically or moving it to another ber of bins used, GLS is called for decreasing values
bin. The GLS framework is based on a “hill-climbing” of m until a feasible packing cannot be found within
approach that repeatedly performs an improving local a given number of iterations.
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
46 INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS
During the execution of the branch-and-price algo- make sure that the branching scheme works well with
rithm we may improve the primal bound. During col- the pricing algorithm.
umn-generation numerous instances of the restricted We use Ryan-Foster branching (Ryan and Foster
master problem (6) are solved to LP-optimality. Any IP 1981): choose two rectangles i and j, i
= j. Divide
solution to this problem provides a valid solution for the solution space into two branches. On one branch
the 2DBPP and may be used for tightening the upper we demand that rectangles i and j may not be in
bound. The IP variant of (6) may be solved by CPLEX the same bin, and on the other branch we demand
(ILOG 2000), but since it is quite time consuming, we that i and j have to be in the same bin. By apply-
only solve the problem to integer optimality every ing the branching rule we get two new subprob-
M3 iterations. Experimentally we found that M3 = 50 lems in the branch-and-bound tree. The first branch
p p
works well. corresponds to adding the constraint p∈ xp i j = 0
to the model, and the second branchp corresponds to
p
adding the two constraints p∈ xp i 1 − j = 0 and
9. Branching p p
p∈ xp 1 − i j = 0 to the model.
We have shown how to compute a lower bound for When solving the pricing problem in a subprob-
the 2DBPP using LP column-generation and solv- lem of the branch-and-bound tree, the packings pro-
ing the pricing problem with constraint program- duced by the pricing algorithm must comply with
ming. The lower bound is the optimal solution to all the branching constraints of the subproblem.
the LP relaxation of the 2DBPP. The optimal solution As described in §4, the pricing algorithm consists
to the LP may incidently have all integer values, in of relaxing the 2DKP to a 1DMCKP and check-
which case it is an optimal solution to our IP. Oth- ing whether the associated solution is valid in two
erwise, an optimal IP solution must be determined dimensions.
through branch and bound. If the branching constraint demands that rectangles i
In order to obtain optimal integral solutions we ap- and j have to be in the same bin, we simply merge
ply a branching rule that excludes fractional solutions. the two rectangles into one rectangle k when solving
As always, when designing a branch-and-bound algo- the 1DMCKP, while the two rectangles are consid-
rithm, we want a branching scheme that divides the ered as separate when solving the CSP2D problem.
solution space fairly evenly to ensure progress in the If, on the other hand, i and j have to be in differ-
algorithm. But when designing a branching scheme ent bins, we simply add the inequality xi + xj ≤ 1
for a branch-and-price algorithm, we also have to to the 1DMCKP. Observe that this inequality is only
I 50 84 183 1317 4.5 47 80.2 778 20.5 4.3 2.0 4.2 0.1
II 49 78 179 1304 2.2 47 78.9 763 20.5 2.9 1.8 4.0 0.1
III 49 101 200 1210 1.4 77 76.6 981 24.7 0.3 1.6 3.8 0.0
IV 44 60 183 741 1.1 43 73.1 886 21.6 0.0 1.3 3.0 0.0
V 44 129 219 603 1.1 112 68.2 1168 33.8 0.0 0.9 2.8 0.0
VI 47 105 140 141 1.0 101 61.3 601 18.6 0.0 0.1 0.0 0.0
VII 34 113 145 151 1.0 101 62.1 638 19.3 0.0 0.1 0.2 0.0
VIII 41 142 132 422 1.8 110 63.6 461 20.3 2.2 0.3 0.2 0.0
IX 50 245 176 992 1.8 204 65.9 740 33.7 2.4 0.3 1.0 0.0
X 31 252 186 1342 1.7 202 69.1 816 33.1 2.6 0.4 2.2 0.0
I 20 64 59 67 67 69 70 71 71 71 71
I 40 120 117 128 128 130 131 134 134 134 134
I 60 185 178 193 193 197 197 200 200 200 200
I 80 253 247 269 269 273 274 275 275 275 276
I 100 305 286 314 314 317 317 317 317 317 319
II 20 10 00 10 10 10 10 10 10 10 10
II 40 19 00 19 19 19 19 19 19 20 20
II 60 25 00 25 25 25 25 25 25 25 26
II 80 31 00 31 31 31 31 31 32 31 33
II 100 38 00 38 38 39 39 39 39 39 40
III 20 44 44 46 46 47 49 51 51 51 51
III 40 82 82 88 88 92 92 93 93 93 94
III 60 125 127 133 133 134 136 139 139 139 139
III 80 173 176 184 184 187 187 189 189 189 190
III 100 205 210 217 217 219 221 222 223 222 224
IV 20 10 00 10 10 10 10 10 10 10 10
IV 40 19 00 19 19 19 19 19 19 19 19
IV 60 23 00 23 23 23 23 23 25 23 25
IV 80 30 00 30 30 30 30 30 33 30 33
IV 100 37 00 37 37 37 37 37 38 37 38
V 20 54 59 60 60 60 65 65 65 65 65
V 40 101 110 114 114 116 116 119 119 119 119
V 60 157 167 172 172 177 178 179 180 180 180
V 80 215 232 236 236 240 241 245 247 246 247
V 100 259 271 273 273 276 279 279 282 279 282
VI 20 10 00 10 10 10 10 10 10 10 10
VI 40 15 00 15 15 15 15 17 18 17 19
VI 60 21 00 21 21 21 21 21 22 21 22
VI 80 30 00 30 30 30 30 30 30 30 30
VI 100 32 00 32 32 32 32 32 34 32 34
VII 20 47 51 53 53 53 54 55 55 55 55
VII 40 97 104 108 108 108 109 109 111 109 111
VII 60 140 149 155 155 155 156 155 158 155 158
VII 80 197 217 223 223 223 224 224 232 224 232
VII 100 238 257 268 268 268 269 269 272 269 272
VIII 20 48 53 55 55 55 58 58 58 58 58
VIII 40 96 102 111 111 111 112 112 113 112 113
VIII 60 141 153 159 159 159 159 159 162 159 161
VIII 80 195 213 222 222 222 223 223 224 223 224
VIII 100 241 265 273 273 273 274 274 278 274 279
IX 20 94 143 143 143 143 143 143 143 143 143
IX 40 180 274 274 274 275 278 278 278 278 278
IX 60 276 433 433 433 435 437 437 437 437 437
IX 80 371 569 569 569 574 577 577 577 577 577
IX 100 450 689 689 689 693 695 695 695 695 695
X 20 38 34 40 40 40 40 42 42 42 42
X 40 69 61 71 71 72 72 73 74 73 74
X 60 94 78 97 97 97 97 98 101 98 101
X 80 122 98 123 123 123 123 123 130 123 131
X 100 153 119 153 153 153 153 153 161 155 165
Sum 5979 6427 7063 7063 7117 7157 7188 7250 7191 7266
Notes. Lower bounds: L0 , L1 , L2 , L4 (Martello and Vigo 1998); FS (Fekete and Schepers 2001); BM (Boschetti and Mingozzi 2003a); and the
Column-Generation Lower Bound in this paper.
1
The best-known upper bound; 2 column-generation lower bounds for solutions with guillotine constraints; 3 the best-known upper bound
for solutions with guillotine constraints.
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
48 INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS
Table 5 Summarized Lower Bound Comparisons for the Ten Problem Table 6 Summarized Lower Bound Calculations for the Five Problem
Classes Sizes
I 927 887 971 971 986 989 997 997 20 419 443 494 494 497 509 515 515
II 123 00 123 123 124 124 124 125 40 798 850 947 947 957 963 973 978
III 629 639 668 668 679 685 694 695 60 1187 1285 1411 1411 1423 1429 1436 1449
IV 119 00 119 119 119 119 119 125 80 1617 1752 1917 1917 1933 1940 1947 1969
V 786 839 855 855 869 879 887 893 100 1958 2097 2294 2294 2307 2316 2317 2339
VI 108 00 108 108 108 108 110 114
VII 719 778 807 807 807 812 812 828 Notes. Lower bounds: L0 , L1 , L2 , L4 (Martello, Vigo); FS (Fekete, Schepers);
VIII 721 786 820 820 820 826 826 835 BM (Boschetti, Mingozzi); and the Column-Generation Lower Bound in this
IX 1371 2108 2108 2108 2120 2130 2130 2130 paper.
1
X 476 390 484 484 485 485 489 508 Best-known upper bound.
I 20 10 25 932 771 162 03 299 461 53 119 12 59 0
I 40 10 779 2252 11577 52 673 592 1305 266 89 34 96 04
I 60 10 4222 3764 45643 52 3745 902 2342 475 45 27 166 07
I 80 9 3940 6486 3150 12904 150 1209 2573 219 2485 39 208 29
I 100 8 9365 8657 69799 6886 5846 1492 4935 89 134 22 279 18
II 20 10 08 21 0 1 00 21 0 0 0 0 0 0
II 40 10 2918 145 08 1 2659 42 794 233 03 0 02 0
II 60 6 14602 5947 8123 18 14249 629 3388 193 0 0 12 0
II 80 1 32418 1869 29031 28 31641 84 11944 5906 0 0 36 0
II 100 3 25293 19451 25826 24 24301 1046 12925 548 0 1 24 0
III 20 10 42 1098 621 28 04 269 694 126 09 09 4 02
III 40 9 3836 3259 18995 64 722 537 1943 69 89 04 8 1
III 60 9 6992 7248 44586 2878 3180 816 3337 754 2341 08 113 19
III 80 9 5849 6907 46735 72 1836 1108 4693 1036 7 02 178 1
III 100 7 11730 11616 7138 42 7772 136 7991 2249 16 06 215 04
IV 20 10 00 21 0 1 00 21 0 0 0 0 0 0
IV 40 10 554 1554 0 1 09 42 1079 55 0 0 01 0
IV 60 4 21988 9427 9884 18 20682 629 5468 333 0 0 18 0
IV 80 0 36000 22425 26205 28 33829 84 14474 7111 0 08 32 0
IV 100 3 25574 22174 1633 22 22947 1044 14531 6599 0 18 14 0
V 20 10 13 782 583 24 02 289 452 32 09 16 41 03
V 40 10 144 2334 6909 4 60 573 1457 255 49 18 96 05
V 60 10 3437 3982 32459 10 2396 878 2588 373 143 18 152 1
V 80 9 7453 4866 61139 16 7307 1172 3124 569 01 18 229 0
V 100 7 12955 9555 98968 76 8073 1445 6338 1703 69 17 257 08
VI 20 10 01 21 0 1 00 21 0 0 0 0 0 0
VI 40 8 12718 5366 78 1 12082 419 3871 1046 3 0 08 0
VI 60 6 18137 9602 5519 16 16307 525 6494 2582 01 0 17 0
VI 80 6 14990 9647 8551 18 13432 834 5716 3097 0 0 16 0
VI 100 0 36000 30546 15774 24 32104 1042 20412 9092 0 16 26 0
VII 20 10 08 86 1366 22 07 275 449 117 19 01 52 02
VII 40 8 10808 2406 27815 14 10806 56 1193 653 0 07 104 0
VII 60 7 10830 4162 47746 12 10812 843 2037 1282 0 05 153 0
VII 80 2 28813 6047 156991 14 28809 1145 2813 2089 0 05 227 0
VII 100 7 11023 690 45035 12 10971 1406 3743 1751 0 0 272 0
VIII 20 10 139 788 3494 18 135 27 309 209 0 04 44 0
VIII 40 9 7218 2115 16642 12 7202 561 1128 426 0 05 108 0
VIII 60 8 14436 3799 72029 16 14414 826 1828 1145 0 03 158 0
VIII 80 9 3697 4794 25971 1 3643 1128 2712 954 0 03 221 0
VIII 100 5 18190 7118 130505 14 18116 1392 3614 2112 0 08 271 0
IX 20 10 01 392 1287 16 01 356 36 0 0 59 18 0
IX 40 10 06 903 5297 16 05 718 172 13 0 227 51 0
IX 60 10 22 1276 12582 24 20 1082 181 13 0 381 56 0
IX 80 10 53 1716 2204 2 51 1436 262 18 0 496 81 0
IX 100 10 160 2255 34647 36 108 1793 439 15 08 584 11 01
X 20 10 85 1151 642 3 32 254 624 255 18 03 33 02
X 40 9 3830 4266 9602 12 3600 507 2941 817 01 01 73 0
X 60 7 11391 9275 38083 12 10796 746 6141 2388 0 0 101 0
X 80 2 29217 16264 126213 18 28316 996 11012 4256 0 0 131 0
X 100 0 36000 22366 17622 24 34837 1247 14976 6143 0 0 165 0
Avg. 7.5 9958 6590 32824 480 8974 796 4039 1616 139 42 97 03
Martello and Vigo (1998), and by our approach. The has the greatest advantage over BM for these problem
column-generation lower bounds are greater than or classes since neither L0 nor bounding by considering
equal to BM in all cases, but the improvement varies the large items yields a tight bound in this case.
with the problem classes. For problem classes II, IV, From the summary of the lower bounds presented
VII, VIII, and IX the two lower bounds are very sim- in the bottom line of Table 4 we get a rough overview
ilar. The largest improvement of the F S lower bound of the quality of the different lower bounds. The
is for classes I, III, and V with an evenly distributed column-generation lower bound is on average 33%
amount of small, medium, and large items. It seems closer to UB than the previously best lower bound
reasonable that the column-generation lower bound BM. The improvement of the column-generation
Pisinger and Sigurd: Using Decomposition Techniques and Constraint Programming for Solving the Two-Dimensional Bin-Packing Problem
50 INFORMS Journal on Computing 19(1), pp. 36–51, © 2007 INFORMS
Dell’Amico, M., S. Martello, D. Vigo. 2002. A lower bound for the Kellerer, H., U. Pferschy, D. Pisinger. 2004. Knapsack Problems.
non-oriented two-dimensional bin packing problem. Discrete Springer, Berlin, Germany.
Appl. Math. 118 13–24. Lasdon, L. S. 1970. Optimization Theory for Large Systems. Macmillan,
Dowsland, K. 1993. Some experiments with simulated annealing London, UK.
techniques for packing problems. Eur. J. Oper. Res. 68 389–399. Lodi, A., S. Martello, D. Vigo. 1999. Heuristic and metaheuristic
Eremin, A., M. Wallace. 2001. Hybrid Benders decomposition algo- approaches for a class of two-dimensional bin packing prob-
rithms in constraint logic programming. T. Walsh, ed. CP 2001, lems. INFORMS J. Comput. 11 345–357.
Lecture Notes in Computer Science, Vol. 2239. Springer, Berlin,
Lodi, A., S. Martello, D. Vigo. 2002. Recent advances on two-
Germany, 1–15.
dimensional bin packing problems. Discrete Appl. Math. 123
Faroe, O., D. Pisinger, M. Zachariasen. 2003. Guided local search 379–396.
for the three-dimensional bin packing problem. INFORMS
Martello, S., D. Vigo. 1998. Exact solution of the two-dimensional
J. Comput. 15 267–283.
finite bin packing problem. Management Sci. 44 388–399.
Fekete, Sandor P., Joerg Schepers. 2001. New classes of lower
bounds for the bin packing problem. Math. Programming 91 11– Martello, S., D. Pisinger, D. Vigo, Edgar den Boef, Jan Korst.
31. 2007. Algorithms for general and robot-packable variants of
the three-dimensional bin packing problem. ACM Trans. Math.
Fekete, Sandor P., Joerg Schepers, Jan C. van der Veen. 2007. An Software 33(1).
exact algorithm for higher-dimensional orthogonal packing.
Oper. Res. Forthcoming. Monaci, M., P. Toth 2006. A set-covering based heuristic approach
for bin-packing problems. INFORMS J. Comput. 18(1) 71–85.
Gilmore, P. C., R. E. Gomory. 1961. A linear programming approach
to the cutting stock problem. Oper. Res. 9 849–859. Onodera, H., Y. Taniguchi, K. Tamaru. 1991. Branch-and-bound
placement for building block layout. Proc. 28th ACM/IEEE
Gilmore, P. C., R. E. Gomory. 1963. A linear programming approach
Design Automation Conf., ACM Press, New York, 433–439.
to the cutting stock problem—Part II. Oper. Res. 13 94–119.
Gilmore, P. C., R. E. Gomory. 1965. Multistage cutting stock prob- Padberg, M. 2000. Packing small boxes into a big box. Math. Methods
lems of two and more dimensions. Oper. Res. 13 94–120. Oper. Res. 52 1–21.
Hadjiconstantinou, E., N. Christofides. 1995. An exact algorithm for Parada, V., R. Palma, D. Sales, A. Gómes. 2000. A comparative
general, orthogonal, two-dimensional knapsack problems. Eur. numerical analysis for the guillotine two-dimensional cutting
J. Oper. Res. 83 39–56. problem. Ann. Oper. Res. 96 245–254.
Hifi, M. 2001. Exact algorithms for large-scale unconstrained two Pisinger, D., M. M. Sigurd. 2005. The two-dimensional bin packing
and three staged unconstrained cutting problems. Comput. problem with variable bin sizes and costs. Discrete Optim. 2
Optim. Appl. 18 63–88. 154–167.
ILOG. 2000. ILOG CPLEX 7.0, Reference Manual. ILOG SA, Gentilly, Ryan, D. M., B. A. Foster. 1981. An integer programming approach
France. to scheduling. A. Wren, ed. Computer Scheduling of Public
Junger, Michael, Stafan Thienel. 2000. The ABACUS system for Transport Urban Passenger Vehicle and Crew Scheduling. North-
branch-and-cut-and-price algorithms in integer programming Holland, Amsterdam, The Netherlands, 269–280.
and combinatorial optimization. Software Practice Experience Voudouris, C. 1997. Guided local search for combinatorial optimisa-
30(11) 1325–1352. tion problems. Ph.D. thesis, Department of Computer Science,
Junker, U., S. E. Karisch, N. Kohl, B. Vaaben, T. Fahle, M. Sellmann. University of Essex, Colchester, UK.
1999. Constraint programming based column generation for Voudouris, C., E. Tsang. 1999. Guided local search and its
crew assignment. J. Jaffar, ed. Proc. CP’99, Lecture Notes in Com- application to the traveling salesman problem. Eur. J. Oper. Res.
puter Science, Vol. 1713. Springer, Berlin, Germany, 261–274. 113 469–499.