4.1 and 4.2 we describe two methods AC1 and AC2 for allocating an item to a bin at step 3, four rules IP1, ..., IP4 for initializing the item prices at step 1 and two ...
4OR 1: 135–147 (2003) DOI: 10.1007/s10288-002-0006-y
The Two-Dimensional Finite Bin Packing Problem. Part II: New lower and upper bounds Marco A. Boschetti and Aristide Mingozzi Department of Mathematics, University of Bologna, Via Sacchi 3, 47023 Cesena, Italy (Tel: +39-0547-642806, Fax: +39-0547-610054, e-mail: {boschett,mingozzi}@csr.unibo.it) Received: February 2002 / Revised version: September 2002
Abstract. This paper is the second of a two part series and describes new lower and upper bounds for a more general version of the Two-Dimensional Finite Bin Packing Problem (2BP) than the one considered in Part I (see Boschetti and Mingozzi 2002). With each item is associated an input parameter specifying if it has a fixed orientation or it can be rotated by 90◦ . This problem contains as special cases the oriented and non-oriented 2BP. The new lower bound is based on the one described in Part I for the oriented 2BP. The computational results on the test problems derived from the literature show the effectiveness of the new proposed lower and upper bounds. Key words: Cutting and Packing, Lower Bounds, Heuristic Algorithms AMS classification: 90C10, 90C27, 90C59
1 Introduction The Two-Dimensional Finite Bin Packing Problem (2BP) consists of determining the minimum number of large identical rectangles, bins, that are required for allocating without overlapping a given set of rectangular items. For each item it is given the size and a parameter specifying if it has a fixed orientation or it can be rotated by 90◦ . The items are allocated with their edges parallel to the bin edges. The 2BP finds many practical applications as described in Part I (see Boschetti and Mingozzi 2002). The 2BP is a generalization of the well known one-dimensional Bin Packing Problem (1BP), where n items of given weight wi have to be packed into the Journal of the Belgian, French 4OR Quarterly and Italian Operations Research Societies © Springer-Verlag 2003
136
M.A. Boschetti and A. Mingozzi
minimum number of bins of capacity W . Therefore, the 2BP is strongly NP-hard as well as the 1BP (see Garey and Johnson 1979). In practical applications there exist many versions of the 2BP. The problem considered in this paper contains as special cases the oriented and non-oriented versions of the 2BP that, according to the classification of Lodi et al. 1999), are called 2BP|O|F and 2BP|R|F, respectively. Following this classification scheme we propose to denote with 2BP|M|F the problem considered in this paper. For 2BP|O|F, Chung et al. (1982) and Frenk and Galambos (1987) have proposed upper bounds with asymptotic worst-case performance guarantee, whereas Berkey and Wang (1987) have presented extensions of classical one-dimensional bin packing heuristics and Lodi et al. (1999) and Faroe et al. (2002) have described metaheuristic procedures. The only lower bounds for 2BP|R|F presented in the literature are due to Dell’Amico et al. (2002), while heuristic algorithms have been proposed by Bengtsson (1982), El-Bouri et al. (1994) and Lodi et al (1999). Extensive survey on cutting and packing problems can be found in Dowsland and Dowsland (1992), Dyckhoff and Finke (1992), Lodi et al. (2002a,b). Moreover, an annotated bibliography is given in Dyckhoff et al. (1997). In this paper we propose a lower bound and a heuristic algorithm for the 2BP|M|F. Our computational analysis on test problems from the literature shows that the new lower and upper bounds are better than those presented in the literature for problems 2BP|O|F and 2BP|R|F.
2 Problem description An unlimited stock of rectangular bins of size (W, H ) are given and n rectangular items of sizes (wj , hj ), j ∈ J = {1, ..., n}, are required to be placed into the bins. We assume that with each item j ∈ J is associated an input parameter ρj , which is equal to 1 if item j can be rotated of 90◦ and is equal to 0 if the item j cannot be rotated. The objective is to allocate without overlapping all items into the minimum number of bins. Notice that problem 2BP|M|F corresponds to 2BP|O|F when ρj = 0, j ∈ J , while corresponds to 2BP|R|F when when ρj = 1, j ∈ J . We denote with aj = wj × hj the area of item j , j ∈ J . We assume that each bin is located in the positive quadrant of the Cartesian coordinate system with its origin, the bottom left-hand corner, placed in position (1, 1) and with its bottom and left-hand edges parallel to the x-axis and the y-axis, respectively. Moreover, we assume that the sizes of bins and of items are positive integers satisfying wj ≤ W and hj ≤ H , for every item j ∈ J .
The Two-Dimensional Finite Bin Packing Problem: Part II
137
3 Lower bounds for the 2BP|M|F The continuous lower bound L0 =
n
j =1 aj
WH
introduced in Part I for the 2BP|O|F
can be also used for the 2BP|M|F as it involves only the item and bin areas. Also the others lower bounds described in Part I for the 2BP|O|F can be used once the item sizes (wj , hj ) are replaced with the following modified sizes (w¯ j , h¯ j ) defined as follows: min{wj , hj }, if wj ≤ H, hj ≤ W and ρj = 1 w¯ j = (3.1) wj , otherwise and h¯ j =
min{wj , hj }, if wj ≤ H, hj ≤ W and ρj = 1
(3.2) hj ,
otherwise
while the item area aj , j ∈ J is left unchanged. A different lower bound is proposed in the following. 3.1 Lower bound Lnew M Lower bound Lnew M takes explicitly into account both dimensions of the items and the possibility of rotating by 90◦ the items. We denote with J ⊆ J the subset of items whose sizes have been updated according to expressions (3.1) and (3.2), i.e. J = {j ∈ J : wj = w¯ j or hj = h¯ j }. Moreover, let J = J \ J . Lower bound Lnew M is defined by the following theorem. Theorem 3.1. A valid lower bound on the optimal solution value of the 2BP|R|F is as follows µ(j, p, q) j ∈J Lnew (3.3) = max M H W 1≤p≤ 21 H p q 1≤q≤ 21 W
where min{η(q, wj , W ) × η(p, hj , H ), j ∈ J η(q, hj , W ) × η(p, wj , H )}, µ(j, p, q) = η(q, wj , W ) × η(p, hj , H ), j ∈ J
(3.4)
138
M.A. Boschetti and A. Mingozzi
and η(s, z, Z) =
Z Z−z s − s , if z > z s
Lower bound
Lnew M
Z 2
(3.5) ,
if z ≤
Z 2
can be computed in O(n3 ) time.
Proof. Notice that Hp Wq represents the maximum number of elements of size equal to (q, p) that can be packed into a bin. For each item j ∈ J , µ(j, p, q) represents a lower bound on the number of (q, p) elements covered by item j . Hence, j ∈J µ(j, p, q) represents a lower bound on the number of (q, p) elements required for placing all items of J .2 new for the 2BP|O|F Notice that if J = J then Lnew M becomes lower bound L4 described in Part I.
3.2 New lower bound LM BM to the 2BP|M|F Lower bound LM BM is computed as the maximum between LBM (see Part I), using the item sizes modified according to expressions (3.1) and (3.2), and Lnew M given new M by expression (3.3), that is: LBM = max{LBM , LM }. 4 The heuristic method HBP In this section we describe a new heuristic method, called HBP, for solving problem 2BP|M|F which can also solve both problems 2BP|O|F and 2BP|R|F. The underlying idea is of ordering the items using a given criterion and then trying to allocate in turn the items considering a bin at the time. When no more items can be allocated in the current bin, we close such bin and we open a new one. The process stops when all items have been allocated. This procedure is then repeated changing the order of the items. The algorithm stops when the number of bins used is equal to a known lower bound or a maximum number of iterations MaxI ter is reached. A feasible solution is represented by specifying for each item j ∈ J the bin index πj where j is located, the coordinates (pj , qj ) of its bottom left-hand corner, referred to as the origin of the item, and its rotation rj , where rj = 0, if the item is not rotated, and rj = 1, if the item is rotated by 90◦ . The general framework of this algorithm, called HSolve, is the following.
The Two-Dimensional Finite Bin Packing Problem: Part II
139
Algorithm HSolve Step 1. (Initialization) Initialize the price vj associated with each j ∈ J (see Sect. 4.2). Initialize the best solution by allocating each item j ∈ J into a different bin πj = j in position (pj , qj ) = (1, 1) and rotation rj = 0. Set z∗ = n and iter = 1. Step 2. (Erase the current solution) Set J = J and let i = 1 be the index of the current empty bin. Define πj = n, ∀j ∈ J . We assume that the items of J are ordered for non increasing value of the price (i.e. J = (j1 , j2 , . . . , jn ) and vj1 ≥ vj2 ≥ · · · ≥ vjn ). Step 3. (Filling up bin i) Consider the items of J in sequence and for the current item j ∈ J find the best position (pj , qj ) and rotation rj for placing j into the current bin i (see Sect. 4.1). If a feasible position exists, then place item j in solution by setting πj = i and J = J \ {j }. Step 3 terminates when no item of J can be inserted in bin i. Step 4. (Check if all items have been allocated) Let z = i the cost of the emerging solution. If J = Ø, then go to step 5. If J = Ø and i < z∗ − 1, then open a new bin by setting i = i + 1 and go to step 3, otherwise go to step 7. Step 5. (Update the best solution) Update z∗ = z, πj = πj , (pj , qj ) = (pj , qj ) and rj = rj , ∀j ∈ J . Step 6. (Check optimality) If z∗ is equal to a known lower bound (i.e. z∗ = LM BM ) then Stop. Step 7. (Update the item prices) If iter = MaxI ter then Stop, otherwise for each item j ∈ J update the price vj according to the current solution (see Sect. 4.2), set iter = iter +1 and go to step 2. To evaluate the time complexity of each iteration of steps 2 to 7, let k be the maximum number of items which can be allocated to a bin. The complexity for finding the best position (pj , qj ) and rotation rj for allocating item j to the current bin i is O(k 2 ), therefore, the overall complexity of step 3 is O(nk 2 ). As the complexity of steps 4 to 6 is O(n), then the overall complexity of steps 2 to 7 is O(bn2 k), where b is the maximum number of bin used. The algorithm HSolve can be repeated modifying the pricing rules used at step 1 and 7 and the item allocation method, used at step 3. In the following Sects. 4.1 and 4.2 we describe two methods AC1 and AC2 for allocating an item to a bin at step 3, four rules I P1 , ..., I P4 for initializing the item prices at step 1 and two rules P U1 and P U2 for updating the item prices at step 7. Therefore, a better algorithm consists in performing HSolve for every combination of the allocation methods and pricing rules.
140
M.A. Boschetti and A. Mingozzi
The following algorithm HBP has been used in our computational tests described in Sect. 5. Algorithm HBP Step 1. Set UBM = ∞. Step 2. For each item allocation method AC1 and AC2 (see Sect. 4.1), for each initial pricing rule I P1 , ..., I P4 and for each price updating rule P U1 and P U2 (see Sect. 4.2) perform step 3. Step 3. Execute algorithm HSolve using the selected rules and update the upper bound UBM = min{z∗ , UBM }.
4.1 Item allocation The general criterion used at step 3 of HSolve to allocate an item j to a bin is to choose a position where j does not overlap with the items already allocated to the bin and such that it is not possible to move it to the left and/or downward as its left-hand edge and its bottom edge are both adjacent to the edges of other items and/or to the bin edges. In the following each feasible position for item j is represented by the triplet (p, q, r), where r = 1 if the item must be rotated by 90◦ and r = 0 if the item must not be rotated and the pair (p, q) represents the coordinates of the origin of the item according to the specified rotation. We define two triplets (p, q, 0) and (p, q, 1) to indicate that item j having ρj = 1 can be located in position (p, q) either without rotation or rotating it by 90◦ . We denote with F (j, Bi ) the set of all feasible triplets, satisfying the criterion described above, for locating item j into bin i, where Bi = {j ∈ J : πj = i} is the subset of items already located to the bin. Figure 1 shows an example where an item j of size (wj , hj ) = (6, 2) and ρj = 1 has to be placed into a bin i of size (W, H ) = (10, 9) containing items Bi = {1, 2, 3} of sizes (w1 , h1 ) = (6, 3), (w2 , h2 ) = (3, 1) and (w3 , h3 ) = (4, 2) located in positions (p1 , q1 , r1 ) = (1, 1, 0), (p2 , q2 , r2 ) = (1, 4, 0) and (p3 , q3 , r3 ) = (1, 5, 0). For this example F (j, Bi ) = {(1, 7, 0), (5, 4, 0), (5, 4, 1), (7, 1, 1)}. If |F (j, Bi )| = 1, then item j is allocated in position (p, q, r) ∈ F (j, Bi ) by setting pj = p, qj = q and rj = r. If |F (j, Bi )| > 1, then the best position is chosen according to the criterion that the bin layout which is more likely for item j is obtained by allocating item j to the position where the not occupied area under it and at its left hand side is minimum. We denote with f (p, q, r) the amount of area of the two rectangular regions under and at the left-hand side of the item j located in position (p, q, r) not occupied by the items in Bi . Figure 2 gives an example of function f (p, q, r) for the problem of Fig. 1.
The Two-Dimensional Finite Bin Packing Problem: Part II
141
3 2
1
Fig. 1. Example of feasible positions for locating item j with (wj , hj ) = (6, 2) and ρj = 1: F (j, Bi ) = {(1, 7, 0), (5, 4, 0), (5, 4, 1), (7, 1, 1)}
3 j 2
1
Fig. 2. Example: the hatched regions correspond to the not occupied area under and at the left-hand side of the item j in position (5, 4, 0), i.e. f (5, 4, 0) = 13
Let f ∗ = min{f (p, q, r) : (p, q, r) ∈ F (j, Bi )} and F (j, Bi ) = {(p, q, r) ∈ F (j, Bi ) : f (p, q, r) = f ∗ }. Algorithm HBP uses the following two rules AC1 and AC2 for locating item j at step 3 of algorithm HSolve: AC1 : Locate j in position (pj , qj , rj ) by defining in sequence pj , qj and rj as follows: pj = min{p : (p, q, r) ∈ F (j, Bi )}, qj = min{q : (pj , q, r) ∈ F (j, Bi )} and rj = min{r : (pj , qj , r) ∈ F (j, Bi )}. AC2 : Locate j in position (pj , qj , rj ) by defining in sequence qj , pj and rj as follows: qj = min{q : (p, q, r) ∈ F (j, Bi )}, pj = min{p : (p, qj , r) ∈ F (j, Bi )} and rj = min{r : (pj , qj , r) ∈ F (j, Bi )}. In the example reported in Fig. 2 we have f (1, 7, 0) = 7, f (5, 4, 0) = 13, f (5, 4, 1) = 13 and f (7, 1, 1) = 7, therefore, the item j is located in po-
142
M.A. Boschetti and A. Mingozzi
sition (pj , qj , rj ) = (1, 7, 0) by method AC1 , while it is located in position (pj , qj , rj ) = (7, 1, 1) by method AC2 . 4.2 Pricing At each iteration of HBP we use a different pricing function for defining the price vj , j ∈ J . The objective is to give high prices to items which are more difficult to locate. We use four rules for defining the initial price vj : IP1 : The area, vj = aj ; IP2 : The width, vj = wj ; IP4 : The perimeter, vj = 2wj + 2hj . IP3 : The height, vj = hj ; At the end of each iteration of HSolve we update the price vj , j ∈ J , taking into account the last solution produced of cost z. We increase the price of every item j located into a bin πj > 21 z and we decrease the price of every item j located into a bin πj ≤ 21 z. The prices are updated as follows: vj = αvj , if πj ≤ 21 z and vj = βvj , if πj > 21 z, where α < 1 and β > 1. The values α and β are computed in two ways: PU1 : a priori fixed; in our experiments α = 0.9 and β = 1.1. PU2 : randomly generated: α = 1 − rnd and β = 1 + rnd, where rnd is a random real number in the range [0, 1). 5 Computational results The algorithms presented in this paper have been implemented in FORTRAN 77 and run on a Pentium III Intel 933MHz. Since no computational results for the 2BP|M|F have been presented in the literature, computational results are only given for the two special cases 2BP|O|F and 2BP|R|F in order to compare our new lower and upper bounds with the best ones presented in the literature. We have considered ten classes of randomly generated test problems, where every class contains five groups of ten instances each. The first 6 classes of problems have been proposed by Berkey and Wang (1987), while the last four classes have been introduced by Martello and Vigo (1998). All test problems are available on the web page “http://www.or.deis.unibo.it/ORinstances/”. In computing Lnew and Lnew 1 2 , instead of L1BP (S, C) described in Part I, we used lower bound “L3 ” for the 1BP proposed by Martello and Toth (1990), contained in the code MTP and having time complexity of O(n3 ), as, in our computational experience, it provides a better bound. Table 1 reports for the 2BP|O|F the results of different lower and upper bounds. In particular, the table gives the new lower bound described in Part I, the lower bounds of Martello and Vigo (1998) and Fekete and Schepers (2000), the upper bound described in Sect. 4 and the upper bounds described by Lodi et al. (1999) and Faroe et al. (2002).
The Two-Dimensional Finite Bin Packing Problem: Part II
143
Table 1 shows for each problem class the following average values: ˆ MV = UBM /LMV , where UBM is the upper bound value produced by G HBP, described in Sect. 4, using MaxI ter = 100 in procedure HSolve, and LMV is the value of the lower bound of Martello and Vigo (1998) and used by Lodi et al. (1999) in their tabu search algorithm; ˆ GF S = UBM /LF S , where LF S is the value of the lower bound proposed by Fekete and Schepers (2000); GBM = UBM /LBM , where LBM is the value of the new lower bound described in Part I; TBM = computing time in Pentium III Intel 933MHz CPU seconds of the heuristic algorithm HBP. NBM = number of bins required by algorithm HBP; GLMV = ULMV /LMV , where ULMV is the value of the upper bound produced by the heuristic algorithm proposed by Lodi et al. (1999) and LMV is the value of the lower bound of Martello and Vigo (1998);
Table 1. Lower and upper bounds for the 2BP|O|F Problem Class W × H I 10×10
n 20 40 60 80 100 Avg II 30×30 20 40 60 80 100 Avg III 40×40 20 40 60 80 100 Avg IV 100×100 20 40 60 80 100 Avg
Lower Bounds ˆ MV G 1.0611 1.0468 1.0418 1.0228 1.0119 1.0369 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0983 1.0807 1.0536 1.0379 1.0429 1.0627 1.0000 1.0000 1.1000 1.1000 1.0333 1.0467
ˆ FS G 1.0325 1.0320 1.0227 1.0082 1.0032 1.0197 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0817 1.0411 1.0465 1.0219 1.0348 1.0452 1.0000 1.0000 1.1000 1.1000 1.0333 1.0467
New Algorithm HBP GBM 1.0125 1.0265 1.0227 1.0042 1.0032 1.0138 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0367 1.0411 1.0315 1.0219 1.0251 1.0313 1.0000 1.0000 1.1000 1.1000 1.0333 1.0467
TBM 0.022 0.198 0.538 0.225 0.836 0.364 0.000 0.302 0.077 0.852 0.147 0.276 0.082 0.396 0.945 1.752 3.054 1.246 0.000 0.022 2.675 5.696 4.165 2.512
Opt 9 7 6 9 9 8.0 10 10 10 10 10 10.0 8 7 6 6 5 6.4 10 10 8 7 9 8.8
NBM 7.10 13.40 20.10 27.50 31.80 19.98 1.00 1.90 2.50 3.10 3.90 2.48 5.10 9.50 14.00 19.10 22.60 14.06 1.00 1.90 2.50 3.30 3.80 2.50
Lodi et al. Faroe et al. (1999) (2002) GLMV TLMV NF P Z TF P Z 1.06 24.00 7.10 100.0 1.06 36.11 13.40 100.0 1.04 48.93 20.10 100.0 1.05 48.17 27.50 100.0 1.04 60.81 32.10 100.0 1.050 43.60 20.04 100.0 1.00 0.01 1.00 100.0 1.10 0.01 1.90 100.0 1.10 0.09 2.50 100.0 1.07 12.00 3.10 100.0 1.03 6.00 3.90 100.0 1.060 3.62 2.48 100.0 1.20 54.00 5.10 100.0 1.11 54.02 9.40 100.0 1.05 45.67 14.00 100.0 1.08 54.31 19.10 100.0 1.09 60.10 22.60 100.0 1.106 53.62 14.04 100.0 1.00 0.01 1.00 100.0 1.00 0.01 1.90 100.0 1.15 0.14 2.50 100.0 1.10 18.00 3.30 100.0 1.03 6.00 3.80 100.0 1.056 4.83 2.50 100.0
144
M.A. Boschetti and A. Mingozzi
Table 1. Continued Problem
Lower Bounds
ˆ MV Class W × H n G V 100×100 20 1.0861 40 1.0441 60 1.0436 80 1.0511 100 1.0545 Avg 1.0559 VI 300×300 20 1.0000 40 1.3000 60 1.0000 80 1.0000 100 1.0667 Avg 1.0733 VII 100×100 20 1.0367 40 1.0313 60 1.0329 80 1.0409 100 1.0224 Avg 1.0328 VIII 100×100 20 1.0583 40 1.0216 60 1.0184 80 1.0192 100 1.0256 Avg 1.0286 IX 100×100 20 1.0000 40 1.0143 60 1.0093 80 1.0144 100 1.0088 Avg 1.0094 X 100×100 20 1.0950 40 1.0468 60 1.0533 80 1.0563 100 1.0584 Avg 1.0620
New Algorithm HBP
ˆ FS G 1.0861 1.0271 1.0173 1.0338 1.0435 1.0416 1.0000 1.3000 1.0000 1.0000 1.0667 1.0733 1.0367 1.0313 1.0329 1.0409 1.0224 1.0328 1.0583 1.0216 1.0184 1.0192 1.0256 1.0286 1.0000 1.0108 1.0048 1.0053 1.0029 1.0047 1.0950 1.0343 1.0533 1.0563 1.0584 1.0595
GBM 1.0000 1.0271 1.0110 1.0295 1.0308 1.0197 1.0000 1.3000 1.0000 1.0000 1.0667 1.0733 1.0200 1.0202 1.0257 1.0367 1.0188 1.0243 1.0000 1.0091 1.0184 1.0139 1.0217 1.0126 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0950 1.0343 1.0533 1.0563 1.0584 1.0595
TBM 0.005 0.752 1.373 4.629 8.419 3.036 0.000 6.308 1.504 0.186 11.407 3.881 0.055 0.725 2.032 6.698 7.315 3.365 0.011 0.264 1.723 3.028 8.585 2.722 0.006 0.012 0.046 0.104 0.170 0.068 0.192 0.411 2.486 4.916 9.718 3.545
Opt 10 7 8 4 3 6.4 10 7 10 10 8 9.0 9 8 6 2 5 6.0 10 9 7 7 4 7.4 10 10 10 10 10 10.0 7 8 5 3 1 4.8
NBM 6.50 11.90 18.00 24.80 28.70 17.98 1.00 1.80 2.10 3.00 3.40 2.26 5.50 11.10 16.00 23.20 27.40 16.64 5.80 11.30 16.20 22.60 28.00 16.78 14.30 27.80 43.70 57.70 69.50 42.60 4.30 7.40 10.20 13.00 16.20 10.22
Lodi et al. Faroe et al. (1999) (2002) GLMV TLMV NF P Z TF P Z 1.11 36.02 6.50 100.0 1.04 27.07 11.90 100.0 1.06 56.77 18.10 100.0 1.06 56.18 24.90 100.0 1.08 60.34 28.80 100.0 1.070 47.28 18.04 100.0 1.00 0.01 1.00 100.0 1.40 0.03 1.80 100.0 1.05 0.04 2.20 100.0 1.00 0.01 3.00 100.0 1.07 12.00 3.40 100.0 1.104 2.41 2.28 100.0 1.04 12.02 5.50 100.0 1.06 37.01 11.30 100.0 1.05 36.44 15.90 100.0 1.04 54.52 23.20 100.0 1.03 47.43 27.50 100.0 1.044 37.48 16.68 100.0 1.06 18.04 5.80 100.0 1.03 18.72 11.40 100.0 1.02 20.99 16.30 100.0 1.02 37.95 22.50 100.0 1.04 52.66 28.10 100.0 1.034 29.67 16.82 100.0 1.00 0.01 14.30 100.0 1.01 24.05 27.80 100.0 1.01 24.26 43.70 100.0 1.01 54.31 57.70 100.0 1.01 34.11 69.50 100.0 1.008 27.35 42.60 100.0 1.10 12.00 4.20 100.0 1.06 25.18 7.40 100.0 1.07 42.13 10.20 100.0 1.06 47.30 13.00 100.0 1.08 60.10 16.20 100.0 1.074 37.34 10.20 100.0
Table 2. Lower and upper bounds for the 2BP|R|F Problem Class I
W ×H 10×10
New Algorithm HBP n 20 40 60 80 100 Avg
GBM 1.0000 1.0162 1.0000 1.0036 1.0093 1.0058
TBM 0.005 0.127 0.028 0.253 1.011 0.285
Opt 10 8 10 9 7 8.8
Lodi et al. (1999) GoLMV TLMV 1.05 18.00 1.04 30.02 1.04 34.00 1.06 48.08 1.03 47.92 1.044 35.60
The Two-Dimensional Finite Bin Packing Problem: Part II
145
Table 2. Continued Problem Class II
W ×H 30×30
III
40×40
IV
100×100
V
100×100
VI
300×300
VII
100×100
VIII
100×100
IX
100×100
X
100×100
New Algorithm HBP n 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg 20 40 60 80 100 Avg
GBM 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0488 1.0241 1.0178 1.0354 1.0252 1.0000 1.0000 1.1000 1.0667 1.0333 1.0400 1.0000 1.0254 1.0393 1.0213 1.0325 1.0237 1.0000 1.2000 1.0000 1.0000 1.0667 1.0533 1.1100 1.0833 1.0769 1.1008 1.0841 1.0910 1.0800 1.0929 1.0923 1.0816 1.0868 1.0867 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.1000 1.0486 1.0672 1.0492 1.0455 1.0621
TBM 0.005 0.226 0.021 0.336 0.054 0.128 0.017 0.361 0.599 1.104 2.817 0.980 0.006 0.027 2.775 4.081 3.647 2.107 0.011 0.330 1.790 2.238 5.471 1.968 0.017 3.368 0.207 0.308 11.089 2.998 0.198 1.142 3.027 5.356 8.133 3.571 0.182 1.280 3.158 5.439 8.150 3.642 0.017 0.077 0.199 0.389 0.568 0.250 0.125 0.445 2.094 3.363 5.540 2.313
Opt 10 10 10 10 10 10.0 10 6 7 7 4 6.8 10 10 8 8 9 9.0 10 8 4 6 3 6.2 10 8 10 10 8 9.2 5 2 1 0 0 1.6 6 1 0 0 0 1.4 10 10 10 10 10 10.0 8 7 4 4 3 5.2
Lodi et al. (1999) TLMV 1.00 0.01 1.10 0.01 1.00 0.01 1.03 6.10 1.00 0.01 1.026 1.22 1.06 18.00 1.09 42.17 1.08 54.15 1.07 60.07 1.07 60.18 1.074 46.91 1.00 0.01 1.00 0.01 1.10 0.09 1.07 12.00 1.03 6.00 1.040 3.62 1.04 12.01 1.07 42.00 1.06 45.23 1.07 54.14 1.07 60.12 1.062 42.70 1.00 0.01 1.40 0.03 1.05 0.05 1.00 0.01 1.07 12.00 1.104 2.42 1.11 30.00 1.08 48.06 1.06 59.45 1.10 60.12 1.08 60.36 1.086 51.60 1.10 30.01 1.10 54.22 1.07 56.17 1.08 60.11 1.09 60.14 1.088 52.13 1.00 0.06 1.01 18.85 1.01 18.03 1.01 30.51 1.01 36.86 1.008 20.86 1.12 6.01 1.06 24.01 1.06 30.44 1.05 39.04 1.05 43.38 1.068 28.58
GoLMV
146
M.A. Boschetti and A. Mingozzi
TLMV = NF P Z = TF P Z =
computing time in Silicon Graphics Indy R10000sc 195MHz CPU seconds of the heuristic algorithm of Lodi et al. (1999); number of bins required by the heuristic algorithm of Faroe et al. (2002); time limit of 100 seconds of a Digital 500au 21164 500MHz imposed by Faroe et al. (2002) to their heuristic algorithm.
Moreover, in Table 1 we show in column Opt the number of problems solved to optimality by HBP. In order to compare TBM , TLMV and TF P Z , we can observe that, as a rough estimate, our Pentium III Intel 933MHz is about 4 times faster than the Silicon Graphics Indy R10000sc 195MHz used by Lodi et al. (1999) and about 2 times faster than the Digital 500au 21164 500MHz used by Faroe et al. (2002). ˆ MV ≥ G ˆ F S ≥ GBM (i.e. LMV ≤ LF S ≤ LBM ), thus Table 1 shows that G confirming the better quality of the new lower bound LBM . Not reported in Table 1 lower bound LBM for 91 instances out of 500 improves LMV of Martello and Vigo (1998) and for 40 instances out of 500 improves LF S of Fekete and Schepers (2000), confirming that the dominance shown in Part I (i.e. LBM ≥ LF S ≥ LMV ) is not only theoretical. The new heuristic HBP is better than the algorithm of Lodi et al. (1999) as ˆ MV (= UBM ) ≤ G ˆ LMV (= ULMV ) for each class of problems and TBM is in G LMV LMV average smaller than TLMV . Algorithm HBP is also competitive with the method of Faroe et al. 2002: the two algorithms produce almost equivalent solutions (see columns NBM and NF P Z ) but HBP requires a smaller computing time (see columns TBM and TF P Z ). Table 2 shows the performance of the new algorithm HBP and of the algorithm of Lodi et al. (1999) for the 2BP|R|F. Table 2 shows the values of GBM , TBM and Opt for algorithm HBP and the values of GoLMV and TLMV for the heuristic algorithm of Lodi et al. (1999), where GoLMV is the ratio of the upper bound produced by this latter algorithm and the lower bound for the 2BP|R|F provided by Dell’Amico et al. (1998). The results of Table 2 shows that the new lower bound and the upper bound provided by HBP gives a ratio GBM which is on average better than GoLMV as GBM < GoLMV in 8 classes of problems out of 10, while GBM = GoLMV in problem class IV and GBM > GoLMV in problem class VII. Lodi et al. (1999) in their computational results do not give any indication of the lower and upper bound values obtained, hence, it is not possible to evaluate if the better average performance of GBM is due to either the lower bound or the upper bound. HBP requires less computing time than the heuristic of Lodi et al. (1999) in 8 classes of problems out of 10 (see columns TBM and TLMV ).
The Two-Dimensional Finite Bin Packing Problem: Part II
147
6 Conclusions In this paper we propose new lower bounds and a new heuristic method for the twodimensional finite bin-packing problem where some items can be rotated and some others have a fixed orientation. This problem includes as special cases problems 2BP|O|F and 2BP|R|F. The computational results show the effectiveness of the lower bounds, which for 2BP|O|F dominate all other lower bounds presented in the literature, and indicate that the new heuristic algorithm is competitive with all other algorithms proposed in literature for both problems 2BP|O|F and 2BP|R|F.
References Bengtsson BE (1982) Packing rectangular pieces - a heuristic approach, The Computing Journal 25: 353–357 Berkey JO, Wang PY (1987) Two dimensional finite bin packing algorithms, Journal of Operational Research Society 38: 423–429 Boschetti MA, Mingozzi A (2003) The two-dimensional finite bin packing problem. Part I: New lower bounds for the oriented case, 4OR 1: 27–42 Chung FKR, Garey MR, Johnson DS (1982) On packing two-dimensional bins, SIAM Journal on Algebraic and Discrete Methods 3: 66–76 Dell’Amico M, Martello S, Vigo D (1998) An exact algorithm for non-oriented two-dimensional bin packing problems, (In preparation) Dell’Amico M, Martello S, Vigo D (2002) A lower bound for the non-oriented two-dimensional bin packing problems, Discrete Applied Mathematics 118: 13–24 Dowsland KA, Dowsland WB (1992) Packing problems, European Journal of Operational Research 56: 2–14 Dyckhoff H, Finke U (1992) Cutting and packing in production and distribution, Physica Verlag, Heidelberg Dyckhoff H, Scheithauer G, Terno J (1997) Cutting and packing (C&P), In: Dell’Amico M, Maffioli F, Martello S (eds) Annotated Bibliographies in Combinatorial Optimization, Wiley, Chichester pp 393–413 El-Bouri A, Popplewell N, Balakrishnan S, Alfa A (1994) A search based heuristic for the twodimensional bin-packing problem, INFOR 32: 265–274 Faroe O, Pisinger D, Zachariasen M (2002) Guided local search for the three-dimensional bin packing problem, INFORMS Journal on Computing (to appear) Fekete SP, Schepers J (2000) On more-dimensional packing II: Bounds, Tech. Report 97.289, Universität zu Köln, Germany Frenk JB, Galambos GG (1987) Hybrid next-fit algorithm for the two-dimensional rectangle bin packing problem, Computing 39: 201–217 Garey MR, Johnson DS (1979) Computers and intractability, a guide to the theory of np-completeness, Freeman, New York Lodi A, Martello S, Vigo D (1999) Heuristic and metaheuristic approaches for a class of two-dimensional bin packing problems, INFORMS Journal on Computing 11: 345–357 Lodi A, Martello S, Monaci M (2002a) Two-dimensional packing problems: A survey, European Journal of Operational Research 141: 241–252 LodiA, Martello S, Vigo D (2002b) Recent advances on two-dimensional bin packing problems, Discrete Applied Mathematics 123: 379–396 Martello S, Toth P (1990) Knapsack problems: Algorithms and computer implementations, John Wiley & Sons, Chichester Martello S,Vigo D (1998) Exact solution of the two dimensional finite bin packing problem, Management Science 44: 388–399