The bin-packing problem: A problem generator and some numerical experiments with FFD packing and MTP

The bin-packing problem: A problem generator and some numerical experiments with FFD packing and MTP

Iar. Trans. Opl Res. Vol. 4, No. S/6, pp. 311-389,1997 0 1997IFORS. Published by Elsevier Science Ltd Pergamon All rights reserved. Printed in Great...

1MB Sizes 0 Downloads 121 Views

Iar. Trans. Opl Res. Vol. 4, No. S/6, pp. 311-389,1997 0 1997IFORS. Published by Elsevier Science Ltd

Pergamon

All rights reserved. Printed in Great Britain

0969~6016/97 517.00+ 0.00

The Bin-Packing Problem: A Problem Generator and Some Numerical Experiments with FFD Packing and MTP PETRA SCHWERIN and GERHARD WASCHER Martin-Luther-Univeritat

Halle-Wittenberg,

Germany

In this paper a problem generator for the Bin-Packing Problem (BPP) is presented which is suggested to be used in future for the empirical evaluation of exact and heuristic solution methods. Also some numerical experiments are performed with FFD Packing in order to identify hard problem classes of the BPP. From the results it becomes evident that the design of a previous test by Martello and Toth, in which the authors tried to verify the solution power of their method, MTP, has been biased. Thus, new experiments with MTP have been performed on instances from more challenging problem classes. Our results confirm the general opinion that MTP represents the state-or-the-art for exact solution methods for the BPP, even though the size of the problems, which can be solved to a proven optimum in reasonable computing time, still appears to be unsatisfactory. 0 1997 IFORS. Published by Elsevier Science Ltd. Key words: bin-packing, heuristics, FFD packing, MTP, numerical experiments

1. INTRODUCTION The Bin-Packing Problem (BPP) is a classic OR problem. It requires to pack a set of small objects (‘items’) of given weights into a minimal number of large objects (‘bins’) of identical size (‘capacity’) such that for each bin the total weight of the small objects does not exceed its capacity. According to Dyckhoffs typology of cutting and packing (Dyckhoff, 1990) this is a problem of type l/V/l/M which is known to be NP-complete. Consequently, research has focused on heuristic solution methods (cf. Coffman et al., 1984) of which First-Fit-Decreasing(FFD) Packing may be the best known one. What makes this method attractive is not just that it is fast and easy to implement, but also that-despite its rather simplistic nature - it appears to provide good-quality solutions. In fact, results from worst-case and average-case analyses support the latter observation. The worst-case ratio between the objective function value xzFD provided by the FFD Method and the optimum objective function value x:” is 1.5, i.e. xEFD_< 1.5x:” holds for all instances of the BPP (cf. Simchi-Levi, 1994). For a sufficiently large number of items this ratio is reduced to 1l/9 = 1.222.. . (cf. Coffman et al., 1984). On the average, the objective function value provided by the FFD Method does not exceed the optimum objective function value by more than 2% (Johnson, 1973, cited in Garey and Johnson, 1979). Even though the solution quality of FFD and other packing algorithms has obviously been studied thoroughly, there is still the necessity for ongoing research in this area. In particular, it would be interesting to know what factors make the BPP difficult and to identify the classes of problem instances that cannot be solved satisfactorily by the FFD Method. Probably due to the presumed excellent solution quality of the heuristics only very few exact methods for the BPP have been described in the literature. The few exceptions include methods of Eilon and Christofides (1971), Hung and Brown (1978), and Vance et al. (1994). MTP (Martello and Toth, 1990) is often looked upon as the present state-of-the-art method (Falkenauer, 1995). The introduction of this method was accompanied by results from some numerical experiments. However, as will be presented later, due to an unsatisfactory test design these results do not appear to be very convincing. In this paper we will try to improve the knowledge about the performance of heuristic and exact methods for the BPP by some numerical experiments. In particular we intend to identify classes of problem instances which are difficult to solve and therefore can be considered as benchmarks for newly developed methods. In order to do so, we start with the presentation of a problem generator

G. W&her, Martin-Luther-Universita Halle- Wittenberg, Wirtschafswissenschaftliche Fakulta”, Betriebswirtschaftslehre - Produktion und Logistik, D-06099 Halle (Saale), Germany

Correspondence:

177

378

P. Schwerin and G. W&her-The

Bin-Packing Problem

BPPGEN (Section 2) which has been used in our experiments. We recommend that this problem generator be used in future numerical experiments because it permits to compare results from different studies directly. In Section 3 we outline how our numerical experiments have been designed. The test results for FFD Packing are presented in Section 4. Section 5 is dedicated to the experiments with MTP. Due to the fact that FFD is used by MTP for the calculation of an initial bound, at first consequences from our FFD results for the evaluation of MTP are discussed. Also previous test results for MTP (Martello and Toth, 1990) are reconsidered in the light of our own test results for FFD Packing. After these preliminaries the results for MTP are presented which are based on a more reliable design of the experiments. Finally, in Section 6, we conclude with the identification of some areas for future research.

2. A PROBLEM GENERATOR

FOR THE BPP

2.1. Problem parameters of the BPP We note that each instance of the BPP is completely described by a triple (C, n, w), where C represents the bin capacity, n the number of items to be packed, and w = (w,,.. ., w”) the n-vector of the corresponding item weights wl,. . , w,. As each instance of the BPP consists of n + 2 components, n may also be referred to as the size of the problem instance, or, in short, as the problem size. Obviously, the bin capacity C and the problem size n may be considered as parameters of the BPP in the first place. Furthermore, the interval from which the values of the weights w i, . . , w, are taken, may have severe effects on computing times and solution quality of algorithms. Additional problem parameters are therefore introduced in order to characterise this interval. As we obtain an equivalent problem instance if the capacity C and all item weights wi,. .., w, are multiplied by a positive constant, it is sufficient to define these parameters in relation to C. By vi we denote a lower bound, by v2 an upper bound on the relative weight of the items in relation to the bin capacity C, i.e. w:[vlC, v,C].

2.2. Generation of test problems Each tupel (C, n, vl, v2) describes a specific, homogeneous class of instances of the BPP. For fixed problem parameters C, n, ul, and v2, any test problem can be interpreted as the realisation of an n-dimensional random variable (w,, . . . , w,). Without loss of generality we assume that its components are integer numbers. BPPGEN further assumes the components wi,i = 1,. . . , n to be uniformly distributed in the interval [v,C, uZC] and determines their values through the following two-step procedure: (1) Generation of a realisation yi of a random variable Y which is uniformly distributed on (v,C,v,C + l), i.e. Y w U(v,C,v,C + 1): yi = (vl + (vl - u,)rand,(O, 1))C + rand,(O, 1). randLO, 1) is a random number uniformly distributed in the open interval (0,l). (2) Rounding down to the next integer:

Any other distribution of the random variables wi, i = 1,. . . ,n could also be implemented in BPPGEN at this stage just the same. We note that not necessarily n different item weights are generated. This is particularly the case if the size (v2 - v,)C of the interval [v,C,v,C] is not significantly larger than n. For the generation of the uniformly distributed pseudo-random numbers a special variant of the multiplicative congruential method, the Lehmer generator, has been chosen. Our implementation in BPPGEN is identical with the one for CUTGENl, a problem generator for the One-Dimensional Cutting Stock Problem. Like in CUTGENl, portability of the generator and reproducibility of the random numbers are assured for different computers and programming languages. The generator is

International Transactions in Operational Research Vol. 4, No. 516

379

comprehensively described in Gau and Wiischer (1995), to which we also refer to for details of the implementation. A FORTRAN source code of BPPGEN is provided in the Appendix of this paper.

2.3. Example Let a class of problem instances be characterised by (C, n, ul, u2) = (1000,20,0.2,0.7). One hundred and fifty problems have been generated by BPPGEN, using 1996 as seed for the pseudo-random number generator. For Test Problems 1 and 150 the item weights read as follows: Test w= Test w=

Problem 1: (651,638,578,555,524,507,504,475,435,433,408,402,383,349,341, Problem 150: (698,671,653,583,515,511,490,489,474,450,390,383,363,332,322,

3. SOLUTION

QUALITY AND VERIFICATION

294,221,207,207,202) 303,271,241,227,204)

OF OPTIMALITY

In order to evaluate the solution quality of FFD Packing and MTP we mainly refer to the number of instances of each problem class for which it could be verified that an optimal solution had been found. The (average) deviation from the optimum objective function or from a lower bound is not considered here, as in terms of this criterion the solution quality of both methods can be taken as acceptable. Also results from tests with solution methods for the Integer One-Dimensional Cutting Stock Problem (lD-CSP) indicate, that not so much relative deviations from the optimum objective function values are relevant for the evaluation of algorithms, but absolute ones. Wascher and Gau (1996) solved 3984 of 4000 instances of this problem, which can be looked upon as a high-multiplicity version of the BPP (cf. Hochbaum and Shamir, 1991) to an optimum. For the remaining instances it could be shown that the obtained objective function value exceeded the optimum value by at most one unit. In fact, ideas from solving instances of the lD-CSP have also been used in our experiments with FFD Packing and MTP. In particular, the optimality of the generated solutions has not been verified by the traditional bounds L,, L,, and L, (cf. Martello and Toth, 1990) from the theory of bin packing, but with the IRU Bound that was originally developed for the optimal objective function value of the 1D-CSP. This bound is based on the - in the meanwhile falsified - Integer-Round-Up(IRU) Property of the lD-CSP, which postulates that the optimum objective function value of the lD-CSP can be obtained by rounding up the optimum objective function value of the corresponding continuously relaxed lD-CSP to the next integer. Marcotte (1986) has shown that this property does not hold for all instances of the lD-CSP; however, it appears to be difficult to find contradicting numerical examples. Perhaps even more important is that no instance of the lD-CSP is known for which the gap (Integrality Gap) between the IRU Bound and the actual optimal value is larger than one. Thus it can be concluded, that the IRU Bound provides an excellent bound for the optimal objective function value of the ID-CSP. Another advantage of the IRU Bound is the availability of a method which solves even large problem instances in reasonable computing time, i.e. the column generation technique of Gilmore and Gomory (1961). Due to the formal equivalence of the BPP and 1D-CSP the IRU Bound can immediately be used as a new bound L, for the optimum objective function value of the BPP. In another paper (WHscher and Schwerin, 1998) the authors show that L, in fact outperforms the traditional bounds L,,L,, and L, at the expense of an acceptable increase in computing time. Thus it has also been used for the identification of optimal solutions in the experiments which are presented below.

4. EXPERIMENTS

WITH FFD PACKING

4.1. Brief characterisation of FFD Packing The main idea of the FFD Packing heuristic is to pack the ‘heaviest’ items first and then fill the

380

P. Schwerin and G. Wiischer-The Table

1. Number

,w

by FFD

Packing (N = 100)

(b) v1 = 0.05

100

0.2

99

03

98

98

04

93

95

0 5

93

95

1w

1m

100

1w

100

loo

99

100

99

1m

98

100

99

98 96

99 lrn

96

95

97

98

93

96

92

97

91

97

90

89

94

90

90

93,

79

95 91 5

72

06

94

93

82

76

86

07

94

93

85

85

63 ;

0 8

98

92

93

88

81

83

75

84

09

98

95

91

93

98

91

95

93

90

I 0

97

98

94

95

94

54

88

84

93

(c)q

Problem

of problem instances which have been solved to a proven optimum

(a) vt = 0.001

0,

Bin-Packing

78

-7i’::

74 ‘.

73 -: 72,

76

.*ro 75

= 0.15

(d) v1 = 0.25



“2

20

40

60

80

1m

120

140

160

?I?4

200

01 0 175

0.2

0225

03

1m

1m

1m

1m

1m

rm

1m

1m

1m

1M

0 275 0 325 0 375 0 425 0 475

878

702

534

510

372

329

292

280

268

0 475

06

0 525

09

0 575

10

(e) vt = 0.35

n 20

40

60

64

IW

120

140

160

160

2m

5

0.1 0.2 0.3 0.4

m

190

100 im

im

100 3rn

0.5

im

im

im

100

im

trn

0.425

im im

im im

100 100 100 im im 100 100 Irn

0.475

0.7

1rn im im im im im im im Irn 400 100 im

0.8

Irn

100

im

im

0.575

0.9

100 400 im

100 100 100 1rn Irn

100 1rn

0.525

1.0

tm

100

(00

0.675

100.0

loo.0

0.8

100.0

wo

lrn

lrn 103.0

m

rm

100 loo.0

100

100

100

100

im

im

im

lrn

1cQ.o 100.0

1w.o

loo.0

2rn

trn loo.0

98 1m

80.1

271 --

“2

1m

0.375

0.525

100

90

98

99

97

95

9.4

97

94

0 525

99

98

98

99

97

94

96

98

98

0 575

99

99

97

96

97

97

9,

0 625

99

670

1m

597

570

582

547

528

520

5, 9

512

International

Transactions

in Operational

Research

Vol. 4, No. S/6

381

remaining space with the smaller items. So the packing is organised in two phases. Firstly, the list of items is sorted in a non-increasing order according to their weights. All bins are assumed empty and indexed from 1 to M. Then, in the obtained order, the items are packed into the bins, such that each item is assigned to the lowest indexed bin into which it fits. The algorithm terminates when all items have been packed. 4.2. Test problems for FFD Packing

For the definition of problem classes the following parameter values have been chosen: bin capacity: problem size: lower limit of item weights: upper limit of item weights:

C=lOOO n = 20;40;...;180;200

VI = 0.001; 0.05; 0.25; 0.35 u2 = 0.1;0.2;...;0.9; 1.0

By combination of these parameter values one obtains 440 classes of problems. From each class 100 ( = N) test problems have been generated by means of BPPGEN, such that a total number of 44,000 instances has been used in the tests for FFD Packing. For each problem class the problem generator has been started anew with a seed that has been chosen according to the following formula: seed(C, n, ul, u2) = u,C + u2(C/10) + n(C/lOO) + C 4.3. Results The test results for FFD Packing are presented in Table 1. They indicate that general statements on the average solution quality of FFD Packing can be rather misleading and blur actual differences in the behaviour of the algorithm. While for some problem classes FFD Packing tends to solve each instance to an optimum it fails completely on others. Some of the positive results can be explained immediately: ??

??

??

For C = 1000, vi = 0.001, and u2 = 0.1 the problem generator provides test problems with an average item weight of approximately 50. To accommodate n = 20 items, e.g., only two kinds of optimal solutions are possible: either all items can be fitted into one bin, or a second bin is necessary. If applied to an instance of the second kind, FFD Packing will generate a rather dense packing for the first bin. After that there will only be a few items left that can easily be accommodated by the second bin. Similar lines of argumentation can be drawn for other problem sizes, such that this class of problems in fact has to be considered as very easy for FFD Packing. ‘Perfect’ results have also been obtained for C = 1000, vi = 0.25, and u1 = 0.3. As long as not more than three items of weight w = 250 are included in the test problem, one may generate a solution by consecutively filling bins with three (arbitrary) items until all items have been assigned. Only the last bin can be filled with less than three items. Only in the - unlikely-case that a problem instance is generated which includes more than three items of weight w = 250, it is possible to fill one or several bins with four items. For an optimal solution it might not be necessary to pack a bin with four items, but if it is, FFD Packing will generate such a packing for the last items to be packed which then are of weight w = 250. Obviously trivial problem instances have been obtained for u1 = 0.35. Two items of this characteristic may be fitted into one bin at most. According to FFD Packing those two items are packed together which provide the densest packing scheme. As it is not possible to pack another item in the same bin, the solution must be optimal.

The test results also match with those from theoretical average-case analysis. Even though we use a different criterion for the evaluation of the solution quality it is obvious that FFD Packing works very well on test problems taken from problem classes usually considered for an average-case analysis (cf. Ong et al., 1984), i.e. the classes (C = 1000, n,u, = 0.001,O.l I u2 I 1.0). For different problem sizes n, between 85.1% (n = 160) and 95.7% (n = 20) have been solved optimally by FFD Packing (cf. the last row of Table l(a)). The test results, however, also indicate that FFD Packing does not solve the BPP satisfactorily in general, as results from average-case analyses might pretend.

382

P. Schwerin and G. WZscher-The

Bin-Packing Problem

The heuristic particularly failed for instances from the problem classes (C = 1000, n I 100,~~ = 0.150.2 I u2 I 0.7) and (C = 1000,n 2 60,~~ = 0.25,0.4 I ul I 0.5). Obviously it only makes sense to consider such problem classes for the evaluation of other algorithms, which have not been solved satisfactorily by FFD Packing. This is particularly true for MTP, which uses FFD for the generation of an initial solution. In order to identify such classes we refer to the percentage p of problem instances which have been solved optimally by FFD Packing (here identical with the absolute number of optimally solved problem instances). We call a class (C, n, ul, UJ of instances: ?? ?? ??

cfsd-)easy, cffd-) hard, extremely cfsd-) hard,

if 100 2 p 2 80, if 80 > p 2 20, if 20 > p 2 0.

The discussion of the solution quality of MTP will mainly be based on additional computational experiments for ffd-hard (shaded in light grey) and extremely ffd-hard problems classes (shaded in dark grey; cf. Tables l(aHe)).

4.4. Factors that make the BPP (FFD-)

hard

In Figs. l-3 the material from Tables l(a)(e) has been aggregated according to different dimensions and presented graphically. Three factors have been identified which seem to affect the solution quality of FFD Packing. ??

??

??

Item weightfactor: For different values of u1 and u2 Fig. 1 presents the complexity of the various problem classes expressed in the percentage of optimally solved problems. Also the corresponding average item weight w is depicted for some characteristic functional values. We note that the five functions do not assume their minimum for the same value of u2 but, however, for almost the same value of ti. Additional tests in which the values of u2 have been varied incrementally showed that for all functions the minimum is attained for W z l/3. The observation that this class of problem instances is a particularly difficult one is not completely new. A special class of problem instances with this property, so-called triplets, has been used by Falkenauer (1995) in order to verify the solution quality of a genetic algorithm for the BPP. Triplets are problem instances with item weights between one quarter and one half of the bin capacity. ‘In these problems, a well-filled bin must contain one “big” item (larger than the third of the bin capacity) and two “small” ones [. . .]. What makes these problems difficult is the fact that putting two “big” or three “small” items into a bin is possible, but inevitably leads to a waste of space (the bin cannot be completely filled by an additional item), implying a suboptimal solution’ (Falkenauer, 1995, p. 180). Fig. 1 shows that triplets (ui = 0.25, u2 = 0.5) are difficult for FFD Packing indeed. Less than 10% of the problem instances have been solved optimally. Obviously not only triplets but also other problem classes characterised by W z l/3 are difficult for FFD Packing as well. Furthermore, classes of problem instances with Wclose to l/3,1/4,1/5, etc. seem to be more difficult than others. This is evident from the function for ui = 0.15, which, unlike the function for u1 = 0.25, includes several of such problem classes. This is also true for the function for u1 = 0.001; however, the item weight effect does not become apparent here due to the dominance of other effects. Variabilityfactor: The variability factor refers to different lengths of the interval [u,C, u,C] from which the item weights are taken. For a constant average item weight tl, near 0.33 the problem complexity decreases significantly if the interval [u,C,u,C] is enlarged. For W > 0.4 the given datasets (cf. Tables l(aHe)) only allow a comparison with relatively large intervals for w for which the effect is less obvious but still recognisable. This is demonstrated in Fig. 2. Multiplicity effect: It can generally be argued that - due to the rather limited view of its decision rule - the probability of FFD Packing assigning an item to a wrong bin grows with an increase in the problem size. The multiplicity effect is also related to an increase in the problem size n; however, it refers to the fact that item weights may be duplicated when the test problems are generated. Take two the problem classes (C = 1000,n = 100,~~ = 0.15,~~ = 0.2) and (C = 1000, n = 200, u1 = 0.15, u2 = 0.2), for example. As the interval [150,2003 consists of only 50 different integer numbers, for n = 100 every number will be generated twice on the average. For

International

Transactions

in Operational

Problem complexity 100

2: S e p.

90

P >

70

2 x

60

?i E ._ 5

50

Research

Vol. 4, No. 516

383

in relation to item size

x-x-x-x-

8o

40 w -

“.I

1,

-0-v, -x-v

I 0.2

-0.1

,

._o~-o.375,

0.3

0.4

0.5

I 0.7

0.6

I 0.8

-0.25 I -0.35

I 0.9

I 1.0

“2

Fig. 1. Problem

Problem

x = ;m .- E ‘;c Oz se P gr &bp 8 5: ; a

100 90 SO70-

complexity

in relation

in relation to size of interval for w (F-0.325)

_

I

21 &sg s 2 ; P

Ii-l

0.550

0.350

Problem complexity

_

I 0.550

Size of interval

0.350

for w (as a fraction

Fig. 2. Problem

50 6040302010 0

I 0.650

in relation to size of inrerval for w (G-0.425)

I

complexity

in relation to size of interval for w (W-0.375)

100 7 90 SO70-

0.150

100 r 9080 70 60 50 40 30 20 10 n

in relation

0.250

in relation to size of interval for w (G-0.475)

-

I 0.850

of C)

II 0.450

Problem complexity

x =

0.750

to item size.

Problem complexity

x = 2~ .- E LLo Ox c,e a

50 604030200 10

100 90 SO70 60 50 40 30 20 IO ”

complexity

Size of interval to the size of the interval

I 0.650

0.450

for w (as a fraction

of C)

for w.

n = 200 on the average every number will appear four times already. For a constant length of the interval [u,C, v,C] an increase in the problem size n thus changes the character of the problem instance from a BPP to a Cutting Stock Problem. FFD Packing has been designed to solve the BPP in the first place, but not so much for the ID-CSP. In fact previous tests (WIscher, 1993), even though of a rather fragmentary nature, have shown that FFD Packing does not solve lD-CSP so well. This is confirmed by Fig. 3. It might be confusing that according to Fig. 3 FFD Packing solved more problems to an optimum for u1 = 0.25 than for u1 = 0.15, the latter representing a higher degree of variability of the item weights. An explanation can be derived from a comparison of

384

P. Schwerin and G. Wtischer-The Problem complexity

80

Bin-Packing Problem

in relation to problem size

100

120

140

160

180

200

Problem size n Fig. 3. Multiplicity effect.

Tables l(c) and (d). The respective columns for Windicate that the proportion of problem classes which are difficult in terms of the item weight effect is far larger for vi = 0.15 than for ui = 0.25. According to the factors which have been identified here, one should expect that large problem instances characterised by W = l/3 and a small interval from which the item weights have been taken, are the hardest ones for FFD Packing. Table l(d) confirms this conclusion (cf. the results for the problem classes (C = 1000, n 2 60, u1 = 0.25,0.4 I u2 s 0.5)).

5. EXPERIMENTS

WITH MTP

5.1. Brief characterisation of MTP

MTP (Martello-Toth-Procedure) can be characterised as an implicit enumeration procedure. It starts with an initial solution that is generated through FFD Packing. Then, by backtracking, the remaining branches of the solution tree are explored. Generally, MTP can be considered as an exact algorithm. However, in order to avoid unacceptable computing times, for the solution of many problem instances, the number of backtrackings has to be limited. By doing so, MTP is - strictly speaking - turned into a heuristic. Nevertheless, MTP is usually considered as ‘. . . one of the best methods for the BPP to date’ (Falkenauer, 1995, p. 179). However, very little reliable information is actually available on how MTP performs on different data structures.

5.2. Evaluation of MTP by Martello and Toth When Martello and Toth introduced their method (Martello and Toth, 1990), they evaluated it through a series of numerical experiments. To the best of our knowledge, no other experience from systematic tests with MTP has been reported in the literature so far. However, we do not consider their experiments as very convincing and will point out some weaknesses of their approach. At this stage we will not analyse their results from the application of MTP, but mainly discuss the complexity of the problem classes they have examined. These were the following: bin capacity: problem size: (absolute) lower limit on item weights: (absolute) upper limit on item weights:

c = loo; 120; 150 n = 50; 100; 200; 500; 1000 I= 1;20;50 u = 100

In Table 2 the values of 1 and u have been ‘translated’ into the corresponding values of vi and u2.

International Transactions in Operational Research Vol. 4, No. 516

385

Table 2. Number of problem instances solved to a proven optimum by FFD Packing (problem parameters set to those of Martello and Toth, 1990, N = 100)

n

C=lOO [I, 1001

v, = 0.010

120,1001 [50. 1001 c=120 II,

200

500

1000

w

50

100

99

93

07

64

63

0.505

98

96

66

65

91

0.600 0.750

Y2= 1.0

0.200 0.500

100

100

100

100

100

v2 = 0.633

1001

0.500

v,=0.009

95

92

63

80

76

0.505 0.564

[20, 1001

0.167

99

96

67

64

61

[50. 1001

0.417

100

100

100

100

100

cc150 11. 1001

v2 = 0.667

0.709 0.500

v, = 0.007

[20. loo]

0.133

150, 1001

0.333

92

100

100

100

93

90

0.504

0

0

0.567

100

100

0.667

Firstly, we note that on first sight, the sizes of the problem instances treated are impressive. A closer look, however, makes clear that problem classes with n = 500 and n = 1000 in fact are of the cutting-stock type. The average multiplicity of each possible item weight wi (which again is an integer number) varies between 5 (n = 500, wis [l, 1001) and 20 (n = 1000, WOE[SO, 1001). For problems of this kind there exist excellent solution methods which almost solve each problem instance (no matter what the actual data structures are) to an optimum (cf. W&her and Gau, 1996). Thus, from today’s point of view the experiments of Martello and Toth with n = 500 and n = 1000 have to be considered as inadequate for the evaluation of MTP (at least in this specific combination with the length of the intervals from which the item weights are taken). The evaluation of the complexity of the remaining problem classes is based on the behaviour of FFD Packing on test problems from these classes. Like in our tests with FFD Packing we have generated 100 problem instances each with BPPGEN, to which then FFD Packing has been applied. For each class the number of instances which were identified as having been solved optimally is listed again in Table 2. In particular, the results for wit [SO, 1001 catches one’s eye. FFD Packing already solves all these instances to an optimum. A closer look at the problem data reveals that at least for C = 100 every algorithm - even heuristic ones - should always be able to find an optimum. As all item weights are equal or larger than half the bin capacity, the only optimal solution consists of bins eac.h filled with one item and, perhaps, one or more bins filled with two items of weight 50. By a similar line of argument, one can show that the complexity of the problem instances does not significantly increase when the bin capacity is set to C = 120 and C = 150, respectively (cf. results for problem classes with u1 = 0.35 in Table l(e)). Also for most of the remaining classes it becomes evident that they do not really offer a good benchmark for the evaluation of MTP. Apart from the classes (C = 150, n = 50, wie [l, 1001) and (C = 150,n 2 50, WOE[20,100]) they have all proven to befli-easy. As MTP includes FFD Packing as a starting routine, good results of MTP for instances from these classes would have to be attributed to FFD Packing in the first place but not to specific features of MTP. We conclude that out of 45 classes of the BPP Martello and Toth considered for their tests, only four represent an acceptable basis for the evaluation of MTP. This is also confirmed by the respective item weights Wof these problem classes and the different lengths of the intervals from which the item weights have been taken. They already indicate that these problem classes cannot be very difficult. One definitely has to disagree with Martello and Toth, who claim ‘. . . that the problems generated can be considered “hard”, since few items are packed in each bin’ (Martello and Toth, 1990, p. 244). On the contrary, their test problems have been shown as easy for FFD Packing, and thus also as easy for MTP.

386

P. Schwerin and G. W&her-The

Bin-Packing Problem

5.3. Test problems and test procedure for MTP

MTP has only been applied to instances of such classes of the BPP which have been identified as ffd-hard. This was a total number of 145 classes. Furthermore, only ffd-hard instances have been considered as test problems, i.e. problem instances for which FFD Packing provided solutions which could not be proven to be optimal. From each ffd-hard problem class, 100 ffd-hard instances have been generated such that MTP has been run on a total number of 14 500 instances. Again, for each problem class, BPPGEN has been started anew according to the seed-code described in Section 4.2. Generation of test problems, however, continued until 100 ffd-hard instances had been identified. Thus each problem class consisted of those instances which had not been solved to a proven optimum in the initial test of FFD (as can be seen from Table 1) plus a respective number of new ffd-hard problems. For our tests we used the code of MTP that is provided with the book of Martello and Toth. In order to avoid unacceptable computing times we set the maximum number of backtrackings to 50000. This seems reasonable as additional tests with 9900 problem instances showed that increasing the number of backtrackings to 60000 led to an improved solution in 18 cases, only. In order to evaluate its solution quality, we chose the number of instances of each class for which MTP managed to improve the status provided by FFD Packing, i.e.

?? ??

either by generating a solution with a smaller number of bins, or by identifying a solution provided by FFD Packing as being optimal.

5.4 Results The results from the experiments with MTP are presented in Table 3(a)-(d) (for ui = 0.35 no ffd-hard problem instances could be generated). For the ffd-hard problem classes with u1 = 0.001 it is evident that the solution quality deteriorates with an increase in the size of the problems. While for n I 80 MTP still seems to work adequately, the results for larger instances are rather unsatisfactory. The solution status is improved for less than 50% of these test problems. Or in other words: If FFD Packing does not provide an optimal solution for an instance of this type, then there is only a slight chance that MTP will be able to find it. On the other hand, however, these results should not be overrated, as ffd-hard problems with u, = 0.001 are not very common and it may take the generation of several hundreds of instances in order to identify 100 test problems. For ui = 0.05 the behaviour of MTP is nearly the same as for vi = 0.001. In addition for n > 140 and u2 > 0.5, which are not ffd-hard classes for vi = 0.001, MTP performs satisfactorily. For u1 = 0.15 we again observe that the solution quality deteriorates when the problem size grows. If we expect MTP to improve the status of at least 50% of the test problems, then the results for the ffd-hard problems can be looked upon as satisfactory. For the extremely ffd-hard problem classes the results are less uniform. Significant improvements have been achieved for ut = 0.5 and u2 = 0.6, while for smaller values of I+ MTP obtained an improved status only less frequently. Particularly noteworthy are the results for u,_= 0.2. The results for u1 = 0.25 perhaps are the most convincing ones. For almost each ffd-hard and extremely ffd-hard problem class MTP represents a significant improvement in relation to FFD Packing. Only for two problem classes the percentage of test problems for which the solution status has been improved is smaller than 50%. On the other hand, while FFD Packing failed completely to provide a proven optimum for instances with u2 = 0.4 and n 2 60, MTP obtained an improved status for almost every instance. Again we note that also for MTP problems characterised by W x 0.33 (u, = 0.15, u1 = 0.5) appear to be significantly more difficult than other classes of problem instances. Generally we note that the solution quality deteriorates with an increase of the problem size. Unlike the results of Martello and Toth suggest, problem instances of size n = 500 and n = 1000 cannot be solved satisfactorily by MTP. Even for smaller instances which have been considered here it is not guaranteed that MTP finds an optimal solution in reasonable time.

International Transactions in Operational

Table 3. Number

of Rd-hard

problem

instances

Research

Vol. 4, NO. S/6

per class for whtch MTP obtained

(a) v, = 0.001

an improved

20

40

solution

(N = 100)

(b) v, = 0.05 ”

“2

387

60

60

100



120

140

160

160

2w

"2

20

40

60

60

100

40

60

60

100

120

140

IM)

160

200

120

140

160

160

2w

0.1 0.2

0.2

03

0.3

0.4

0.4 0.5

05

.4;

0.6

0.6

0.7

0.7

0.8

0.6

0.9

09

1.0

10

(c)v, = 0.15

(d) Y, = 0.25 n

"2

20

40

60

60

100

n 120

140

160

160

200

"2

20

0.1 0.2 0.3 0.4

:;+i

0.5

:.sLq

0.6 0.7 06 0.9 1.0

6. CONCLUSIONS

AND OUTLOOK

It has been shown that FFD Packing performs very well on various classes of the BPP. Even though FFD Packing is of heuristic nature, it solves almost every problem instance from such ffd-easy classes to an optimum. Thus, the main area of application for MTP should be seen in those problem classes which have proven to be hard and extremely hard for FFD Packing. For several of these problem classes MTP will lead to improved or even optimal solutions for a significant proportion of instances. However, our experiments also indicate that there is still the necessity for ongoing research. In particular, the size of the problem instances which can be solved to a proven optimum in reasonable computing time still appears to be unsatisfactory.

REFERENCES Coffman, E.G., Garey, M. R. and Johnson, D. S. (1984) Approximation algorithms for bin-packing - an updated survey. In Algorithm Desiynfor Cornpurer Sysrern Design, eds G. Ausiello, M. Lucertini and P. Serafini, pp. 49-106. Springer. Berlin. Dyckhoff, H. (1990) A typology of cutting and packing problems. European Jourd of Operational Resmrch, 44, 145--l 59. Eilon, S. and Christofides, N. (1971) The loading problem. Manngentettr Scimce, 17, 259-267. Falkenauer, E. (1995) Tapping the full power of genetic algorithm through suitable representation and local optimization: application to bin packing. In Euolurionary Alyorithms in Mnnnyernerlt Applications. eds J. Biethahn and V. Nissen, pp. 167-182. Springer, Berlin. Garey, M. R. and Johnson, D. S. (1979) Compurrrs rend Introctobility: A Guide to the Theor.v of NP-Complrteness. W. H. Freeman, San Francisco. Gau. T. and Wascher, G. (1995) A problem generator for the standard one-dimensional cutting stock problem. Europem

388

P. Schwerin and G. Wiischer-The

Bin-Packing Problem

Journal of Operational Research, 84, 512-579.

Gilmore, P. C. and Gomory, R. E. (1961) A linear programming approach to the cutting stock problem. Operations Research, 9, 849-859.

Hochbaum, D.S. and Shamir, R. (1991) Strongly polynomial algorithms for the high multiplicity scheduling problem. Operations Research, 39, 648-653.

Hung, M. S. and Brown, J. R. (1978) An algorithm for a class of loading problems. Naval Research Logistics Quarterly, 2S, 289-297.

Marcotte, 0. (1986) An instance of the cutting stock problem for which the rounding property does not hold. Operations Research Letters, 4, 239-243.

Martello, S. and Toth, P. (1990) Knapsack Problems - Algorithms and Computer Implementations. John Wiley, Chichester. Ong, H. L., Magazine, M. J. and Wee, T. S. (1984) Probabilistic analysis of bin packing heuristics. Operations Research, 32, 983-998.

Simchi-Levi, D. (1994) New worst-case results for the bin-packing problem. Naval Research Logistics Quarterly, 41,579-585. Vance, P. H., Barnhart, C., Johnson, E. L. and Nemhauser, G. L. (1994) Solving binary cutting stock problems by column generation and branch-and-bound. Computational Optimization and Applications, 3, 11l-130. Wiischer, G. (1993) One-dimensional integer cutting stock problems. Paper presented at the 1993 Joint DGOR/NSOR Conference, 25-27 August, Amsterdam, Netherlands. Wlscher, G. and Gau, T. (1996) Heuristics for the integer one-dimensional cutting stock problem: a computational study. Operations Research Spektrum, 18, 131-144.

Wascher, G. and Schwerin, P. (1998) A new bound for the bin-packing problem and its integration into MTP (in preparation).

APPENDIX SUBROUTINE BPPGEN (N,C,Vl,V2,Z,M, WU,Q,DUM) C C Generates an instance of the one-dimensional Bin-Packing C Problem. The format of the resulting problem instance is C identical to that of the generator CUTGENl C (cf. Gau and Wlscher, 1995) C C C C C C C C C C C C C C C C C

uses ran4 hpsort from Numerical Recipes Software In

N C Vl v2

InOut Out

DUM Z M wu

Q INTEGER REAL DIMENSION

C C

number of items to be packed, N i = 1000 capacity of the bin lower bound for the relative weight of items as a fraction of the bin capacity upper bound for the relative weight of items as a fraction of the bin capacity O
testing if 0 < Vl < = V2 < = 1, otherwise abort IF (Vl.LT.O).OR.(Vl.GT.V2).OR.(V2.GT.l)) GOT0 999 C generate N pseudo-random numbers in [Vl*C,V2*C] DOlOOI=l,N ZZZ = RANO(Z) DUM(1) = INT((V1 + (V2 - Vl)*ZZZ)*FLOAT(C) + ZZZ) 100 CONTINUE sort dummy-vector in non-increasing order C CALL HPSORT(N.DUM) C sort items in WU; sum uprepeated item weights II = 1 WU (II) = DUM (N) Q(I1) = 1 DO2COI=N-1,1,-l IF (DUM(I).EQ.WU(II)) THEN Q(H) = Q(H) + 1 ELSE II = II + 1 WU(I1) = DUM (I) Q(I1) = 1 ENDIF 200 CONTINUE

International Transactions in Operational Research Vol. 4, No. 5/6 C

register number of different item weights M = II 999 CONTINUE RETURN END

389