... to compute the number of terms in the polynomial . In fact, each item in polynomial. (. â. = +. +. + le ...... Vol. 25, pp. 30-44. Cung,V. D. and Hifi, M. et al, 2000.
A HEURISTIC DYNAMIC-PROGRAMMING ALGORITHM FOR 2D UNCONSTRAINED GUILLOTINE CUTTING X.Song Shenyang Institute of Automation, Chinese Academy of Sciences Département LOSI, Université de Technologie de Troyes 12 rue Marie Curie-BP 2060, 10010 Troyes Cedex, France
C.B.Chu Département LOSI, Université de Technologie de Troyes 12 rue Marie Curie-BP 2060, 10010 Troyes Cedex, France
Y.Y.Nie Shenyang Institute of Automation, Chinese Academy of Sciences Lab. 2, 114, Nanta Street, Shenyang, Liaoning, P.R.China
ABSTRACT In this paper, a heuristic dynamic-programming recursion is proposed for solving unconstrained 2D knapsack problem efficiently. The algorithm we propose is an incompletely enumerative method, in which some intricate cutting patterns may not be enumerated. Compared with the traditional dynamic-programming, the algorithm gives a high percentage of optimal solutions (93%) with a much lowered computational complexity. Some theoretical analyses for the algorithm are performed. Computational results are given for small and medium-sized problems. KEYWORDS
Unconstraint knapsack problem; Heuristic dynamic programming;
1. INTRODUCTION Classical 2D knapsack problem (KP), expressed by words, is as follows: There are in total m types of ordered rectangular sheets. Positive integral li , wi and ci (i = 1,2,Λ , m) are the length, width and value of the i th type of the ordered rectangular sheets respectively. Given a standard stock rectangular sheet R with length L and width W ( i = 1,2,..., N ), the problem consists of finding a feasible cutting pattern so that the total value of the ordered rectangular sheets cut out from the stock sheet is maximized. Let M = {1,2,Λ , m} be the index set. In this paper we consider the following restrictions on the cutting pattern that usually appear in real-life situations. • Only guillotine cuts are allowed. That is, a rectangle is cut from one edge of the rectangle to the opposite edge and the cutting line is parallel to the two remaining edges. • The orientation of the pieces is considered to be fixed, i.e. a piece of length l and width w is not the same as a piece of length w and width l • The number of stages in which the cuts are made is not limited, which is usually called general cutting in literatures. • All sizes (l i , wi ) for i = 0,1, Λ , m are assumed integers and therefore the cuts on the rectangles are to be made in integer steps.
I - 527
IADIS International Conference Applied Computing 2004
Mathematical description of this problem is usually as follows, max
m
∑c s i =1
s .t .
i i
m
∑ l i wi si ≤ LW , i =1
where
si
s ∈ Z m+
(1)
denotes the number of times the piece i appears in the pattern, s = {s1 , s 2 ,Λ , s m } represents
the feasible cutting pattern and Z m+ is a m dimensional non-negative integer vector. The 2DKP is the sub-problem of many complex optimization problems, such as 2D cutting stock problem. As is proved, optimal solutions to integer cutting stock problems can be found only for values of m smaller than typically found in practices, approximate procedures represent the only feasible approach to solving this type of problem. Almost all LP (linear programming) based procedures for solving cutting stock problems can be traced back to Gilmore and Gomory (1961,1963). They described how the next pattern to enter the LP basis could be found by solving an associated knapsack problem (KP). This made it possible to solve the trim loss minimization problem by liner programming without enumerating every feasible cutting pattern. Since then, much of related papers focused primarily on pattern generation. The approaches proposed in the literature may be classified into three categories: 1. Exact algorithms: e.g. dynamic programming [2,7] and branch & bound [5,9]. These algorithms can be used to produce optimal solution. 2. Approximate approaches: If exact algorithm cannot be used, the problem may be solved approximately. People have developed various kinds of approximate algorithms, e.g. some tree search algorithms [4,10,11], And/Or graph approaches [10,11], Wang’s algorithm [11] and other heuristics. 3. Probabilistic convergence algorithms: In recent years, some authors managed to exert the intelligent algorithms in solving cutting problems. We call them probabilistic convergence algorithms because the solutions are convergent with probability one to the optimal solution. The well-known methods of this category are tabu search [1], genetic algorithm [8], simulated annealing [6] and incompletely enumerative method [3, 12]. Among the exact algorithms, the traditional dynamic programming method developed by Gilmore and Gomory (1966) finds an optimal solution in O(n ⋅ L ⋅W ⋅ (L + W )) , where n is the maximum number of the stages that an ordered rectangular sheet needs to be cut out. In this paper, we propose a heuristic dynamic programming algorithm to solve this 2DKP approximately. Compared with the traditional dynamic programming method, the algorithm gives a high percentage of optimal solutions (93%) with a much lowered computational complexity O(m ⋅ L ⋅W ) . In section 2, the algorithm is described in details. In Section 3, the worst case analysis of this algorithm is presented. Section 4 contains the computational study and the discussion about the result. Finally, in Section 5 we present the conclusions.
2. THE ALGORITHM The algorithm we propose, called the Heuristic Dynamic Programming Algorithm (HDP), is an incompletely enumerative method, in which some intricate cutting patterns may not be enumerated. The HDP algorithm finds a local optimum (which is a global optimum in many cases). Correlated concepts are introduced in the next section.
2.1 Two-Times Guillotine Cut We now define the cutting types which are used to determine cutting patterns. In all the definitions guillotine cuts are implicit. Definition 1 (normalized cut and normalized cutting pattern). A cutting pattern is normalized if any cut in that pattern can be moved until both the left-hand
I - 528
y
y x
Non-normalized cutting pattern
x Normalized cutting
Figure 1. Normalized cutting pattern
A HEURISTIC DYNAMIC-PROGRAMMING ALGORITHM FOR 2D UNCONSTRAINED GUILLOTINE CUTTING
edge and the bottom edge of all pieces in the pattern are adjacent to a cut (See Fig. 1). A cut is normalized if it generates normalized cutting pattern. We define that the cuts mentioned in this paper are all normalized cuts. Definition 2 (two-times guillotine cut and two-times cutting type). A cut is a 2-times A C y y D guillotine cut if it produces an ordered i i B rectangular sheet i (i = 1,Λ , m) at the bottom left x of the stock sheet with two times of guillotine x cut (See Fig. 2). A cutting pattern is of two-times (a) The first condition (b) The second condition cutting type if it is obtained by successive twoFig. 2. Two combinatorial conditions of the rectangular pieces times guillotine cuts. We see that only two combinatorial conditions can be obtained with two-times guillotine cut for a stock rectangular sheet of size (x, y ) . The first condition (Fig. 2. (a)) is obtained by first a horizontal guillotine cut, second a vertical cut and the second condition (Fig. 2. (b)) is obtained by first a vertical guillotine cut then a horizontal cut. We found in a large number of numerical experiments that most of the optimal cutting patterns are of two-times cutting type. Thus a heuristic dynamic program recursion was developed to search optimal values in confined spaces.
2.2 Heuristic Dynamic Program Recursion Let F (x, y ) represents optimal value for the cutting patterns of two-times cutting type in a stock rectangular sheet of size (x, y ) , the following theorems are proved as follows: Theorem 2.1. F (x, y ) = max {ci + F (xi , y − yi ) + F (x − xi , y ),ci + F (x − xi , yi ) + F ( x, y − yi ) : i = 1,2,Λ , m , x ≥ xi , y ≥ yi }, x∈ L,y∈ W
(1), where xi , y i denote the length and width of the i -th ordered rectangular sheet ⎧
m
⎫
⎩
i =1
⎭
respectively, L = ⎨ x x = ∑ li ai ,1 ≤ x ≤ L − min{li }, ai ≥ 0 and integer, i = 1,Λ , m⎬ ∪ {L}, L the size of the set L m ⎫ ⎧ W = ⎨ y y = ∑ wi bi ,1 ≤ y ≤ W − min{wi }, bi ≥ 0 and integer , i = 1, Λ , m ⎬ ∪ {W }, W i =1 ⎭ ⎩
the size of the set W .
Proof. Let s1 , s 2 , s 3 and s 4 represent the optimal cutting patterns of two-times cutting type in a stock rectangular sheet of size (x, y − y i ) , (x − xi , y ) , (xi , y − y i ) and (x − xi , y ) respectively, where i = 1,2,Λ , m , x ≥ xi , y ≥ y . Then s 1 + s 2 + s I and s 1 + s 2 + s I (vector s I i is an m-dimensional unit vector, in which the i -th entry equals to 1) are the two feasible solutions for the stock rectangular sheet of size (x, y ) . Thus we obtain F ( x , y ) ≥ max {ci + F ( xi , y − y i ) + F ( x − xi , y ),ci + F ( x − xi , y i ) + F ( x , y − y i ) : i = 1, 2 , Λ , m , x ≥ xi , y ≥ y i } (2) On the other hand, if s is the optimal cutting pattern of two-times cutting type for the stock rectangular {li }, y ≥ min {wi } and there exists an ordered rectangular sheet i ( i = 1,2,Λ , m ) that sheet of size (x, y ), x ≥ min i∈M i∈M satisfies x ≥ xi , y ≥ y i , which can be cut out at the bottom left of the stock rectangular sheet of size (x, y ) , we see that with two times guillotine cut, s − s I is the feasible cutting pattern for the combination of the stock i i
i
rectangular sheet of size (x, y − y i ) and (x − xi , y ) or (xi , y − y i ) and (x − xi , y ) . Thus we obtain: max {F ( xi , y − yi ) + F ( x − xi , y ), F ( x − xi , yi ) + F ( x , y − yi )} ≥ F ( x , y ) − ci
( i = 1,2,Λ
,m ,
x ≥ xi , y ≥ y ) (3)
The proof is concluded by applying relation (2) and (3) together. Note that the values
of
x and y
belongs to the set L and W respectively, which has be analyzed in the literature [2].
□ Theorem 2.2. The complexity of the recursion is O(m ⋅ L ⋅ W ) . Proof. For each given ( x, y) (x ∈ L , y ∈ W ) , recursion (1) needs O (m ) times of operation. Thus the total
computation time of the above mentioned recursion is O ( m ⋅ W ⋅ L ) . □
I - 529
IADIS International Conference Applied Computing 2004
⎢ L ⎥ ⎢ W ⎥ L W , . We have ⎥ , ew = ⎢ ⎥ represent the largest integer less than l l min w min ⎣ min ⎦ ⎣ wmin ⎦
Theorem 2.3. Let el = ⎢
(m − 1) ! . ( j + m − 1) ! Proof. The problem to compute L has the same structure with the problem to compute the number of el
ew
j =1
j =1
L ≤ ∑ C ( j + m − 1, j ), W ≤ ∑ C ( j + m − 1, j )
el
∑ (l
terms in the polynomial
1
j =1
where C ( j + m − 1, j ) =
+ l2 + Λ + lm )
j
. In fact, each item in polynomial (l1 + l2 + Λ + lm ) j represents a
possible combination of lengths of j ordered rectangular sheets. For example, the item l1 ⋅ l2j −1 corresponds to the combination l1 + ( j − 1) ⋅ l2 . To obtain all the possible combination of l1 , l 2 , Λ , l m that satisfy m
∑ξ l i =1
i i
≤ L (ξ i ≥ 0, int eger ) , j should be taken from 1 to
The condition that m
∑ξ l i =1
i i
j > el
el in the polynomial (l1 + l2 + Λ
j + lm ) correspondingly.
will not be considered, because under this condition we have
> L (ξ i ≥ 0, int eger ) according to the definition of
el .
According to the knowledge of combinatorial mathematics, for the given positive integer j and m there are in total C ( j + m − 1, j ) number of terms in the polynomial (l1 + l 2 + Λ + l m ) j . Thus the total number of terms of the polynomial
el
∑ (l j =1
the same for W .
1
+ l2 + Λ + lm )
j
is
el
∑ C ( j + m − 1, j ) . We obtain that j =1
el
L ≤ ∑ C ( j + m − 1, j )
and the proof is
j =1
□
2.3 Main Steps of the Heuristic Algorithm Let G (x, y ) = i * represent the ordered rectangular sheet cut out at the bottom left of the stock rectangular sheet in the optimal cutting patterns of two-times cutting type in a stock rectangular sheet of size (x, y ) . And let Q ( x, y ) = V and Q ( x , y ) = H store the two combinatorial conditions in the Fig. 2. (a) and (b). Let l min = min {l i i = 1,2, Λ , m}, wmin = min {wi i = 1,2, Λ , m} , the algorithm is as follows:
Step 1 If x < l min , or y < wmin , set F (x, y ) = 0 , G (x, y ) = 0 , Q ( x, y ) = 0 . Go to step 2. Step 2 Initialization. Set i = 1 , x = l min − 1, y = w min , F (x, y ) = 0 , G (x, y ) = 0 , Q ( x, y ) = 0 and Z = 0 to store optimal solution for cutting patterns of two-times cutting type. Step 3 Set x = x + span( x), y = y . For each i (i ∈ M ) , compute Z = ⎧max{ ci + F ( xi , y − yi ) + F ( x − xi , y ),ci + F ( x − xi , yi ) + F ( x, y − yi ), if there exist xi ≤ x, yi ≤ y,} ⎨ x < min{xi }, y < min{yi } ⎩ 0,
If Z > F (x, y ) , set F (x, y ) = Z , G (x , y ) = i , Q(x, y ) = ⎧⎨V , if Z = ci + F (xi , y − yi ) + F (x − xi , y ) . If x < L , go to step ⎩ H , if Z = ci + F ( x − xi , yi ) + F ( x, y − yi )
3, else go to step 4. Step 4 Set y = y + span( y), x = lmin − 1 . If y ≤ W , set F ( x, y ) = 0 go to step 3, else return. In the above mentioned procedure, span(x) is a function, which returns the span between the current value x (x ∈ L ) to the next one within the set L . It is the same for span( y ) . The heuristic dynamic programming algorithm finds the optimal value F (L, W ) in an orderly way. To find the corresponding cutting pattern, we must use heuristic dynamic programming method again in a reverse way. The procedure is as follows: Step 0 Initialization. Let S = {R}, the list of rectangles still to be cut. Initially, the original rectangle
R = (L, W ) . Let P = φ , the set of pieces already cut. Let cT = 0, the total value of pieces cut. Step 1 While S ≠ φ , the set S of rectangles still to be cut is ordered by increasing area. Step 2 If S = φ , then stop, else take the smallest rectangle of S , Rk = (Lk , Wk ) and set S = S − {Rk } . If
Lk < min i {l i }, or W k < min i {wi } or Lk ⋅ Wk < min i {l i ⋅ wi }, then go to step 2, else go to step 3.
I - 530
A HEURISTIC DYNAMIC-PROGRAMMING ALGORITHM FOR 2D UNCONSTRAINED GUILLOTINE CUTTING
Step 3 For each piece i , i = 1,2, Λ , m , if l i ≤ Lk , wi ≤ Wk , then consider the consequences of cutting the piece i at the bottom left hand corner of R k :Let v1 = F (l i , Wk − wi ) , v 2 = F (Lk − l i , Wk ) , obtained by a first vertical guillotine cut and h1 = F (Lk − l i , wi ) , h2 = F (Lk , W k − wi ) , obtained by a first horizontal guillotine cut, compute Ti = c i + max{v1 + v 2 , h1 + h2 }, else set Ti = 0 . Step 4 For the piece j , such that T j = max i {Ti } . If T j > 0 , then cut piece j at the bottom left hand corner of Rk and set P = P ∪ { j} , cT = cT + c j . If v1 + v 2 ≥ h1 + h2 , then S = S ∪ {(l i , W k − wi ), (Lk − l i , W k )} , else S = S ∪ {(Lk − l i , wi ), (Lk , Wk − wi )} . If T j = 0 , then rectangle Rk is waste. Go to step 1.
⎧⎪⎢ LW ⎥ ⎫⎪ It is clear that the computational complexity of this procedure is O(k ⋅ m) , where k = max ⎨⎢ ⎥ ⎬ denotes i∈I lw ⎪⎩⎣
i
i
⎦ ⎪⎭
the maximum number of ordered rectangular sheets that can appear in the cutting pattern. Thus the general computational complexity of the algorithm is O (max{k ⋅ m, L ⋅ W ⋅ m}) .
3. WORST CASE ANALYSIS Although the HDP algorithm finds the optimal solution for the cutting patterns of 2-times guillotine-type, the solution is not always optimal for the general cutting pattern. That is because some of the combinatorial condition (See Fig. 3) for a stock rectangular sheet of size (x, y ) may not be enumerated with 2times guillotine cut. As in Fig. 3, no ordered rectangular sheets can be cut out with two times of guillotine cut. In this section, we study performance bounds for the HDP algorithm which deals with minimizing waste unconstraint 2DKP. In this case the value ci attributed to each piece is the surface li wi and thereby maximizing the total value is equivalent to minimizing the waste.
6
5
3 y
1
4
2 x
Figure 3. The combinatorial condition not enumerated
3.1 Intricate Structure First we analyze the structure of the cutting patterns that can’t be obtained by successive 2-times guillotine cuts. The following definitions are given: Definition 4 (trip cut) If one of the two new rectangles produced by a guillotine cut contains no ordered rectangular sheet, we call this guillotine cut a trip cut. Definition 5 (0-cut) If for a given stock rectangular sheet of size (x, y ) , an ordered rectangular sheet can be produced by only one time of guillotine cut, we call there xB1 exists a 0-cut so that we can say that this ordered rectangular sheet is cut out with two times of guillotine cuts. D1 D Intricate structure analysis: For a given cutting B pattern, the smaller stock rectangular sheets are generated B1 B2 y successively with guillotine cuts. If for one of the stock rectangular sheets of size (x, y ) , no ordered rectangular C C1 A1 A C2 sheet can be cut out with two-times guillotine cut, we can say that this cutting pattern is not of two-times cutting type. xC1 xA Suppose that there exist a series of guillotine cuts x paralleled to the y-axis (See Fig. 4) and divide the stock Figure 4. Intricate structure rectangular sheet (x, y ) into several strips with the same width y . If there exists a strip that within it no cut paralleled to x-axis is available or only a trip cut is available, the ordered rectangular sheet in this strip can be cut out with 2-times guillotine cut obviously.
I - 531
IADIS International Conference Applied Computing 2004
Now we consider the condition that within each strip there exists at least one horizontal cut paralleled to xaxis, which is not a trip cut. Then there must be four rectangles A, B, C and D cut out (See Fig. 4) and each one contains at least one ordered rectangular sheet. If one of them is an ordered rectangular sheet, then it can be cut out with two-times guillotine cut. If within the four rectangles, there is one that only horizontal guillotine cuts are available. Then there must be an ordered rectangular sheet that can be cut out with twotimes guillotine cut. That is, a vertical cut to obtain the strip firstly and a horizontal cut to obtain the ordered rectangular sheet secondly. Thus the structure of the cutting patterns that can’t be obtained by a 2-times guillotine cut must contain the four rectangles mentioned above and within each rectangle there should be at least one vertical cut (See Fig.4). And if A contains only one ordered rectangular sheet A1, then B must take at least two ordered rectangular sheets B1 and B2 according to the definition of normal cuts (Fig. 1.). It is the same with C and D. We call the structure in Fig. 4 the intricate structure. Only the cutting patterns that contain the intricate structure are not be of two-times cutting type.
3.2 Approximate Ratio Now we proof the approximate ratio of the HDP algorithm as follows: Let OPT (I ) denotes the optimal solution of problem I and HDP(I ) the approximate solution provided by HDP algorithm. We have: Theorem 3.1 If e = max{e l , e w } is equal to 1, 2 or 3, OPT ( I ) = HDP ( I ) . Proof. Given any four u rectangular sheets with length l a , l b , l c , l d and let l a be the minimum length of the four, we have that l a + l b + l c + l d ≥ 4l a . For the case e < 4 , we have 4l a > L . Thus
l a + l b + l c + l d > L is obtained. In this case, the rectangle B1, B2, C1 and C2 can’t exist together in one stock rectangular sheet. That is the intricate structure can’t be contained in any cutting pattern. So the optimal cutting pattern must be of two-times cutting type. The optimal solution found with HDP algorithm is the ٱ optimal solution. Thus we obtain OPT ( I ) = HDP ( I ) . Theorem 3.2 If ei1 = ⎣L l i ⎦ and ei 2 = ⎣W wi ⎦, i = 1,Λ , m , we have that
⎧ ⎫ HDP( I ) ei1 ⋅ ei 2 > max ⎨ i = 1, Λ , m⎬ . ( ) ( ) OPT (I ) e e + ⋅ + 1 1 i2 ⎩ i1 ⎭
Proof. We have that (ei1 + 1) ⋅ li > L ≥ ei1 ⋅ li and (ei 2 + 1) ⋅ wi > W ≥ ei 2 ⋅ wi . So (ei1 + 1) ⋅ (ei 2 + 1) ⋅ l i ⋅ wi > L ⋅ W ≥ ei1 ⋅ ei 2 ⋅ l i ⋅ wi . And we know that the combinatorial condition that only one kind of ordered rectangular sheet is available in the cutting pattern can be enumerated by HDP algorithm. So we have: HDP( I ) ≥ max{ei1 ⋅ ei 2 ⋅ l i ⋅ wi i = 1,2, Λ , m}. ⎧e ⋅e ⋅l ⋅ w ⎫ HDP ( I ) ≥ max ⎨ i1 i 2 i i i = 1, Λ , m ⎬ OPT (I ) L ⋅W ⎩ ⎭ ⎫ ⎧ ⎫ e i1 ⋅ e i 2 i = 1, Λ , m⎬ = max ⎨ i = 1, Λ , m ⎬ ⎭ ⎩ (ei1 + 1) ⋅ (ei 2 + 1) ⎭
And OPT ( I ) ≤ LW clearly, so ⎧ ei1 ⋅ ei 2 ⋅ l i ⋅ wi > max ⎨ ⎩ (ei1 + 1) ⋅ (ei 2 + 1) ⋅ l i ⋅ wi HDP( I ) 4 Theorem 3.3 OPT (I ) ≥ 9
ٱ
.
Proof. By considering a normal optimal cutting pattern we prove that, for e > 3 , the intricate structure can be contained in the cutting pattern. Thus the solution found with HDP algorithm may not be a global optimum. 1 In the case that the optimal solution contains the structure in Fig. 3, we suppose that x A ≤ x be the first 2 guillotine cut, say vertical, in an optimal pattern, which divides the initial stock sheet ( x, y ) into two strips. Then rectangular sheets A, B, C and D are cut out with second horizontal guillotine cuts. Within B and C, we 1 1 1 1 1 1 suppose that l B1 ≤ l B 2 and l C1 ≤ l C 2 , then l B1 ≤ l B ≤ x ≤ L and l c1 ≤ l c ≤ x ≤ L are gotten. 2 2 2 2 2 2 1 1 1 1 If w B1 ≤ y ≤ W or wC1 ≤ y ≤ W . Then we get a piece B1 or C1 that can fit the rectangle (L, W ) 2 2 2 2 HDP ( I ) 4 ≥ is proved. two times in the length and 2 times in the height. Thus by theorem 3.2, OPT (I ) 9
I - 532
A HEURISTIC DYNAMIC-PROGRAMMING ALGORITHM FOR 2D UNCONSTRAINED GUILLOTINE CUTTING
1 1 1 1 1 1 1 y and wC1 > y , we have wa1 ≤ y ≤ W and wd 1 ≤ y ≤ W . And x A ≤ x has been 2 2 2 2 2 2 2 1 1 supposed, we have that l A1 < l A ≤ x ≤ L . So A1 can fit the rectangle (L, W ) two times in the length and 2 2 2
If wB1 >
times in the height. With theorem 3.2,
HDP ( I ) 4 ≥ OPT (I ) 9
is proved also.
HDP( I )
For e ≤ 3 , OPT (I ) = 1 has been proved in Theorem3.1, thus Theorem 3.3 is proved. ٱ
4. COMPUTATIONAL RESULTS To analyze the effectiveness of this algorithm, the worst case analysis is not enough. Some computational experiments must be made. We generate the input-data randomly under different combinations of parameters m, e, (See table 1). The number 1…6 identify the given m and e as defined in Table1. And for each combination of m and e , 100 instances were generated with a uniform distribution on some ranges given below. For a given length L = 200 and width W = 100 of stock rectangular sheet, the length l i and width wi of ordered rectangular ⎡ L ⎡ W L ⎤ W ⎤ sheet i (i = 1,2,Λ , m ) are in ⎢ ⎡⎢ ⎤⎥, ⎡⎢ ⎤⎥ ⎥ and ⎢ ⎡⎢ ⎤⎥, ⎡⎢ ⎤⎥ ⎥ . The required quantities of the ordered rectangular ⎣⎢ e ⎥ ⎢ 2 ⎥ ⎦ ⎣⎢ e ⎥ ⎢ 2 ⎥ ⎦ sheets are not limited for the problem studied is an unconstrained knapsack problem. And the value ci = li ⋅ wi is supposed for convenience.
Table 1. Parameters selection.
No.
m e
1 5 10
2 5 20
3 10 10
4 10 20
5 20 10
6 20 20
Table 2. The performance of the HDP algorithm (L = 200, W = 100 ) .
Opt. Sol. (%) Av. Appr. ratio Min. Appr. ratio
1 99% 0.999 0.999
2 90% 0.994 0.990
3 97% 0.992 0.977
4 88% 0.996 0.992
5 95% 0.997 0.988
6 88% 0.999 0.997
Ave. 93% 0.996 0.991
In Table 2, we can see the performance of the HDP algorithm by referring to the percentage of optimal solutions, the average approximation ratio and the minimum ratio. The average approximation ratio is calculated without considering the cases that the solution is optimal. The knapsack problems were solved exactly by a dynamic programming algorithm. We see that 93% of the instances are optimally solved, whereas the totality of the instances was solved very close to the optimum. The experimental minimum approximation ratio was found to be 0.991 and the average one 0.996. Besides, we see that the selection of parameter e influence the results greatly. With the same parameter m , the larger the parameter e is, the lower the approximation ratio will be. And from the theorem 2.3, we also know that the larger the parameter e is, the larger the parameters W or L will be, thus adds up to the computing time. So this algorithm fits for the condition that the minimum length or width of the ordered rectangular sheet is relatively large to that of the stock rectangular sheet.
I - 533
IADIS International Conference Applied Computing 2004
5. CONCLUSION In this paper, a heuristic dynamic-programming recursion is presented for solving unconstrained 2D cutting stock problem approximately. The parameters L , W that effect the computing time are analyzed and we 4
have shown that this algorithm has approximation ratio equal to 9 . Computational results for a large number of randomly generated problems are given. We see that with the heuristic dynamic-programming algorithm, the computational complexity is much lowered and a high percentage of optimal solutions (93%) can be achieved. Thus with this algorithm, some problem with parameters L , W not too large can be solved effectively with HDP algorithm. Finally, the algorithm can easily be used for solving general Cutting Stock problems.
ACKNOWLEDGEMENT The authors are grateful to one of the referees for making us aware of some references.
REFERENCES Alvarez-Valdés, R., Parajón, A. et al, 2002. A Tabu Search Algorithm for Large-Scale Guillotine (un)Constrained TwoDimensional Cutting Problems, Computers & Operations Research, Vol. 29, Issue 7, pp. 925-947. Beasley, J.E., 1985. Algorithms for Unconstrained Two-dimensional Guillotine Cutting. Journal of Operational Research Society, Vol. 36, No. 4, pp. 297-306. Balas, E. and Zemel, E., 1980. An Algorithm for Large Zero-One Knapsack Problem, Operations Research, Vol. 28, pp .1130-1154. Christofides, N. and Whitlock, C., 1977. An Algorithm for Two-Dimensional Cutting Problems, Operational Research, Vol. 25, pp. 30-44. Cung,V. D. and Hifi, M. et al, 2000. Constrained Two-Dimensional Cutting Stock Problems a Best-First Branch-andBound Algorithm, International Transactions in Operational Research, Vol.7, pp. 185-210. Dowsland, K.A., 1993. Some Experiments with Simulated Annealing Techniques for Packing Problems, European Journal of Operational Research, Vol. 68, pp. 389-399. Gilmore, P.C. and Gomory, R.E., 1966. The Theory and Computation of Knapsack Functions, Operations Research, Vol. 14, pp 1045-1074. Gomez, A. and D de la Fuente, 2000. Resolution of Strip-Packing Problems with Genetic Algorithms, Journal of the Operational Research Society, Vol. 51, pp. 1289-1295. Mhand Hifi, Ouafi, R., 1998. A Best-First Branch-and-Bound Algorithm for Orthogonal Rectangular Packing, International Transactions in Operational Research, Vol. 5, pp. 345-356. Morabito, R.N. and Arenales, M.N., 1992. An and-or-Graph Approach for Two-Dimensional Cutting Problems, European Journal of Operational Research. Vol. 58, pp. 263-271. Morabito, R.N. and Arenales, M.N., 1996. Staged and Constrained Two-Dimensional Guillotine Cutting Problems: An AND/OR-Graph Approach, European Journal of Operational Research, Vol. 94, pp. 548-560. Nie, Y.Y. and Song, X. et al, 2002. Incompletely Enumerative Solution for 1D Cutting-Stock Problem, Far East J. Math. Sci (FJMS), Vol. 5, No.1, pp. 25-46. Wang, P.Y., 1983. Two Algorithms for Constrained Two-Dimensional Cutting Stock Problems, Operations Research, Vol. 31, pp. 573-586.
I - 534