Solution procedures for cutting lumber into furniture parts

Solution procedures for cutting lumber into furniture parts

European Journal of Operational Research 73 (1994) 495-501 North-Holland 495 Theory and Methodology Solution procedures for cutting lumber into fur...

438KB Sizes 41 Downloads 58 Views

European Journal of Operational Research 73 (1994) 495-501 North-Holland

495

Theory and Methodology

Solution procedures for cutting lumber into furniture parts * Celso Carnieri Departamento de Matematica da Universidade Federal do Parana, Curitiba, PR, Brazil

Guillermo A. Mendoza Department of Forestry, University of Illinois, Urbana, II, 61801, USA

Luciano G. Gavinho CalculoExato, Curitiba, PR, Brazil Abstract: Knapsack algorithms are developed to determine the optimal cutting pattern of a parent material (lumber or particle board) into combinations of furniture parts with different sizes. Two heuristic algorithms are also developed to enhance the computational efficiency of the knapsack algorithms, as well as to increase the expected recovery or efficiency of the cutting patterns. Keywords: Knapsack algorithms; Furniture manufacturing; Cutting stock problem; Cutting patterns

Introduction The problem of determining the optimal mix of lumber input to cut in order to satisfy an order (i.e. demand) of dimension parts is a relevant and very difficult problem. It is difficult because of the significant, almost infinite, number of ways to cut dimension parts with different sizes, from lumber which also have different lengths and widths. Even with one lumber alone, the number of ways to cut a set of dimension parts is very large. The optimal lumber cutting problem is similar and hence lends itself well to models developed * This work was done while the first author was a visiting scientist at the Department of Forestry, University of Illinois. This study was partially funded by CNPq-Brazilian National Council for Scientific and Technological Development, Contract No. 201097/91-5 (NV). Correspondence to: Dr. G.A. Mendoza, Department of Forestry, University of illinois, Urbana, IL 61801, USA.

in the steel manufacturing industry. The similarity between metal plate cutting and lumber cutting is clear; they both can be viewed as fitting smaller rectangles from bigger and wider parent stocks. One of the most commonly used models for solving metal cutting problems is the knapsack model. Haessler and Sweeney (1991) provides an excellent review of various cutting stock problems and solution procedures. Foronda and Carino (1991) described one of the first applications of these techniques in furniture manufacturing.

The lumber cutting problem Consider a set of K different sizes of plates (i.e. lumber) in stock with limited quantity. Type k has width W k, length Lk, price (or cost of procurement) Ck, and N k units available. Sup-

0377-2217/94/$07.00 © 1994 - Elsevier Science B.V. All rights reserved SSD! 0 3 7 7 - 2 2 1 7 ( 9 2 ) 0 0 0 0 6 - X

C. Carnieri et al. / Solution procedures for cutting lumber into furniture parts

496

pose an order is placed for each of the m sizes of blanks or furniture parts (of with w i, and length l i) and a quantity demanded equal to di, i = 1. . . . . m. The problem then becomes: which type of lumber to cut and how should they be cut in order to satisfy the demand (order) with the least lumber procurement cost possible? Cutting p a t t e r n

The type of cut considered here is a guillotine cut; that is, the lumber is cut from end to end. Each cutting pattern generates blanks or a set of furniture parts of various sizes. A cutting pattern j can be represented by a vector whose i-th component is a~k), representing the number of blanks of type i that will be cut following the cutting pattern j, using plate k. The decision variables are x k, the number of lumber k cut using pattern

j. The lumber cutting pattern problem is formulated as follows: (P1) Min s.t.

TC= ~ ~.,Ckx k k j Z Z a ikj x jk >__di, k

(1)

Max

Hla I + H2a 2 + • • • +Hma m

(4)

s.t.

[ a l , a 2 . . . . . am] corresponds to a cutting pattern for the rectangle W × L,

where: ai

= Number of type i rectangles cut.

Width and length of the rectangle (lumber) in stock. The problem above is solved in two stages: (i) for all widths wi, calculate Hi*, the optimum value obtainable by fitting rectangles wj × li, where wi < wi, end to end, into a strip of width w i and length L. For each i, a one-dimensional knapsack problem formulated below is solved: W,L=

(P2) i = 1.... , m,

(2)

j

~_,xk < N k ,

number of potential cutting pattern which would be almost impossible to generate and handle computationally. Instead of trying to generate all the cutting patterns, only one is generated in each iteration following the approach developed by Gilmore and Gomory (1965). This procedure 1 can be described as follows: Using the shadow prices H i , . . . , H m associated to constraint (2) in P1, solve the following problem:

k= l,...,K,

Max

Hi* ----l ] l a 1 + / / 2 a 2 + --" + H i a i

s.t.

lla 1 +12a2 + "'- + l i a i < _ L ,

(3)

(5) (6)

aj _> 0, integer,

J

x k > O,

where TC = Total lumber procurement cost. C k = Cost associated to lumber type k. x~ = The number of lumber type k cut following cutting pattern ]. di = Amount ordered for dimension part i. a~ = The number of dimension part i obtained from lumber type k following cutting pattern j. N k = The amount of lumber type k available in stock. Constraint (2) defines the amounts of blanks required, and (3) is the lumber availability constraint. The k n a p s a c k p r o b l e m

The main difficulty in the lumber cutting problem is in the generation of the cutting patterns. In fact, there may be a significant, almost infinite,

where aj = Number of times the blank i appears in the strip. It is assumed in the problem above that the blanks (rectangles) are indexed and ordered such that wi ~_~Wi+l, i = 1, 2 . . . . , m - 1. (ii) The optimum value for the objective function in (4), H l a 1 + . . . +l-Imam, is obtained by solving one more knapsack problem: (P3) Max

II~'b 1 + H~'b 2 + ""

S.t.

Wlb 1 + w2b 2+ ''"

+l-l'rob m

(7)

+wmb m ~ W,

(8)

b i > 0, integer, where: Hi* = v a l u e obtained from the first knapsack problem corresponding to various widths. 1 Without loss of generality, the procedure described here is only for one lumber type; hence the index for lumber type k is omitted.

C. Carnieri et aL / Solution procedures for cutting lumber into furniture parts

bi = Number of dimension parts W = Width of lumber. The problems in P2 and P3 can Dynamic Programming and the tionship described by Gilmore and

of width w i. be solved using recursive relaGomory (1961)

as:

Max

Fs( x )

=Max for s > 1.

{IIs+Fs(x-ls),

Fs_l(x)} (9)

Fs(X) is the value of the best combination that can be fitted into a stock of length x using only the first s variables. The solution procedure involves the systematic creation of a table consisting of the optimal values of Fs(x) for various values of the state variable x following the classic Dynamic Programming procedure involving discrete states. In constructing a table for the calculation of the optimum values Fs(L) , s = 1, 2 . . . . ,m, a question arises: For which x should one calculate (9)? Or, is it necessary to generate and evaluate all possible 'states' of the DP problem in (9)? This requirement will mean specifying all possible combinations of length, li, that could be fitted at various positions within the length L. In the case of the lumber cutting problem, this implies generating all combinations of dimension parts, l i (i = 1 , . . . , m) that could be fitted within a lumber of length L. Operationally, this could be done by taking the maximum common divisor a of the numbers /1, 12. . . . . lm, L, and then make x = a, 2a, 3a . . . . , which could conceivably be very large. For example, if l 1 = 50, l 2 = 80, l 3 = 35, l 4 = 112, and L = 275, then a = 1 and x would assume all the integer numbers from 35 to 275. Consequently, the states of the system would involve all integers between 35 and 275. If the number of widths and L is large, then the number of states could potentially be very large, creating computational and data manipulation problems in software development. However, some states of the DP problem are not necessary in calculating the optimal Fs(L). Typically, only some of these states are involved in the forward recursion of DP. Hence, to increase computational efficiency, it would be useful to generate only the potentially useful set of values for x (i.e. useful states of the DP problem). In a similar but different formulation, Hertz

497

(1972) suggested the 'canonical dissections' used in a recursive algorithm without using Dynamic Programming. The dissections correspond to the useful numbers; however, our construction is more direct. The following section describes a heuristic algorithm for generating the useful set of state variables in the context of the lumber cutting problem.

Procedure for generating the useful numbers Step la. Calculate/3 = min{/i, i = 1. . . . , m). Step lb. Define U (m+~) = F ( m + l ) = {L}, and set k=m. Step Z Compute F ~k)= { u - j * lk; u ~ U ~k+l), j = 1 , 2 . . . . . and U--J*Ik>/3}. Step 3. Set U Ck) = F ~k) U U ~*+ ~). Remove any equivalent number from U k. Step 4. If k > l , set k ~ k - 1 and go to Step 2. Otherwise, stop. U o) is the list of the useful numbers. For the example described previously involving 4 lengths (35, 50, 80, and 112) and L = 275, the above procedure generated 41 useful numbers. This represents only 17% of the 240 total possible combinations generated by the standard procedure using multiples of a. Undoubtedly, this represents substantial savings in computational time and significant increase in efficiency. In the case of the lumber cutting problem, this heuristic procedure could substantially increase the capability of the model to accomodate more furniture sizes as well as enhance the possibility of implementating the lumber cutting algorithm on-line in view of the reduced computational time.

Cutting parts within strips The procedure described in P2 and P3 optimizes cutting of lumber, and with slight modifications, cutting particle or other composite boards for dimension or furniture parts. Carnieri et al. (1991) describes applications of these models for various cutting scenarios: 1) when direction of grain matters (e.g. hardwood lumber); 2) when direction of grain does not matter (e.g. composite or particle boards); 3) when the first cut is along the length (i.e. rip-first); 4) when the first cut is accross the length (i.e. crosscut-first); or 5) any combination of these cutting scenarios.

C. Carnieri et al. / Solution procedures for cutting lumber into furniture parts

498

It should be pointed out that the procedures in P1, P2, and P3 could possibly lead to sub-optimization. This possibility stems from the inherent characteristics of the formulation in P2 where only one blank can use the width of one strip. An improvement may be possible if more than one blank of a given length could be cut from any one of the strips of width wi. The algorithm defined in (i) and (ii) represented by P2 and P3, can produce a cutting pattern like in Figure 1, where the void space S is not used. A procedure that can use part of all of the space S is described in Gilmore and Gomory (1965) as follows: Calculate G(x,

y) =

max {g(x, o <-Xo~ ½x O<--yo<--½y

y),

7/~//////////,

R R

Figure 2, ModifiedCutting Patterns

this new recursion, any number of similar rectangles can be fitted in the same strip. The procedure is described in the next section. Procedure f o r two-dimensional k n a p s a c k with a possibility o f a third stage

G ( x o, y ) + G ( x - x o, y ) ,

O(x, yo) + O(x,

y-yo)},

where G ( x , y) is the maximum value that can be obtained from an X x Y rectangle using w i X l i rectangles at price H i and any succession of guillotine cuts and g(x,

y ) = m a x H i. wi <_x Ii ~ Y

However, this recursion is time consuming, requires significant memory, and impractical in many situations. The approach of Wang (1983) is also impractical in most cases for the same reasons. A slight modification of (9) can produce cutting patterns like those described in Figure 2. In

This procedure is a modification of the standard procedure described in P2 and P3. The procedure still involves solving two knapsack problems in two stages; (i) and (ii) represented by P2 and P3. The modification lies in the formulation of the first stage knapsack problem which is now solved for each width i as shown in (10) below. Hence, the two stage modified procedure are described in (i) and (ii) below. (i) For each i, solve the following one-dimensional knapsack problem: Max

H i * = H l a 1 -4- H 2 a 2 -4- • • • + l ~ i a i

s.t.

l l a 1 + Iza 2 + • • • + l i a i ~ L ,

(10)

aj >__O, integer,

where 1I; = I I y [ w i / w j ] , j = 1, 2 . . . . , i.

I Figure 1. Standard cutting pattern

I

ay = Number of times the blank j appears at the lower part of the strip with width wi. The number of times the blank j will appear in the strip is a / * [ w i / w j ] . Observe that it is no longer possible to use the recursion in (9) to solve all the knapsack problem in (10) together. In this case it is preferable to use the branch and bound algorithm (Gilmore and Gomory, 1963). Another observation concerns the partial pricing in linear programming. Substantial reduction in computing time is obtained when (10) is applied only after (5) and (6) cannot produce a good cutting pattern to enter the basis.

C. Carnieri et al. / Solution procedures for cutting lumber into furniture parts

499

Table 1 Width in inches

Length in inches

Prices

(wi)

(li)

(Hi)

3 4 6

12 11 20

3.4 4 11

4

11

11

11

~j~Y/./;:,:'x> ~h5

V/,

4

11

20

(ii) Given the solutions in (i), the problems in (7) and (8) are solved.

34

Figure 3. Optimal cutting pattern (Standard Procedure)

Numerical example

(along the length) were generated:

To exemplify the algorithms described in the previous sections, a sample problem is presented. The problem involves the cutting of a parent stock which has a width of 14.5 inches and length of 34 inches. Three blanks are to be cut, with sizes (in inches) and prices as given in Table 1.

x ~ {11, 12, 14, 22, 23, 34}

Standard procedure

x ~ {3.5, 4.5, 5.5, 6.5, 7.5,

Solving P2 using Dynamic Programming and the recursive relationship described in (9), Table 2 was generated. Again, using the procedure for determining the useful numbers, P3 is solved with the following states:

8.5, 10.5, 11.5, and 14.5}. Following the procedure for determining the 'set of useful numbers', the following 'states' Table 2 Optimal values of Fs(x) for P2 X

S

1

2

3

11 12 14 22 23 34

0 3.41 3.41 3.41 3.41 6.81

42 42 42 82 82 122

42 4z 42 113 113 153

Table 3 Optimal values of F,(x) for P3 X

3.5 4.5 5.5 6.5 7.5 8.5 10.5 11.5 14.5

Given the values of Hi* from Table 2 (H1* = 6.8; He* = 12; H3* = 15), P3 is solved using DP and the recursive relationship in (9). The results are summarized in Table 3. The optimal solution or cutting pattern is shown in Figure 3 with the maximum objective function value equal to 39. Modified knapsack procedure

For Step (i) of the modified procedure, one table must be constructed for each width. Hence, Tables 4, 5 and 6 are generated for widths 1, 2, and 3, respectively. Tables 4-6 complete the solution for P2. Given the values of Hi*, P3 is solved and the results are summarized in Table 7. The optimal cutting pat-

S

1

2

3

Table 4 Optimal values of Fs(x) for width 1

6.81 6.81 6.81 13.61 12.61 13.61 20.41 20.41 27.21

6.81 122 122 13.61 18.82 242 25.62 30.82 37.62

6.81 122 122 153 18.82 242 273 30.82 393

x 11 12 14 22 23 34

HI = Hi[w1/wl] = 111.

s= 1 0 3.4 I 3.4 t 3.31 3.41 6.81

C. Carnieri et aL / Solution procedures for cutting lumber into furniture parts

500

Table 5 Optimal values of Fs(x) for width 2 X

S

11 12 14 22 23 34

0 3.41 3.41 3.41 3.41 6.8

H1 =//l[W2/Wl]

tern is shown in Figure 4. Note that the optimal values of the objective functions are 39 and 41.8 for the standard procedure and the modified procedure, respectively. The difference, 2.8, represents the improvement due to the modified procedure.

42 42 42 82

82 122

Summary and conclusions

= [11"

fi2 =//2[W2//W2] = [12" Table 6 Optimal values for Fs(x) for width 3 X

S

11 12 14 22 23 34

1

2

3

0 6.81 6.81 6.81 6.81 13.61

42 6.81 6.81 82 82 13.61

42 6.81 6.81 113 113 17 s

H1 = III[W3/W1]

= HI

*2 =

6.8.

~ 2 = H 2 [ w 3 / w 2 ] = [12 = 4. H3 = [ 1 3 [ w 3 / / w 3 ] = / / 3 = 11.

Table 7 Optimal values of Fs(x) for P3 X

S

3.5 4.5 5.5 6.5 7.5 8.5 10.5 11.5 14.5

1

2

3

6.81 6.81 6.81 13.61 13.61 13.61 20.41 20.41 27.21

6.81 122 122 13.61 18.82 242 25.62 30.82 37.62

6.81 122 122 17.83 18.82 242 29.83 30.82 41.83

The cutting of lumber or particle boards into furniture parts is a complex problem which could be conveniently solved using knapsack-based cutting stock algorithms developed in the metal industry. This paper describes some refinements of previously developed algorithms to address some of the production conditions and problems faced by furniture manufacturers. In particular, the algorithmic improvements described focus on two areas: 1) generation of 'useful numbers' or 'states', and 2) the modified procedure that allows the possibility of cutting two or more blanks within one strip (see Figure 2). The first refinement is significant because orders of furniture parts generally come with a wide variety of sizes, both in length and width. Hence, the procedure for generating 'useful numbers' could reduce the amount of computation considerably. The second refinement is also crucial because it could substantially increase the efficiency and recovery rates for furniture manufacturing. This procedure is particularly useful for cutting particle boards because of their uniform or homogeneous quality, allowing for the cutting of one or more blanks or parts within a strip.

References

11

11 6

1

3 20

12 34

Figure 4. Optimal cutting pattern (Modified Procedure)

Carnieri, C., Mendoza, G.A., and Gavinho, L.G. (1991), "Optimal cutting of lumber into dimension parts: overview of some knapsack algorithms and heuristic procedures", Working paper No. 1, Department of Forestry, University of Illinois. Foronda, S.U., and Carino, H.F. (1991), "A heuristic approach to the lumber allocation and manufacturing in hardwood dimension and furniture manufacturing", European Journal of Operational Research 54, 151-162. Gilmore, P.C., and Gomory, R.E. (1961), "A linear programming approach to the cutting stock problem", Operations Research 9, 848-859.

C. Carnieri et al. / Solution procedures for cutting lumber into furniture parts Gilmore, P.C., and Gomory, R.E. (1963), "A linear programming approach to the cutting stock problem, Part If", Operations Research 11, 863-888. Gilmore, P.C., and Gomory, R.E. (1965), "Multi-stage cutting stock problems of two or more dimensions", Operations Research 13, 94-120. Haessler, R.W., and Sweeney, P.E. (1991), "Cutting stock problems and solution procedures", European Journal of Operational Research 54, 141-150.

50l

Herz, J.C. (1972), "Recursive computational procedure for two-dimensional stock cutting", IBM Journal .for Research and Development September. Wang, P.Y. (1983), "Two algorithms for constrained two-dimensional cutting stock problem", Operations Research 31, 573-586.