The one dimensional Compartmentalised Knapsack Problem: A case study

The one dimensional Compartmentalised Knapsack Problem: A case study

European Journal of Operational Research 183 (2007) 1183–1195 www.elsevier.com/locate/ejor The one dimensional Compartmentalised Knapsack Problem: A ...

206KB Sizes 1 Downloads 16 Views

European Journal of Operational Research 183 (2007) 1183–1195 www.elsevier.com/locate/ejor

The one dimensional Compartmentalised Knapsack Problem: A case study Robinson Hoto a, Marcos Arenales a b

b,*

, Nelson Maculan

c

Department of Mathematics, Department of Electrical Engineering, State University of Londrina, Londrina, PR, Brazil Department of Applied Mathematic and Statistic, University of Sa˜o Paulo, 13560.970 Sa˜o Carlos, SP, CP 668, Brazil c COPPE – System Engineering, Federal University of Rio de Janeiro, Rio de Janeiro, RJ, Brazil Received 29 September 2004; accepted 27 July 2005 Available online 30 June 2006

Abstract The Compartmentalised Knapsack Problem (CKP) is similar to the ordinary Knapsack Problem except that items to be packed belong to separate classes, and items can only be packed, in knapsack compartments, amongst items in their own class. This paper addresses a case study in the cutting of steel rolls in which the CKP arises. The rolls are cut in two-phases: the first phase produces sub-rolls (compartments) which are, after reducing the thickness, cut in a second phase to produce ribbons (a class consists of ordered items with the same thickness). Finally, two methods of solving CKP are presented, and these are used to generate columns in the classical linear optimisation model of Gilmore and Gomory. Results of computational experiments are presented.  2006 Elsevier B.V. All rights reserved. Keywords: Cutting and packing problem; Knapsack problems; Combinatorial optimisation

1. Introduction In many industries a set of ordered small items are produced by cutting a number of larger objects in such a way as to optimise an objective function (e.g. minimising waste, costs, setups, etc.). Different types of cutting problems can arise depending on some characteristics of the assortment of items and objects, and Wa¨scher et al. (2006) and Dyckhoff (1990) provide a way to organise and characterise them. Cutting problems are, in general, a NP-hard combinatorial optimisation problem, and consist of a fundamental stage in production programming. The cutting problem dealt with in this paper arises from steel industries where a number of steel rolls have to be cut in order to meet the demand of ribbons of different widths and thicknesses. The ribbons are grouped into classes of the same thickness, and the thicknesses of ribbons may or not match the thickness of the steel rolls in stock. Therefore, the rolls must be cut in two phases. Firstly, a roll is cut into sub-rolls which are then reduced in thickness to match the required ribbon thickness (Fig. 1). Then, in a second phase the *

Corresponding author. Tel.: +55 16 33739673; fax: +55 16 33739751. E-mail addresses: [email protected] (R. Hoto), [email protected] (M. Arenales), [email protected] (N. Maculan).

0377-2217/$ - see front matter  2006 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2005.07.030

1184

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

Thickness reduced sub-roll

Sub-roll

Cylinders

Fig. 1. Thickness reduction process.

reduced thickness sub-rolls are cut independently to the ribbon widths in that class (Fig. 2). There are some technical losses in producing sub-rolls, and their widths are constrained to lie within upper and lower bounds. One should cut the rolls considering the constraints and requirements, so that waste is minimised and, since the reducing thickness process is very expensive, the cost involved in it should also be minimised. In creating the arrangement of ribbon sizes to produce sub-rolls we encounter the Compartmentalised Knapsack Problem, which can be stated as the following. A climber wants to load his/her knapsack with items of various classes (e.g., medicine, food, tools, clothes) and for each item a weight and a utility value are given. However, the climber cannot put items of different classes together, so he/she must arrange the available space inside the knapsack into compartments, and put only items of the same class into the same compartment. The capacity of each compartment is lower and upper bounded, and there are costs and loss of knapsack capacity if a compartment is created. The climber has to decide how many compartments should be created and how to load them in order to maximise the total utility value. In Section 3, two solution approaches are presented for the unconstrained version (i.e., no bound on the number of items in the knapsack), which are, in Section 4, extended to the constrained version (that arises when demand is low, especially in residual problems for rounding heuristics, in Section 6). Since the only relevant dimension in the cutting process is the width of the roll, it is firstly classified as a one-dimensional cutting problem. Furthermore, the ordered items, whose demands have to be satisfied completely, can be grouped into relatively few (in relation to the total number of items) classes of identical items, as well as the large objects. These characteristics define a Cutting Stock Problem (Section 5). Therefore, the

Steel Roll

Technical losses

1st Phase

Technical losses

Intermediate Rolls 2nd Phase

Ribbons Fig. 2. Two-phase cutting process.

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

1185

cutting problem studied in this paper can be classified, according to the typology of Wa¨scher et al. (2006), as a one-dimensional cutting stock problem. We also add to the title of the article the cutting process, i.e., the compartmentalisation. The Compartmentalised Knapsack Problem arises as a subproblem (slave problem) in order to solve the Compartmentalised Cutting Stock Problem by the column generation technique of Gilmore and Gomory (1961, 1963). In Section 7, a set of instances which were randomly generated was solved in order to analyse the performance of the methods for typically problem sizes in practice. 2. Literature review Since Gilmore and Gomory’s pioneer articles (1961, 1963) on 1-dimensional cutting stock problems, many papers have been published on this topic. However, only a few articles in the literature are related to the Compartmentalised Knapsack Problem, and they all avoid dealing with it explicitly by either reducing or relaxing the solution space. In the case of reducing the solution space, feasibility is maintained but some feasible solutions are omitted, and in the case of relaxing the solution space, simple heuristics are used to exclude any noncompartmentalised cuttings which might have been generated. Haessler (1979) and Ferreira et al. (1990) generated ordinary 1-dimensional cutting patterns ignoring the compartmentalisation constraints, and by using simple heuristics they tried to organise the items into compartments. Those which could not be so organised were discarded. Vale´rio de Carvalho and Rodrigues (1994, 1995) reduced the solution space in such a way that the sub-rolls are cut to produce only one type (width) of item, i.e., a homogeneous cutting pattern (pattern 1 in Fig. 3). Cutting pattern 2 in Fig. 3 is not obtained by this reduced search. A problem related to the Compartmentalised Knapsack Problem was studied by Johnston and Khan (1995), called the Nested Knapsack Problem. This problem can be formulated as a hiker going to a mountain expedition, who needs to transport a number of items. Initially, the items are loaded into one wagon, then vans are used to unload his/her wagon, at the last railway station. Each van has a capacity restriction. Finally, porters are hired to carry knapsacks loaded with the items. Each porter takes items from just one van. This defines a structure of packing as compartmentalisation. This problem arises, for example, in the manufacturing of optical fibre cables. The main difference between Compartmentalised Knapsack Problems, focused on in this paper, and the Nested Knapsack Problem (NKP) is that the sizes of the compartments of the NKP are given beforehand, and no loss of capacity is incurred due to the inclusion of compartments. Shachnai and Tamir (2001) studied a kind of multiple knapsack problem (which can be seen as a one dimensional cutting stock problem), where feasible loading is constrained by limiting the number of different types (colors) of items. Although this problem can be seen as building compartments (one for each color) inside the knapsack, it differs from our problem since the compartments are not bounded, nor is there a loss of capacity to include a new compartment. This problem is more related to another one of limiting the number of item types in a cutting pattern, which arises from automatic saws with limited unloading stations. Zak (2002) studied a two-phase cutting problem and proposed a column-row generation method. In the row generation phase, a new intermediate roll is considered. Although the problem that Zak attacked can

pattern 1 item 1 item 1

waste

item 1 item 1

item 1 item 1

pattern 2 item 2

item 1 item 2

item 1

Fig. 3. Examples of compartmentalised patterns.

1186

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

be seen as building compartments, it differs from what we consider as a Compartmentalised Knapsack Problem since any items can be combined in any compartment. Regarding his problem, which arises in the paper industry, the two phases (or more) arise because of the cutting process and the items are all of the same class. Correia et al. (2004) studied a production planning problem in a Portuguese paper mill and a cutting optimisation problem of reels and sheets, where the Compartmentalised Knapsack Problem arises, and they used a similar procedure as in Ferreira et al. (1990). 3. The unconstrained Compartmentalised Knapsack Problem Consider a knapsack problem with the capacity given by c to be loaded with up to n items. For each item i 2 N = {1, . . . , n} two integer numbers are given: its utility value ui and its weight pi. The classical knapsack problem is to determine the number of items to be loaded in such a way that the knapsack capacity is not exceeded and the total utility value is maximised. Assume now that the items are grouped into classes (e.g., food, clothes, medicine, etc.) and compartments should be built inside the knapsack so that only items of the same class are loaded into any one compartment. This defines a partition {N1, . . . , Nk} on set N, that is, there are k classes of items. The capacity of each compartment to be loaded with items of class s has a lower max limit, say d min , s = 1, . . . , k. s , and an upper, say, d s In order to prevent trivial infeasibility, it is assumed that: pi 6 d max 6 c for all i 2 Ns, s = 1, . . . , k. s ForP s = 1, . . . , k, consider the set of all integer non-negative linear combination of the weights: wh ¼ i2N s ai pi , ai P 0 and integer, such that d min 6 wh 6 d max , h 2 Vs, where V1 [    [ Vk = V is the set of s s indexes of all combinations, h = 1, h = 2, etc., such that {V1, . . . , Vk} define a partition on set V. The capacities for compartments can be restricted to wh without loss of generality. For the sake of clarity we exemplify the sets with a simple instance. Let N1 = {1, 2}, N2 = {3, 4, 5} (i.e., m = 5 items of k = 2 classes) and the weights are p1 = 3, p2 = 4, p3 = 3, p4 = 6, p5 = 7. Also, let d min ¼ d min ¼ 3 and d max ¼ d max ¼ 10. 1 2 1 2 Then, the integer non-negative linear combinations of weights are given by: for s = 1, w1 = 3, w2 = 4, w3 = 6, w4 = 7, w5 = 8, w6 = 9, w7 = 10, then V1 = {1, 2, 3, 4, 5, 6, 7} and for s = 2, w8 = 3, w9 = 6, w10 = 6, w11 = 7, w12 = 9, w13 = 9, w14 = 10, then V2 = {8, 9, 10, 11, 12, 13, 14}. Note that, with this notation, when we refer to h = 6 (w6 = 9), subset N1 is implicitly considered. Combination w = 9 can also be found in another set, w12 = 9, but when we refer to h = 12, the subset N2 is implicity considered. Also, note that w12 = 3p3 + 0p4 + 0p5 = 9 and w13 = 1p3 + 1p4 + 0p5 = 9, i.e., there are two different ways of combining items of class 2 to obtain the width w = 9. Now we will consider the width combinations without referring to the way of obtaining it. Let Ws be a subset of Vs such that only different values of the combinations are considered. For example, W2 = {8, 9, 11, 12, 14}. Note that w-values can be generated without knowing ai, i 2 Ns (see Christofides and Whitlock, 1977 or Arenales and Morabito, 1995, for a recursive formula). To make modelling easier we use Vs, but in order to devise methods we use Ws. To obtain the linear combination, solve an ordinary knapsack (see step 2 in the COMP_ex method). Therefore, for each h, we refer to a particular compartment of width wh, composed of items of class s, where h 2 Vs, and for which a cost kh of creating compartment h is given. The cost kh is problem dependent (e.g., in steel roll cutting, it is a cost of reducing the sub-roll thickness to match the item thickness). Let aih be the number of items P i in the compartment h and yh be the number of times the compartmentP h is in the knapsack. Also, let vh ¼ i2N s ui aih be the utility value of the compartment h 2 Vs), and wh ¼ i2N s pi aih be the capacity of the compartment h 2 Vs. The Compartmentalised Knapsack Problem (CKP) can be modeled as the following. X X max z¼ ðvh  kh Þy h þ    þ ðvh  kh Þy h ð1:1Þ subject to

X h2V 1

h2V 1

wh y h þ    þ

X

h2V k

wh y h 6 c;

ð1:2Þ

h2V k

y h P 0 and integers; h 2 V :

ð1:3Þ

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

1187

Two methods were proposed for CKP, see Hoto (2001) and Hoto et al. (2002). The first one evaluates exactly the compartments (COMP_ex method) and the other one heuristically (COMP_bound method). 3.1. The COMP_ex method Now we describe an exact method for solving Unconstrained Compartmentalised Knapsack Problems. The idea consists of generating all the best possible compartments. To solve the classic knapsack problems we used the enumeration scheme proposed by Yanasse and Soma (1987) and Pisinger (1995). 1. For s = 1, . . . , k, determine all possible non-negative linear combinations of pi, i 2 Ns, and enumerate them as described before, which define set Ws. 2. For s = 1, . . . , k and all h 2 Ws solve the knapsack problem: X vh ¼ max ui aih i2N s

subject to

X

pi aih ¼ wh ; aih P 0 and integers; i 2 N s :

i2N s

3. Solve the knapsack problem: X max ðvh  kh Þy h h2W

subject to

X

wh y h 6 c; y h P 0 and integers; where h 2 W ¼ W 1 [    [ W k :

h2W

A drawback of this algorithm is in step 2, where a large number of knapsack problems should be solved, since the total number of linear combinations in step 1 can be very large. In order to overcome this problem, we substitute vh for an upper bound. 3.2. The COMP_bound method Here we describe a heuristic method, which consists of evaluating each compartment without solving it. We use the upper bound given by Martello and Toth (1990, p. 93). 1. As Step 1 in the COMP_ex Method. 2. For s = 1, . . . , k and h 2 Ws determine an upper bound vh to the knapsack problem in step 2 of COMP_ex method: vh 6 vh . 3. Solve the knapsack problem: X max ðvh  kh Þy h h2W

subject to

X

wh y h 6 c; y h P 0 and integers; h 2 W :

h2W

Remark. For compartments h such that yh > 0 in step 3, solve knapsack problems in step 2 of COMP_ex to obtain the loadings. Of course, an iterative method could be designed as follows: after solving the knapsack problems to obtain the loadings, use vh instead of vh and repeat step 3. Repeat until there are no more changes. Experiments with this iterative method can be found in Hoto (2001). 4. The constrained compartmentalisation The constrained CKP arises if demand is low, so that the repetition of an item in a cutting pattern has to be limited. That is, the number of items type i in the overall knapsack cannot exceed bi.

1188

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

Letting vh ¼ as follows:

P

max

and wh ¼

i2N s ui aih



X

P

i2N s p i aih ,

ðvh  kh Þy h þ    þ

h2V 1

subject to

k X X

the mathematical model for the constrained CKP can be given

X

ðvh  kh Þy h

ð2:1Þ

h2V k

wh y h 6 c;

ð2:2Þ

aih y h 6 bi ; i 2 N ;

ð2:3Þ

s¼1 h2V s k X X s¼1 h2V s

y h P 0 and integers; h 2 V :

ð2:4Þ

Now we describe a greedy heuristic for solving the constrained CKP. The idea consists of generating compartments of widths varying from d min to d max for each class s, such that aih 6 bi , where in the beginning bi ¼ bi s s  and it is updated until bi ¼ 0. Therefore, we generated a number of compartments for the same class which can be in the overall knapsack without exceeding the demand. A 0–1 knapsack problem is finally solved to choose the compartments. 4.1. COMPREST method 1. As Step 1 in the COMP_ex Method. Let  bi ¼ bi , i = 1, . . . , n. 2. For s = 1, . . . , k and all h 2 Ws repeat until  bi ¼ 0, for all i 2 Ns: 2.1. Solve the constrained knapsack problem: X vh ¼ max ui aih i2N s

subject to

X

pi aih ¼ wh ;

i2N s

bi 0 6 aih 6 

aih P 0 and integers; i 2 N s :

i  aih , and solve the next knapsack. 2.2. Update  bi b 3. Solve the 0–1 knapsack problem: X max ðvh  kh Þy h h2W X subject to wh y h 6 c; h2W

y h ¼ 0 or 1; h 2 W : In the COMPREST, the 0–1 knapsack problem in step 3 prevents exceeding the demand (each compartment is only used once). Similarly to the heuristic method COMP_bound, in step 2, we may use an upper bound vh to the knapsack problem, and we call this method as COMPREST_bound. Furthermore, if the number of knives is limited, it is necessary to limit the number of items in the compartments. Let f be the number of available knives in the first phase and g be the number of knives in the second one, then the following constraint has to be added to the knapsack problem in step 2: X aih 6 g  1; i2N s

and the following constraint has to be added to the knapsack problem in step 3: X y h 6 f  1; h2V

(see Gilmore and Gomory, 1963).

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

1189

5. The compartmentalised cutting stock problem So far, we have considered cutting problems that consist of cutting just one roll. When demand is to be met, and a number of rolls have to be cut, a mathematical model is required to determine how many rolls should be cut according to a set of given cutting patterns. The approach to be used is the one given by Gilmore and Gomory (1961, 1966). First of all, in order to write down the mathematical model, assume that all compartmentalised cutting patterns have already been generated (to solve the model, a column generation technique is used, i.e., a compartmentalised cutting pattern is generated in each iteration of the simplex method). The problem is better defined as follows: 5.1. Roll data Consider the indexes: r = 1, . . . , m, where m is the number of types of rolls, and j = 1, . . . , pr, where pr is the number of possible compartmentalised cutting patterns for the roll r. The number pr is in practice a very large number and it is not necessary to find it when a column generation technique is used. Let, • • • • • •

Lr width (mm) of roll r, Pr weight (kg) of the roll r, er available (units) of the roll r, dr unit linear cost ($/mm) of the roll r, Tjr waste (mm) in the roll r, if cutting pattern j is used, cjr cost of cutting the roll r according to pattern j.

5.2. Ribbon data (items) Consider the index: i = 1, . . . , n, where n is the number of types of ordered ribbons. These items are grouped into k classes: N1, . . . , Nk. • ‘i width (mm) of the ribbon i, • bi demand (kg) for the ribbon i. 5.3. Intermediate rolls (compartments) Consider the index: h = 1, . . . , Hr, where Hr is the number of compartments for the roll type r (in the example of Section 2, Hr = 14) and let: • y jrh the number of compartments type h in the cutting pattern j for the roll r, • ajri number of ribbons PH r i in the cutting pattern j for the roll r, (note that ajri ¼ h¼1 ajrih y jrh , where ajrih is the number of ribbons type i in the compartment h of the jth cutting pattern for the roll r. Remember that if h 2 Vs then the items in the compartment h belong to Ns. It should be clear that ajrih and y jrh are generated by, for example, the COMP_ex method, but here for the purpose of writing the model, we consider all possible solutions for the Compartmentalised Knapsack Problem), • hrh the cost of reducing the thickness of the roll r to the thickness of items in the compartment h. Therefore, the cost cjr may be given by crj ¼ dr T jr þ

PH r

r jr h¼1 ðhh y h Þ.

5.4. The decision variables • xjr is the number of the rolls of type r cut according to the cutting pattern j.

1190

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

A mathematical model for the cutting stock problem can then be stated as follows: pr m X X

min subject to

cjr xjr

r¼1 j¼1 pr m X X

P r jr jr ‘i a x ¼ bi ; Lr i

j¼1

r¼1 p1 P

ð3:1Þ i ¼ 1; . . . ; n;

ð3:2Þ

6 e1

xj1

j¼1

..

.

pm P

.. .

ð3:3Þ

xjm 6 em

j¼1

xjr P 0 and integers; r ¼ 1; . . . ; m; r ¼ 1; . . . ; pr :

ð3:4Þ

5.5. Column generation (ColGen) Note that each column of the constraint matrix in 3.2 and 3.3 has (n + m) elements and the column of the variable xjr is given by: T

ajr ¼ ðajr1 ; ajr2 ; . . . ; ajrn ; 0; . . . ; 0; 1; 0; . . . ; 0Þ ; r

where ajri ¼ PLr ‘i ajri and the coefficient one is in the (n + r)th position. Assume that B is a feasible basis at a simplex iteration (an initial feasible basis made of simple compartmentalised cutting patterns is given below). The simplex multiplier is given by p = cBB1 and the reduced costs are (details in Appendix): ! ! Hr n X X jr cjr  pajr ¼  ui aih  kh y jrh þ ðdr ðLr  S 1 Þ  pnþr Þ; ð4Þ h¼1

where, ui ¼

i¼1

  Pr dr þ pi r ‘i L

and

kh ¼ hrh  dr S 2 :

Since the last term in (4) is independent of the cutting pattern, the minimum reduced cost can be determined by: ( ) ! ! Hr n X X jr jr min  ui aih  kh y h ; j ¼ 1; . . . ; pr and r ¼ 1; . . . ; m : ð5Þ h¼1

i¼1

By using the notation in Section 2, the set of all possible compartments for roll r is grouped into the compartments for each class, that is, {1, . . . , Hr} = V1 [    [ Vk, where Vs contains the indexes of compartments for class s, also {1, . . . , n} = N1 [    [ Nk. Therefore, the problem (5) consists of solving the Compartmentalised Knapsack Problem, for every roll r (see problem (1.1)–(1.3)): ! ! ! ! X X X X max z¼ ui aih  kh y h þ    þ ui aih  kh y h ð6:1Þ h2V 1

subject to

S1 þ

X h2V 1

i2N 1

S2 þ

X

! ‘i aih y h þ    þ

i2N 1

y h P 0 and integers; h 2 V :

h2V k

X h2V k

S2 þ

i2N k

X

! ‘i aih y h 6 Lr ;

ð6:2Þ

i2N k

ð6:3Þ

Note that in (6.2), the width of a compartment h 2 Vs (i.e., Pan intermediate roll), which is one of the items in class Ns, has to include a technical loss S2, then: wh ¼ S 2 þ i2N s ‘i aih . Also, the loss S1 is included for the first stage of cutting.

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

1191

5.6. Solving the cutting stock problem In order to solve the problem (3.1)–(3.4) we used the simplex method with the column generation technique for the relaxed problem, i.e., by relaxing the integer condition. Each column is generated by the solution of the problem (6.1)–(6.4) obtained by COMP_ex or COMP_bound presented in Section 2. To obtain a feasible integer solution we used rounding heuristics described in the next section. The initial basic matrix is built by homogeneous compartmentalised cutting patterns as follows: Choose the roll r such that erPr = max{etPt, t = 1, . . . , m}; for i = 1 to n do for j = 1 to n do ajri :¼ 0, {building homogenous patterns} for i = 1 to n do for j = 1 to n do if i = j then j begin k jr ai :¼ Lmax , ‘i {width of the homogenous compartment} w :¼ ajri ‘i fin practice; w > Lmin g {total of compartments in the knapsack} r y :¼ Lw , {total of items in the knapsack} ajri :¼ yajri end end; The basis is completed with slack variables of (3.3). If the slack variable for stock r is negative, then, an artificial variable is used for this constraint and phase I of the simplex method is performed. 6. Rounding of the solution In this section we present a rounding procedure to obtain an integer solution, based on Wa¨scher and Gau (1996). Suppose that the linear relaxation of problem (3.1)–(3.4) has already been solved to obtain a continuous solution ^x. Then, round down ^x to obtain an integer solution b^xc. Unless the continuous solution is already integer, the rounded solution will not meet demand, remaining a residual demand: ^ bi ¼ b i 

pr m X X P r r jr ‘i a b^x c; Lr ij r¼1 j¼1

i ¼ 1; . . . ; n:

Also, the availability for the roll r is updated: r

r

^e ¼ e 

pr X

b^xjr c;

r ¼ 1; . . . ; m:

j¼1

Therefore, a residual problem is formulated to meet the remaining demand, similar to the problem (3.1)– (3.4). 6.1. Residual problem min

pr m X X r¼1

subject to

cjr xjr

ð7:1Þ

j¼1

pr m X X P r jr jr ^ ‘ i a x ¼ bi ; Lr i r¼1 j¼1

i ¼ 1; . . . ; n;

ð7:2Þ

1192

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195 p1 P

6 ^e1

xj1

j¼1

..

.. .

. pm P

ð7:3Þ

xjm 6 ^em

j¼1

xjr P 0 and integers;

r ¼ 1; . . . ; m;

r ¼ 1; . . . ; pr :

ð7:4Þ

Note that the residual problems have a low demand. Therefore, to generate the cutting patterns to residual problems it is necessary to add restriction (8) to the problem (6.1)–(6.4), and solve the constrained CKP with COMPREST or COMPREST_bound. k X X Pr ‘i aih y h 6 ^ bi ; Lr s¼1 h2V s

i ¼ 1; . . . ; n:

ð8Þ

After solving the last residual problem, it is still possible that a small demand is unsatisfied, for which we may use an exhausting repetition heuristic (Hinxman, 1980), that consists of generating a constrained compartmentalised pattern and use it as much as possible. It is repeated until there is no more demand. More elaborate rounding heuristics can be devised (see Stadtler, 1990; Wa¨scher and Gau, 1996; Poldi and Arenales, 2005). 7. Computational results The methods presented in this paper were implemented using Borland Delphi 7.0 and run on a Intel Celeron Processor 2.8 GHz with 512 MB of memory. We compare the performance (of solving the cutting stock problem) by generating columns in four different ways. The overall method has two phases: Phase I is to solve the linear relaxation of model (3.1)–(3.4), and Phase II is of rounding to obtain an integer solution. For Phase I the Unconstrained Compartmentalised Knapsack Problem is solved for each simplex iteration, but for Phase II, the Constrained Compartmentalised Knapsack Problem has to be solved to deal with low demand in the residual problems. The four options are therefore: • Combination 1 Phase I: COMP_bound Phase II: COMPREST_bound • Combination 2 Phase I: COMP_bound Phase II: COMPREST • Combination 3 Phase I: COMP_ex Phase II: COMPREST_bound • Combination 4 Phase I: COMP_ex Phase II: COMPREST A number of instances were randomly generated based on typical sizes found in practice: Item data: • • • •

k (the number of classes): 5, 10, 15, 20, 30 and 40. n (the number of items types): randomly generated from 4 to 6 items for each class Ns. ‘i (width item): randomly generated so that, 55 mm 6 ‘i 6 250 mm. bi (demand): randomly generated so that, 87,000 kg 6 bi 6 99,000 kg.

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

1193

Roll data: • • • • •

r (number of roll types): 3. Lr (width of roll r): 900 mm, 1100 mm and 1200 mm. Pr (weight of roll r): 12,000 kg, for all r. er (available of roll r). dr (unit linear cost of roll r): dr = 1, for all r.

Referring to Table 1, in the columns Classes and Items are respectively the number of classes and the number of items of each instance. In the column Time is the running time in minutes: seconds, and the column Interm are the number of intermediate rolls generated for each combination. In the column waste is the percentage of waste, without the technical losses. Note in Table 1, if the COMP_bound in the Phase I is used (i.e., combinations 1 and 2), then the method tends to build more intermediate rolls than if the COMP_ex is used (i.e., combinations 3 and 4). The use of COMPREST_bound or COMPREST in Phase II (i.e., combinations 3 and 4) is not significant for the number of intermediate rolls generated. On the other hand, if COMPREST is used in Phase II, the running time is greater. Combinations 3 and 4 (i.e., CKP is exactly solved in Phase I) presented the smallest losses (less than 0.1% for all instances), but combination 3 was faster than combination 4, and therefore, it may be suitable for larger industrial applications.

Table 1 Numerical results of random instances of the CCSP Instances

Classes

Combination 1

Combination 2

Combination 3

Combination 4

COMP_bound

COMP_bound

COMP_ex

COMP_ex

COMPREST_bound

COMPREST

COMPREST_bound

COMPREST

Items

Time

Waste (%)

Interm

Time

Waste (%)

Interm

Time

Waste (%)

Interm

Time

Waste (%)

5

32 32 27 32 35

00:02 00:03 00:03 00:03 00:04

<0.1 0.7 0.5 0.6 1.2

773 748 710 792 806

00:04 00:04 00:03 00:04 00:04

<0.1 0.7 0.5 0.6 1.2

761 748 704 788 791

00:09 00:08 00:06 00:05 00:06

<0.1 <0.1 <0.1 <0.1 <0.1

587 552 512 695 589

00:08 00:10 00:08 00:06 00:07

<0.1 <0.1 <0.1 <0.1 <0.1

Interm 577 536 511 685 578

10

62 62 52 60 57

00:09 00:27 00:08 00:11 00:04

<0.1 <0.1 <0.1 0.4 1.0

1475 1335 1231 1483 1347

00:18 00:29 00:09 00:23 00:15

<0.1 <0.1 <0.1 0.4 1.0

1478 1296 1233 1496 1376

00:15 00:19 00:10 00:22 00:18

<0.1 <0.1 <0.1 <0.1 <0.1

1270 1294 1197 1179 1113

00:24 00:33 00:14 00:24 00:27

<0.1 <0.1 <0.1 <0.1 <0.1

1283 1270 1208 1176 1117

15

67 85 82 82 75

00:10 00:21 00:16 00:16 00:12

<0.1% <0.1 0.7 <0.1 2.8

1577 2010 1948 2122 1660

00:15 00:32 00:35 00:18 00:17

<0.1 <0.1 0.7 <0.1 2.8

1586 2007 1957 2126 1639

00:22 00:58 00:34 00:39 00:35

<0.1 <0.1 <0.1 <0.1 <0.1

1341 1576 1545 1637 1433

00:32 01:15 00:35 00:53 00:54

<0.1 <0.1 <0.1 <0.1 <0.1

1356 1575 1538 1648 1422

20

95 110 120 102 100

00:25 00:45 00:47 00:24 01:00

1.0 1.3 4.1 1.2 <0.1

2136 2491 2644 2286 2469

00:30 01:15 02:07 00:51 01:08

1.1 1.3 4.1 1.2 <0.1

2146 2501 2655 2286 2484

01:16 02:23 02:00 01:20 01:05

<0.1 <0.1 <0.1 <0.1 <0.1

1984 1999 2565 2182 2029

01:23 02:23 02:28 02:05 01:31

<0.1 <0.1 <0.1 <0.1 <0.1

1989 1974 2572 2205 2067

30 40

142 207

02:15 05:23

<0.1 0.4

3598 4946

02:47 11:25

<0.1 0.4

3602 5008

04:34 13:27

<0.1 <0.1

3184 4456

06:47 14:26

<0.1 <0.1

3218 4452

1194

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

8. Conclusions In this paper we use the Compartmentalised Knapsack Problem (CKP) to generate the cutting patterns of the rolls of steel (CCSP), because the thicknesses of the rolls may not match the thicknesses of the ordered items, so the rolls have to be first cut into intermediate rolls, whose thicknesses are then reduced to match the thicknesses of the items. We present a basic and exact method to the unconstrained CKP and then also describe a heuristic one. The ideas were extended to the case of a constrained CKP. In order to obtain a continuous solution of the Compartmentalised Cutting Stock Problem we used Gilmore and Gomory’s column generation technique (Phase I), and to obtain a feasible integer solution close to the LP optimum, we used a simple rounding heuristic (Phase II). Computational experiments show that it is possible to obtain high quality solutions within suitable running time for large instances with a few hundred items. Acknowledgements This work was sponsored by CAPES, CNPq and FAPESP. The authors thank Professor Nei Yoshihiro Soma for his useful comments and hints about knapsack implementations and Professor Miguel Taube who introduced us to the problem of this paper. We would also like to really thank the anonymous referees for their careful reading of the paper and many suggestions which improved it. Appendix. Computing reduced costs Assume that B is a feasible basis at a simplex iteration when solving the linear relaxation of problem (3). The simplex multiplier is given by: p ¼ cB B1 ¼ ðp1 ; . . . ; pn ; pnþ1 ; . . . ; pnþr ; . . . ; pnþm Þ: In order to verify optimality, we calculate the reduced cost of a variable xjr which is given by: cjr  pajr ¼ dr T jr þ

Hr X

hrh y jrh 

n X

h¼1

pi ajri  pnþr :

i¼1

Note that, by considering S1 and S2 as technical losses, jr

T ¼

r

L  S1  S2

Hr X

! y jrh



h¼1

jr

jr

c  pa ¼ d

r

r

L  S1  S2

n X

‘i ajri ; then

i¼1 Hr X

! y jrh



n X

h¼1

¼ dr ðLr  S 1 Þ  dr S 2

Hr X h¼1

! ‘i ajri

þ

n X i¼1

hrh y jrh 

h¼1

i¼1

y jrh  dr

Hr X

‘i ajri þ

Hr X h¼1

hrh y jrh 

n X

pi

i¼1 n X i¼1

pi

P r jr ‘i a  pnþr Lr i

P r jr ‘i a  pnþr : Lr i

Therefore, crj



parj

 Hr n  X X Pr r ¼ d þ pi r ‘i ajri þ ðhrh  dr S 2 Þy jrh þ dr ðLr  S 1 Þ  pnþr : L h¼1 i¼1

R. Hoto et al. / European Journal of Operational Research 183 (2007) 1183–1195

Remember that ajri ¼

1195

PH r

jr jr h¼1 aih y h ,

then: !   Hr n Hr r X X X P jr jr r crj  parj ¼  d þ pi r ‘i aih y h þ ðhrh þ dr S 2 Þy jrh þ dr ðLr  S 1 Þ  pnþr L h¼1 h¼1 i¼1       r Hr H n r XX X P ¼ dr þ pi r ‘i ajrih y jrh þ ðhrh  dr S 2 Þy jrh þ dr ðLr  S 1 Þ  pnþr : L h¼1 i¼1 h¼1

Finally, jr

jr

c  pa ¼   ui ¼

Hr X

n X

h¼1

i¼1

 Pr dr þ pi r ‘i L

and

! ui ajrih

!  kh y jrh þ ðdr ðLr  S 1 Þ  pnþr Þ; where

kh ¼ hrh  dr S 2 :

References Arenales, M., Morabito, R., 1995. An and/or graph approach to the solution of two dimensional non-guillotine cutting problems. European Journal of Operational Research 84, 599–617. Christofides, N., Whitlock, C., 1977. An algorithm for two dimensional cutting problems. Operations Research 25, 30–44. Correia, M.H., Oliveira, J.F., Ferreira, J.S., 2004. Reel and sheet cutting at a paper mill. Computers and Operations Research 31, 1223– 1243. Dyckhoff, H., 1990. A typology of cutting and packing problems. European Journal of the Operational Research 44, 145–159. Ferreira, J.S., Neves, M.A., Castro, P.F., 1990. A two-phase roll cutting problem. European Journal of Operational Research 44, 185–196. Gilmore, P.C., Gomory, R.E., 1961. A linear programming approach to the cutting stock problem. Operations Research 9, 849–859. Gilmore, P.C., Gomory, R.E., 1963. A linear programming approach to the cutting stock problem part II. Operations Research 14, 94– 120. Gilmore, P.C., Gomory, R.E., 1966. The theory and computation of knapsack functions. Operations Research 14, 1045–1074. Haessler, R.W., 1979. Solving the two-stage cutting-stock problem. Omega 7, 145–151. Hinxman, A.I., 1980. The trim-loss and assortment problems: A survey. European Journal of Operational Research 5, 8–18. Hoto, R., 2001. O problema da mochila compartimentada aplicada ao corte de bobinas de ac¸o, Ph.D. thesis, COPPE/UFRJ, Brazil (in Portuguese). Hoto, R., Maculan, N., Arenales, M., Marques, F.P., 2002. Um novo procedimento para o ca´lculo de mochilas compartimentadas. Investigac¸a˜o Operacional (the Portuguese Journal of Operational Research) 22, 213–234 (in Portuguese). Johnston, R.E., Khan, L.R., 1995. Bounds for nested knapsack problems. European Journal of Operational Research 81, 154–165. Martello, S., Toth, P., 1990. Knapsack Problems: Algorithms and Computer Implementations. John Wiley & Sons, Chichester. Pisinger, D., 1995. Algorithms for knapsack problems, Ph.D. thesis, Department of Computer Science, University of Copenhagen, Denmark. Poldi, K.C., Arenales, M., 2005. Dealing with small demand in integer cutting stock problems with limited different stock lengths, Technical Report ICMC 85, University of Sa˜o Paulo. Shachnai, H., Tamir, T., 2001. Polynomial time approximation schemes for class-constrained packing problems. Journal of Scheduling 4, 313–338. Stadtler, H., 1990. A one dimensional cutting-stock problem in the aluminium industry and its solution. European Journal of Operational Research 44, 209–223. Vale´rio de Carvalho, J.M., Rodrigues, A.J.G., 1994. A computer based interactive approach to a two-stage cutting-stock problem. INFOR 32, 243–252. Vale´rio de Carvalho, J.M., Rodrigues, A.J.G., 1995. An LP-based approach to a two-stage cutting-stock problem. European Journal of Operational Research 84, 580–589. Wa¨scher, G., Gau, T., 1996. Heuristics for the integer one dimensional cutting-stock problem: A computational study. OR Spektrum 18, 131–144. Wa¨scher, G., Haussner, H., Schumann, H., 2006. An improved typology of cutting and packing problems. European Journal of Operational Research, this issue. Yanasse, H.H., Soma, N.Y., 1987. A new enumeration scheme for the knapsack problem. Discrete Applied Mathematics 18, 235–245. Zak, E.J., 2002. Row and column generation technique for a multistage cutting stock problem. Computers and Operations Research 29, 1143–1156.