Some experiments with a simple tabu search algorithm for the ...

16
Computers & Operations Research 33 (2006) 804 – 819 www.elsevier.com/locate/cor Some experiments with a simple tabu search algorithm for the manufacturer’s pallet loading problem Vitória Pureza , Reinaldo Morabito Departmento de Engenharia de Produção, Universidade Federal de São Carlos, SP, Brazil Available online 28 October 2004 Abstract The manufacturer’s pallet loading problem consists in arranging, orthogonally and without overlapping, the maximum number of boxes with dimensions (l,w) or (w,l) onto a rectangular pallet with dimensions (L, W). This problem has been successfully handled by block heuristics, which generate loading patterns composed by one or more blocks where the boxes have the same orientation. A common feature of such methods is that the solutions provided are limited to the so-called first order non-guillotine patterns. In this paper we propose an approach based on the incorporation of simple tabu search (without longer-term memory structures) in block heuristics. Starting from an initial loading pattern, the algorithm performs moves that increase the size of selected blocks in the current pattern; as a result, other blocks are decreased, eliminated or created. Computational results indicate that the approach is capable of generating superior order optimal patterns for difficult instances reported in the literature. 2004 Elsevier Ltd. All rights reserved. Keywords: Manufacturer’s pallet loading problem; Cutting and packing; Simple tabu search 1. Introduction The pallet loading problem consists in arranging products in boxes onto a rectangular pallet, in order to optimize its utilization. It is assumed that the boxes, available in large quantities, should be arranged orthogonally, that is, with their sides positioned parallel to the pallet side. This problem appears frequently in storage, moving and transportation of products. Given the scale of some logistic systems, a small increase of the number of products loaded onto each pallet can represent significant global savings. Corresponding author. Fax: +55-16-3351-8240. E-mail addresses: [email protected] (V. Pureza), [email protected] (R. Morabito). 0305-0548/$ - see front matter 2004 Elsevier Ltd. All rights reserved. doi:10.1016/j.cor.2004.08.009

Transcript of Some experiments with a simple tabu search algorithm for the ...

Page 1: Some experiments with a simple tabu search algorithm for the ...

Computers & Operations Research 33 (2006) 804–819

www.elsevier.com/locate/cor

Some experiments with a simple tabu search algorithm for themanufacturer’s pallet loading problem

Vitória Pureza∗, Reinaldo Morabito

Departmento de Engenharia de Produção, Universidade Federal de São Carlos, SP, Brazil

Available online 28 October 2004

Abstract

The manufacturer’s pallet loading problem consists in arranging, orthogonally and without overlapping, themaximum number of boxes with dimensions (l,w) or (w,l) onto a rectangular pallet with dimensions (L,W). Thisproblem has been successfully handled by block heuristics, which generate loading patterns composed by one ormore blocks where the boxes have the same orientation. A common feature of such methods is that the solutionsprovided are limited to the so-called first order non-guillotine patterns. In this paper we propose an approach based onthe incorporation of simple tabu search (without longer-term memory structures) in block heuristics. Starting from aninitial loading pattern, the algorithm performs moves that increase the size of selected blocks in the current pattern;as a result, other blocks are decreased, eliminated or created. Computational results indicate that the approach iscapable of generating superior order optimal patterns for difficult instances reported in the literature.� 2004 Elsevier Ltd. All rights reserved.

Keywords:Manufacturer’s pallet loading problem; Cutting and packing; Simple tabu search

1. Introduction

The pallet loading problem consists in arranging products in boxes onto a rectangular pallet, in orderto optimize its utilization. It is assumed that the boxes, available in large quantities, should be arrangedorthogonally, that is, with their sides positioned parallel to the pallet side. This problem appears frequentlyin storage, moving and transportation of products. Given the scale of some logistic systems, a smallincrease of the number of products loaded onto each pallet can represent significant global savings.

∗ Corresponding author. Fax: +55-16-3351-8240.E-mail addresses:[email protected](V. Pureza),[email protected](R. Morabito).

0305-0548/$ - see front matter� 2004 Elsevier Ltd. All rights reserved.doi:10.1016/j.cor.2004.08.009

Page 2: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 805

According to Hodgson[1], the pallet loading problem is classified into the manufacturer’s and dis-tributor’s cases. In the first, a manufacturer produces goods packed in identical boxes with dimensions(l, w, h), which are then loaded in horizontal layers on a pallet with dimensions (L,W,H) (whereH is themaximum loading height). If the boxes can be loaded on any of their faces:lw,lh andwh, the manufac-turer’s problem can be defined by two subproblems: (i) for each box face, the two-dimensional problemof finding the orthogonal arrangement that provides the maximum number of rectangles (the box face)onto the rectangle (L,W) (the pallet surface), and (ii) the one-dimensional problem of pilling up horizontallayers with dimensions (L,W,l), (L,W,w) and (L,W,h) along the pallet heightH so that the maximum num-ber of boxes are loaded. Note that (ii) corresponds to a knapsack problem with capacityH. If a verticalbox orientation is imposed, for instance if the boxes must be loaded on their facelw, then the maximumnumber of horizontal layers (with dimensions (L,W, h)) pilled up on the pallet is given by�H/h�.

In the second case, the distributor receives goods packed in boxes with different dimensions (li , wi , hi),i = 1, . . . , m, from several suppliers. Note that this problem can be seen as a container loading problem(Bischoff and Ratcliff[2], Morabito and Arenales[3]). Surveys on pallet loading and cutting and packingproblems can be found in papers and special editions by Dowsland and Dowsland[4], Sweeney andParternoster[5], Dyckhoff and Finke[6], Balasubramanian[7], Martello[8], Bischoff and Waescher[9],Dyckhoff et al. [10], Arenales et al.[11], Wang and Waescher[12], Hifi [13], Martins [14] and Lodiet al.[15].

This work deals with the manufacturer’s problem, specifically, the two-dimensional problem describedin (i) of arranging rectangles (l,w) and (w,l) onto the rectangle (L,W), without overlapping. This problemalso arises in the physical arrangement of pallets on trucks and in the packaging design (Morabito et al.[16]). One should emphasize that although there are polynomial algorithms for the guillotine version ofthe manufacturer’s problem (Tarnowski et al.[17]), the general case is widely claimed to be NP-complete(Dowsland[18], Nelissen[19], Letchford and Amaral[20]).

The manufacturer’s problem can be formulated as a particular case of the linear programming 0-1 modelproposed in Beasley[21] for the two-dimensional non-guillotine cutting problem. Other 0-1 models can befound in Tsai et al.[22], Chen et al.[23], Hadjiconstantinou and Christofides[24] (Amaral and Letchford[25], showed that this formulation is not valid in some cases) and Martins[14]. Exact methods for solvingthe manufacturer’s problem are reported in Dowsland[18] and Bhattacharya et al.[26]. More recently,Lins et al.[27] presented an approach capable of solving difficult problems; the authors conjecture thattheir approach is exact. Research with upper bounds for the problems can also be found in Nelissen[19],Letchford and Amaral[20] and Morabito and Farago[28].

Several authors have successfully tackled the manufacturer’s problem with construction heuristicsknown asblock heuristics. The resulting loading patterns are composed by one or more blocks, eachblock comprising boxes arranged with the same orientation. Examples of block heuristics are reported inSteudel[29], Smith and De Cani[30], Bischoff and Dowsland[31], Nelissen[19,32], Scheithauer andTerno[33] and Morabito and Morales[34,35]. A common feature of these heuristics is that the generatedpatterns are limited to the so-called first order non-guillotine patterns (defined in the next section). Amotivation for the present study is to propose a simple heuristic, capable of solving problems reportedblock heuristics fail, within reasonably short computational times.

Metaheuristicsare techniques applied to local search methods that allow exploration beyond localoptima, in order to find solutions of higher quality. Despite the success that those techniques have in avariety of problems, few applications for the manufacturer’s pallet loading problem are reported. Exam-ples are found in Dowsland[36] (simulated annealing), Herbert and Dowsland[37] (genetic algorithms),

Page 3: Some experiments with a simple tabu search algorithm for the ...

806 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

(a) (c) (b)

Fig. 1. (a) A guillotine pattern, (b) a cut (in thick lines) and a first order non-guillotine pattern, (c) a non-guillotine superior orderpattern for instance(L, W) = (42, 39) and(l, w) = (9, 4).

Dowsland[38] and Yamassaki and Pureza[39] (tabu search). The last two applications use a memory-less version of tabu search. The algorithms start with an infeasible solution (i.e., violating overlappingrestrictions) with the optimal number of boxes. These boxes are then moved to new positions in order toreduce overlapping to zero (optimal pattern). Results indicate that this approach has a poor performancein medium size problems (for example, beyond 40 boxes).

In this paper, we present an algorithm that incorporates simple tabu search to block heuristics. Unlikemore sophisticated versions that use long-term memory structures for intensification and diversificationstrategies, simple tabu search elements are restricted to short-term memory structures. The role of short-term memory structures is to store and penalize some characteristics or attributes of solutions that havealready been visited, for a specific number of iterations. Another aspect that distinguishes the currentapproach from Dowsland’s[38] and Yamassaki and Pureza’s[39] approaches is that the search producesonly feasible solutions, allowing an available pattern in each iteration. In addition, moves are applied toblocks, instead of boxes as in the previous studies. Finally, the approach is capable of solving problemswith optimal solutions restricted to superior order non-guillotine patterns (as shown in Section 4) withinreasonable computational times.

The definition of loading patterns and a brief description of some block heuristics are presented in thenext section. The proposed approach is described in detail in Section 3, followed by computational exper-iments and results in Section 4. Concluding remarks and perspectives for future research are discussedin Section 5.

2. Block heuristics

Loading patterns can be classified as guillotine, first order non-guillotine and superior order non-guillotine (Arenales and Morabito[40]). They are defined as follows:

• Guillotine pattern: a cut applied to a rectangle is called guillotine if it produces two new rectangles. Apattern that results from successive guillotine cuts is called a guillotine pattern (Fig. 1a).

• First order non-guillotine pattern: a cut applied to a rectangle is called first order non-guillotine cutif it produces five new rectangles that do not form a guillotine pattern (see the cut in thick linesof Fig. 1b). A pattern obtained by successive guillotine cuts and/or first order non-guillotine cuts is

Page 4: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 807

called first order non-guillotine pattern (Fig. 1b). Note that every guillotine pattern is also a first ordernon-guillotine pattern.

• Superior order non-guillotine pattern: a pattern that cannot be obtained by successive guillotine cutsand/or first order non-guillotine cuts (Fig. 1c).

Since the manufacturer’s problem is only limited to orthogonal packing, imposing guillotine patternswould be a simplifying solution approach. However, this generally results in poor quality solutions. Giventhe difficulties to apply exact methods to practical instances, several heuristics have been proposed in theliterature, for example, the so-called block heuristics (Nelissen[19]). Each block is defined as a rectanglewhere the boxes are arranged with the same orientation.

Block heuristics basically differ in (i) the number of blocks in which the pallet area is divided, (ii)the computation of the sizes of each block, and (iii) the orientation of boxes in each block. Examplesof 4-block heuristics can be found in Steudel[29] and Smith and De Cani[30]. In the latter, the palletis divided in at most four blocks and the box orientation in each block is pre-defined. The procedureexamines all possible modifications of these blocks, varying their dimensions (including the possibilitiesof eliminating the block) and it returns the pattern that yields the largest number of boxes.

Block heuristics based on the pallet division into five and more blocks can be found in Bischoff andDowsland[31], Nelissen[32], Scheithauer and Terno[33] and Morabito and Morales[34,35]. This lastapproach generates optimal patterns for first order non-guillotine problems. Heuristics based on othertechniques can be found in G and Kang[41] and Lins et al.[42]. All these algorithms provide optimalpatterns for most problems and, for the few cases they fail (difficult problems), good quality patterns aregenerated, usually with one or two boxes below the optimal number. Therefore, a new proposed methodmust present a better performance while dealing with difficult examples, in particular, instances for whichthe optimal patterns are of superior order non-guillotine type.

3. Proposed approach

From a starting solution generated by an arbitrarily chosen block heuristic, the algorithm appliesmoves consisting of the expansion of selected blocks (called active blocks) in a specific direction. In eachexpansion move, only feasible patterns are allowed.

Since the starting pattern is generally compact, the expansion of an active block almost always impliesthat other blocks (called passive blocks) are modified in order to preserve the solution feasibility. Theneighborhood structure used here prescribes that passive blocks can be decreased in size, divided intoone or more blocks, or have their original box orientation changed. Besides the effect on passive blocks,a given expansion move can also divide the active block into two or three blocks, as discussed in the nextsection. The resulting patterns are sufficiently generic, including superior order non-guillotine patterns.

3.1. Neighborhood structure

3.1.1. Active block expansionFor a given feasible pattern, we consider expansions of each current block in four possible directions:

up, down, to the left or to the right. The specified direction defines the block expansion side, while theother sides remain unaltered.

Page 5: Some experiments with a simple tabu search algorithm for the ...

808 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

Fig. 2. Block expansion directions.

(a)

(b)

Fig. 3. Block expansion to the right with (a) the addition of one box to horizontal rows{1, 2, 3, 4} (b) the addition of two boxesto horizontal rows{2, 3}.

Fig. 2shows a block with four horizontal rows and four vertical rows. Once the side is specified, theblock can be expanded with the inclusion of boxes to one or more adjacent horizontal rows (for moves tothe right or to the left), or adjacent vertical rows (for up or down moves). A special case is the expansionof all rows of the side. InFig. 3, for example, the possible adjacent rows considered in expansion movesto the right are {1}, {2}, {3}, {4}, {1,2}, {2,3}, {3,4}, {1,2,3}, {2,3,4} and {1,2,3,4} (note that {1,3},{1,4} and {2,4} are not allowed since they are not adjacent). Once the rows of the expansion side aredefined, the block expansion is performed by adding a selected number of boxes to these rows, providedthat the pallet edges are not exceeded.

In Fig. 3a expansion to the right, the right side of the active block simply aggregates a new vertical rowof boxes. InFig. 3b expansion, the active block is divided, resulting in three blocks comprising horizontalrows {1}, {2,3} and {4}. This division is necessary since blocks are essentially rectangular entities. Notethat an expansion to the left of horizontal rows {2} and {3} would also result in three blocks comprisinghorizontal rows {1}, {2,3} and {4}. Similarly, up or down expansions of vertical rows {2,3} would resultin three blocks comprising vertical rows {1}, {2,3} and {4}.

A special situation occurs when the block heuristic generates a single block (homogeneous pattern)without a proof of optimality. Since there are no moves available for selection, the single block is dividedin sub-blocks so that the heuristic search can be applied.

3.1.2. Passive blocks redefinitionThe expansion of an active block may overlap one or more blocks (passive blocks) completely or

partially. For each passive block area that is not overlapped (remaining area), we consider four possible

Page 6: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 809

A

B

C

E

D

F

F

GB E

HC

i

j(a) (b)

(c) (d)

Fig. 4. Four possible configurations of passive blockj remaining areas with the expansion of the right side of active blocki: (a)Configuration 1: areas A, B and C; (b) Configuration 2: areas E, D and F; (c) Configuration 3: areas B, G and F; (d) Configuration4: areas E, H and C.

e

j2

j3

i

j1 j2

j3

i

j1

GB

F

Fig. 5. With the expansion of active blocki, the stripe between passive blockj1 and the closest adjacent blockj3 is added toblock j1.

configurations to arrange new blocks.Fig. 4illustrates the four configurations that result from a move tothe right of an active blocki (for the other directions, consecutively rotate the figures by 90◦), partiallyoverlapping passive blockj. Note that these configurations involve partitioning the remaining area ofj ina subset of eight possible rectangular areas A, B, C, D, E, F, G and H.

Let P be the set of all passive blocks in a given expansion. Each passive block inP is initially treatedseparately. For the remaining area of a passive blockj (j∈P), we compute the maximum number of boxes(if any) that can be accommodated in each of the areas A, B, C, D, E, F, G and H. Since the boxes in eacharea comprise a new block, they have the same orientation. If both orientations result in the same numberof boxes, we choose the one that is different from the active block orientation. The orientation changefavors solutions with higher heterogeneity levels, a concept used to define the move evaluation function(discussed in Section 3.4). Each new block coordinate corresponds to the left-upper-corner coordinate ofthe configuration area (see the right part ofFig. 9 in Section 3.4).

If there is a stripe of free space between the right side of the passive block and the left side of its closestadjacent block, the passive block aggregates the stripe area before the computation of the maximumnumber of boxes is done (for the other directions, consecutively rotate the figures by 90◦). The stripebreadth is the horizontal (moves to the right or left) or vertical (moves up or down) distance betweenthe passive block side and its closest adjacent block. In the example ofFig. 5, the breadthe of the stripeadded to passive blockj1 is the horizontal distance between blockj1 and blockj3.

By summing the number of boxes created in areas that comprise a particular configuration—areas A,B and C for configuration 1, areas E, D and F for configuration 2, and so forth—we have the number of

Page 7: Some experiments with a simple tabu search algorithm for the ...

810 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

boxes that can be accommodated in the remaining area of a passive blockj using such configuration. Thiscomputation is repeated for each passive block inP. The chosen configurationk∗ (common to all passiveblocks) is the one that maximizes the total number of boxes in the remaining areas of setP.

The total neighborhood consists of all possible expansion moves of all current blocks in the pattern thatresult in feasible solutions. For each current block, we compute for each direction (moves to the right, tothe left, up and down) expansions of all possible sets of adjacent horizontal rows (moves to the right andto the left) and all possible sets of adjacent vertical rows (moves up and down). For each set of adjacenthorizontal and vertical rows, the set of moves considers all possible numbers of boxes to be added as longas the pallet edges are not exceeded. Note that since passive blocks can always be modified to make thesolution feasible, infeasible solutions can only be generated if any of the pallet’s edges are exceeded.

Therefore, an expansion move is defined by the following parameters:

• Identification of the active block to be expanded (1, 2, . . . , number of blocks in the current pattern).• Expansion direction (to the right, to the left, up and down).• Adjacent expansion rows (for instance, inFig. 3, horizontal and vertical rows {1}, {2}, {3}, {4}, {1,2},

{2,3}, {3,4}, {1,2,3}, {2,3,4} and {1,2,3,4}).• Number of boxes to be added to the expansion rows (from 1 to any number as long as the pallet edges

are not exceeded).• Selected configuration of passive blocks remaining areas (1, 2, 3, 4).

Each block in a given pattern is identified by its (a) left-upper-corner and right-lower-corner ((x1,y1),(x2,y2)) coordinates, (b) orientation (0 if the boxes are placed with their lengthl parallel to the palletlengthL in thex-axis; 1 if the boxes are placed with their widthw parallel toL in they-axis), (c) numberof boxes in thex-axis and (d) number of boxes in they-axis. Changes on the active block and passiveblocks that continue to exist after an expansion move have these values updated accordingly.

3.2. Block sliding

Whenever a move is performed, empty or free spaces appear among blocks. As mentioned in Section3.1, the heuristic incorporates some of these spaces to the passive block remaining areas, where newblocks are created (Fig. 5). Another procedure that optimizes the utilization of these spaces even moreis block sliding. After each move, blocks change position in order to concentrate free areas, preferablyin a single area. As the current pattern usually has a number of boxes very close to the optimal number(frequently only one box less), aggregating these small free areas increases the chance of including anadditional box in a further move.

The procedure consists in moving the blocks in the direction of the four pallet edges. Initially, blocksare moved to the closest vertical pallet edge (left or right). Then, blocks are moved to the closest hor-izontal pallet edge (up or down). This procedure is repeated until further moving in the two directionsis no longer possible. As a result, free areas tend to concentrate in the center of the pallet (Fig. 6). Notethat sliding is restricted by the other blocks and the pallet edges.Fig. 7illustrates part of a search process(for problem instance 11 of Section 4) in which moves and sliding create areas that include new boxesto the pattern. Note that blockk sliding allows a blocki expansion move that adds one box to the currentpattern.

Page 8: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 811

Fig. 6. Block sliding in the direction of the four pallet edges.

(a) (b) (c)

i

k

i

k

Fig. 7. Box addition after move and block sliding: (a) a 51 box pattern (iterationit); (b) 51 box pattern after sliding; (c) resulting52 box pattern after two moves (iterationit + 2).

3.3. Restrictive elements

Given the good quality of the initial solution, the resulting pattern is invariably a local optimum to theproposed neighborhood. In order to allow the exploration beyond this point, the heuristic incorporatestabu search restrictive elements, specifically short-term memory functions (Glover and Laguna[43]), alsoknown as simple tabu search. Unlike more advanced versions that use long-term memory functions, therole of simple tabu search is to store and restrict certain characteristics or attributes of the solutions foundso far for a specific number of iterations.

We found intrinsic difficulties in defining memory functions for this problem since the number ofpattern entities that are altered by a move is very variable. Each move is defined by many parametersassuming a large range of values, resulting in the alteration, elimination and/or creation of a number ofblocks that cannot be specified a priori. For this reason, defining what to restrict is not a simple task.

Several memory functions were investigated. Best results were found by selecting block coordinatesas move attributes. Since block coordinates can assume a large range of values, we use fixed tabu tenuresand a circular listL of t elements to store the coordinates of the blocks involved in each move. Byprohibiting coordinates, we aim to restrict moves starting from the pallet regions more recently modified.In particular, the heuristic stores the original coordinates of the active block and the new coordinates ofthe passive blocks (if they are not eliminated).

Let (x1,y1) and (x2,y2), respectively, be the left-upper-corner and the right-lower-corner coordinatesof a given block. A candidate move is rejected whenever its active block (x1,y1) or (x2,y2) belong to listL. This means that the active and passive blocks in a given move are forbidden to be active for the nextt iterations. Note that this activation rule does not prevent these blocks from being passive. A possiblereason for the heuristic’s good performance (see Section 4) is that the rule allows “corrections” in theresulting configuration in subsequent moves.

Page 9: Some experiments with a simple tabu search algorithm for the ...

812 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

It should be noticed that the application of sliding (Section 3.2) frees so-called tabu moves if theiractive blocks have been actually moved from their previous positions. No attempt to update listL is donesince changes in block positions make the pattern after sliding different from the pattern before sliding,with its own opportunities of gains.

3.4. Move evaluation

The first evaluation function we consider is the net gain obtained by applying the move, that is, thedifference between the number of boxes in the current pattern and the resulting pattern:

G0 = net gain.

G0 can assume null, positive or negative integer values, and for part of the instances considered in ourexperiments (see Section 4), it provides optimal solutions.

For the unsolved problems, empirical search analysis suggested that moves with the sameG0 valuemight have distinct structural characteristics, associated to a higher or lower degree of “strategic quality”.In this case, the identification and quantification of such strategic quality would provide a better distinctionbetween the solutions, and possibly improve the search performance.

Assume that patterns with a high degree of heterogeneity have a large number of blocks so that adjacentblocks have different box orientation. It was observed that for most of the so-called difficult problems,the heuristic search tends to converge to a small number of local optima, which in turn indicates lowdiversification. These local optima are characterized by patterns with low degree of heterogeneity (almosthomogeneous). It was also observed that expansion moves that eliminate many passive blocks seem tobe hazardous to the search since they usually destroy current pattern structures with a high degree ofheterogeneity. Based on these observations and assumptions, we concluded that it should be favoredmoves with the highestG0 value which:

• result in patterns with a high degree of heterogeneity, and• modify as least as possible the current pattern structure.

We modified the original move evaluation function by including two terms. For a given candidate move,let P be the set of passive blocks due to an active blocki expansion,areae the total expansion area ofblock i, andareas(j) the portion ofareae that belongs to passive blockj∈P (i.e., blockj area that would beoverlapped by the move). Letarean be the total area of new blocks (created in passive block remainingarea), andareah the portion ofarean in which new blocks have a different box orientation from the activeblock.Figs. 8and9 illustrate these definitions.

The move evaluation function was redefined as

G1 = G0 + �areah

arean

+ (1 − �)areae − ∑

j∈P areas(j)

areae

.

The first term (�(areah/arean)) favors moves with a high proportion of new block areas in which thebox orientation differs from the active block. Note that this criterion stimulates but it does not guaranteehighly heterogeneous solutions, since it is based on a local analysis restricted to small pattern portions.The second term[(1− �)[(areae − ∑

j∈P areas(j))/areae]] favors moves where a low proportion of theexpansion area comprises passive block areas. This means that a larger free area would be overlapped

Page 10: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 813

areae

areas(j1) areas(j3)

j1

i

j2

i

j3

Fig. 8. Illustration ofareae andareas (j).

j3

j1

i

j2 arean

areahi

Fig. 9. Illustration ofarean andareah.

by the expansion, which in turn implies that smaller current pattern portions would actually be modified.Both criteria are weighed by a factor� ∈ [0, 1] (convex combination). Since the sum of the two terms isin [0, 1], they break ties among moves with the same real gainG0. According to functionG1, the priorityof selection is first given to moves withG0 > 0, followed by moves withG0=0 with the best combinationof the two criteria for a given�, followed by moves withG0 < 0 with the best combination of the twocriteria for a given�.

The experimental results suggested, however, that a special evaluation should be given to moves withG0 = 0 that consist of a simple transfer of boxes between adjacent blocks with the same box orientation.These moves are not effective since they do not essentially change the pattern structure, and usuallycorrespond to recurring local optima. Giving a better chance of selection to moves withG0 < 0 wouldallow the escape from those optima. Therefore, moves withG0 = 0 andareah = 0 (the first criterioncontribution is zero) are penalized by replacing the contribution of the second criterion by a penalty valuepen�0. For example, ifpen=−1 and�=0.5, moves withG0=0 andareah=0 have evaluation−0.5.Asa result, moves withG0=−1 and the contribution of the first and second criteria would have a reasonablechance of being selected. We obtained the following evaluation function:

G2 ={

(1 − �)pen, if G0 = 0 andareah = 0,

G1 otherwise.

This evaluation function was used in all experiments reported in Section 4.The algorithm consists of the following standard steps found in early tabu search implementations:

INPUT : Instance description: Pallet dimensions (L, W) and box dimensions (l,w).Parameters values:t (tabu listL size) and�.

Generate an initial loading patternS0 through a block heuristic. Letf(S0) = number of boxes inS0,blk = number of blocks inS0 andoptimum= false.

Page 11: Some experiments with a simple tabu search algorithm for the ...

814 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

Makeit = 0, S = S0, f (S) = f (S0), S∗ = S, f (S∗) = f (S) and tabu listL = ∅. If f (S0) satisfies anoptimality criterion, makeoptimum= true and go to step 4.3.Repeat3.1Slide blocks inSand for each blocki = 1, . . . , blk in S, compute all expansions moves in the four

directions that havei as active block and result in feasible solutions. LetM =set of moves from all activeblocks andm� = number of moves inM.3.2 If m� > 0, select the non-tabu movem∗ ∈ M or the tabu movem∗ ∈ M that results in a solution

better than the best found so far (aspiration criterion) with the greatest evaluationG2. If all moves aretabu and do not satisfy the aspiration criterion, eliminate the oldest element (t th element) fromL andrepeat the step. LetS′ be the pattern that results from applyingm∗ to the current pattern. MakeS = S′. Iff (S) > f (S∗), makeS∗ = S, f (S∗) = f (S) andit = it + 1. If S∗ satisfies an optimality criterion, makeoptimum= true.Until m� = 0 or it = maximum number of iterations oroptimum= true.4. If optimum= true, stop. Otherwise, ifm� = 0 and 0< it < maximum number of iterations, the final

pattern has a single block; ifm� = 0 andit = 0, S0 is homogeneous.OUTPUT: PatternS∗.We used a simpler form of the block heuristic proposed by Smith and De Cani[30] to generate the initial

pattern in step 1. Note that other block heuristics could be used (for instance, Bischoff and Dowsland[31], Scheithauer and Terno[33] and Morabito and Morales[34]) but we chose a less powerful procedureto verify the search process convergence.

As mentioned in Section 3.1, if the block heuristic produces an initial single block homogeneous patternthat does not satisfy an optimality criterion, the block is divided in sub-blocks so that expansion movescan be applied. Optimality can be verified with several upper bounds found in the literature (see Nelissen[19], Letchford and Amaral[20] and Morabito and Farago[28]). A simple and powerful upper bound isgiven by�L∗W ∗/lw�, whereL∗ andW∗ are the maximum values ofl andw linear integer combinationsless than or equal toL andW, respectively. In the experiments described in the following section, noinitial homogeneous pattern was generated and we used the aforementioned bound to stop the search aswell as a maximum number of iterations.

4. Experiments and results

The algorithm was implemented in Delphi 5, with a graphical interface where generated patterns aredisplayed. Experiments were conducted in a microcomputer AMD Athlon XP 2600, 1.92 GHz.

Each run represents a parametric variation of� (first criterion weight) andt (tabu listL size), bothdefined in Section 3.4. Values of� were varied in 0.1 increments in the range [0, 0.5]. The range wasrestricted to these values since preliminary experiments indicate that the dominance of the first criterion(maximum heterogeneity) conflicts with the second criterion (minimum affected area). On the otherhand, the second criterion dominance equally affects moves with a higher or lower heterogeneity levels.Parameterpenwas set to−1.

Instances were tackled in increasing order of the optimal number of boxes. Parametert range wasdefined taking as references thet range values for which the previous instances were optimally solved,and assuming the reasonable hypothesis thatt should increase with the optimal number of boxes. A

Page 12: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 815

Table 1Computational results usingG2

Instance (L, W ) (l, w) Initial # Final # (�, t) Time t ′0 Final # Timeof boxes of boxes (s) (� = 0.5) of boxes (s)

First order 1 (22,16) (5,3) 22 23a (0.2,3) 0.01 5 23a 0.052 (57,44) (12,5) 40 41a (0.3,13) 0.23 12 41a 0.483 (86,82) (15,11) 41 42a (0.0,12) 0.06 12 42a 0.094 (42,39) (9,4) 43 45a (0.2,13) 0.17 13 45a 0.335 (124,81) (21,10) 46 47a (0.4,13) 1.31 14 47a 1.396 (40,25) (7,3) 46 47a (0.1,15) 1.30 14 47a 115.847 (52,33) (9,4) 46 47a (0.5,13) 0.44 14 47a 24.228 (56,52) (12,5) 46 48a (0.2,11) 5.979 (87,47) (7,6) 94 97a (0.3,23) 37.17 32 97a 1959.16

10 (67,44) (6,5) 96 97a (0.4,30) 1.25 33 97a 4.94

Superior order 11 (43,26) (7,3) 52 53a (0.5,15) 2.78 14 53a 58.9812 (63,44) (8,5) 68 69a (0.4,30) 8.44 23 69a 71.2213 (61,35) (10,3) 70 71a (0.5,26) 226.75 23 71a 1584.9514 (61, 38) (6,5) 76 77a (0.0,19) 0.91 26 77a 140.7815 (61,38) (10,3) 76 77a (0.5,18) 20.75 26 77a 178.0516 (93,46) (13,4) 81 82a (0.1,24) 496.81 27 82a 1239.7817 (141,71) (13,8) 95 96a (0.0,31) 160.33 33 96a 198.3818 (106,59) (13,5) 95 95 — —19 (74,46) (7,5) 95 96 (0.5,33) 0.0520 (86,52) (9,5) 98 98 — —21 (108,65) (10,7) 99 99 — —

aOptimal number of boxes.

maximum number of 6000 iterations was used for instances up to 60 boxes, and 50,000 iterations ininstances with larger size.

The algorithm was applied to 21 instances widely reported in the literature, which were divided intotwo sets. The first set (23 to 97 boxes) has first order optimal patterns (Dowsland[44], Nelissen[32],Scheithauer and Terno[33], Bhattacharya et al.[26]), while the other (53 to 100 boxes) has only superiororder optimal patterns (Morabito and Morales[34]; Lins et al.[27]). These 21 instances are considereddifficult since block heuristics such as in Steudel[29], Smith and De Cani[30] and Bischoff and Dowsland[31] are not able to produce their optimal patterns. In addition, the last set of instances is not even solvedby more elaborated block heuristics such as in Scheithauer and Terno[33] and Morabito and Morales[34]. It is optimally solved by Lins et al.’s[27] approach; however, the computational times are relativelylarge, reaching hundreds of minutes.

Seventeen out of the 21 instances were optimally solved; 10 instances correspond to the whole firstorder set and seven instances with superior order patterns. For each instance, the first seven columns inTable 1present the dimensionsL, W, l andw, the number of boxes of the starting solution, the number ofboxes of the best solution provided by the proposed heuristic, and for the problems the heuristic found asolution better than the starting solution, the parameters� andt and the computational time (in seconds).

Page 13: Some experiments with a simple tabu search algorithm for the ...

816 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

(a)

(c) (d)

(b)

(e) (f)

(g)

Fig. 10. Non-guillotine superior order patterns: (a) Instance 11 (53 boxes); (b) Instance 12 (69 boxes); (c) Instance 13 (71 boxes);(d) Instance 14 (77 boxes); (e) Instance 15 (77 boxes); (f) Instance 16 (82 boxes); (g) Instance 17 (96 boxes).

Since most problems were optimally solved with many different values of parameters� and t, resultspresented in the sixth and seventh columns ofTable 1correspond to the successful runs that required theshortest times. As expected, the heuristic’s performance tends to decrease with the optimal number ofboxes. For the four unsolved instances, the algorithm provided patterns with one box below the optimumnumber.

Fig. 10presents examples of superior order patterns obtained forTable 1instances 11, 12, 13, 14, 15,16 and 17. Different colors distinguish the box orientations. It should be noted that if evaluation functionsG0 or G1 were used instead ofG2, only few examples would be optimally solved (e.g., instances 1–7usingG0).

Page 14: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 817

4.1. Analysis of parameters� andt and computational times

In order to indicate the most suitable value of parameter�, it was noted that 16 out of the 17 instancesoptimally solved had alternative successful runs with�= 0.5. Although some particular instances exhibita tendency of successful runs with other� values such as 0.3 or 0.4, this result suggests that an equallyweighed distribution is generally the best choice.

Examples 1–13 but example 8 were all successfully solved with� = 0.5 andt = 15; from this point onthe best values oft seem to depend on the number of boxes in the initial pattern provided by the startingblock heuristic. Letn0 be the number of boxes in the initial pattern. Regression analysis for the 16 solvedinstances (with� = 0.5) resulted in the linear functiont ′′ = 0.3783n0 − 3.2357. The model exhibits highcorrelation (R2 = 0.9875) betweent ′ andn0, and thet ′ values provided could be used to determine therange of values to be tested with other problems. Other lower bounds for the number of boxes (includingthe optimal number) were tested, resulting in linear regression functions with coefficients that do notdiffer much from the ones here presented.

It should be emphasized that this statistical analysis is based on a sample of reasonably difficultproblems. For easier problems, parameters� andt become irrelevant since the initial pattern provided bya high quality block heuristic is usually optimal. For instance, Scheithauer and Terno[33] and Morabitoand Morales[34] heuristics solve over 99.9% of a set of 20,000 classes of problems in a few seconds.This is the reason why only a few difficult instances of these 20,000 classes were treated in this study.

The last three columns inTable 1present the results for the set of optimally solved instances with� = 0.5 andt ′0 = closest integer obtained by functiont ′. If the instance was not optimally solved witht ′0, we added the total computation time of following or preceding list sizes until the optimum is found.Note that instance 8 cannot be optimally solved since its successful runs do not include� = 0.5. For theother four unsolved instances (18–21), all runs with� = 0.5 provided solutions with one box below theoptimum number in 0.05 s at most.

Concerning computational effort, CPU times were considered short or within reasonable limits. Moresophisticated block heuristics can solve instances 1–10 (first order) in shorter times (see Scheithauer andTerno[33], and Morabito and Morales[34]); however, they cannot solve any of instances 11–21 (superiororder).

Another interesting result is the generation of alternative superior order optimal patterns for problemswith first order optimal solution. This result is particularly suitable in practical contexts, since positioningboxes arranged in superior order patterns may allow better cargo loading stability. This is achieved byimproving the interlock among the vertical box layers (Kullick[45]).

5. Concluding remarks

This work reports some experiments with a simple tabu search heuristic for the manufacturer’s loadingpallet problem. The heuristic starts with an initial solution generated by a block heuristic, followed by theapplication of block expansion moves. The expansion results in the modification, elimination and creationof new blocks and, consequently, new patterns are produced. We used restrictive elements of simple tabusearch to allow explorations beyond local optima and we designed move evaluation functions. Optimalpatterns were obtained in 17 out of 21 difficult instances of the literature (11 of which not solved by theblock heuristics mentioned here) in reasonable computational times.

Page 15: Some experiments with a simple tabu search algorithm for the ...

818 V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819

Examination of the search process of problems not optimally solved by the heuristic may lead toimproved versions. Despite the maximum heterogeneity and minimum overlapping criteria, most ofthese problems still have the search process characterized by local optima recurrence, which justifythe heuristic failure. In these cases, it remains the challenge of providing search diversification. Newevaluation functions and intensification and diversification phases are topics for future research.

Acknowledgements

The authors thank FAPESP (grants 01/2972-2) and CNPq (grants 522973/1995-7 and 307665/2003-8)for their support and the two anonymous referees for their valuable suggestions and comments.

References

[1] Hodgson T. A combined approach to the pallet loading problem. IIE Transactions 1982;14(3):176–82.[2] Bischoff E, Ratcliff M. Loading multiple pallets. Journal of the Operational Research Society 1995;46:1322–36.[3] Morabito R, Arenales M. An and/or-graph approach to the container loading problem. International Transactions in

Operational Research 1994;1(1):59–73.[4] Dowsland K, Dowsland W. Packing problems. European Journal of Operational Research 1992;56:2–14.[5] Sweeney P, Paternoster E. Cutting and packing problems: a categorized, application-oriented research bibliography. Journal

of the Operational Research Society 1992;43:691–706.[6] Dyckhoff H, Finke U. Cutting and packing in production and distribution: typology and bibliography. Heildelberg: Springer;

1992.[7] Balasubramanian R. The pallet loading problem: a survey. International Journal of Production Economics 1992;28:

217–25.[8] Martello S. Special issue: Knapsack, packing and cutting, Part II: multidimensional knapsack and cutting stock problems.

INFOR 1994;32(4).[9] Bischoff E, Waescher G. Special issue on cutting and packing. European Journal of Operational Research 1995;84(3):

503–712.[10] Dyckhoff H, Scheithauer G, Terno J. Cutting and packing. In: Amico M, Maffioli F, Martello S., editors. Annotated

bibliographies in combinatorial optimisation. New York: Wiley; 1997. p. 393–414.[11] Arenales M, Morabito R, Yanasse H. Special issue: cutting and packing problems. Pesquisa Operacional 1999;19(2):

109–284.[12] Wang P, Waescher G. Special issue on cutting and packing. European Journal of Operational Research 2002;141(2):

239–469.[13] Hifi M. Special issue: cutting and packing problems. Studia Informatica Universalis 2002;2(1):1–161.[14] Martins GH. Packing in two and three dimensions. Dissertation, Naval Postgraduate School, California, EUA, 2002.[15] Lodi A, Martello S, Monaci M. Two-dimensional packing problems: a survey. European Journal of Operational Research

2002;141:241–52.[16] Morabito R, Morales S, Widmer JA. Loading optimization of palletized products on trucks. Transportation Research

2000;36(Part E):285–96.[17] Tarnowski A, Terno J, Scheithauer G. A polynomial-time algorithm for the guillotine pallet loading problem. INFOR

1994;32(4):275–87.[18] Dowsland K. An exact algorithm for the pallet loading problem. European Journal of Operational Research 1987;31:

78–84.[19] Nelissen J. How to use the structural constraints to compute an upper bound for the pallet loading problem. European

Journal of Operational Research 1995;84:662–80.[20] LetchfordA,AmaralA.Analysis of upper bounds for the pallet loading problem. European Journal of Operational Research

2001;132:582–93.

Page 16: Some experiments with a simple tabu search algorithm for the ...

V. Pureza, R. Morabito / Computers & Operations Research 33 (2006) 804–819 819

[21] Beasley JE. An exact two-dimensional non-guillotine cutting tree search procedure. Operations Research 1985;33:49–64.[22] Tsai R, Malstrom E, Kuo W. Three dimensional palletization of mixed box sizes. IEE Transactions 1993;25(4):64–75.[23] Chen C, Lee S, Shen Q. An analytical model for the container loading problem. European Journal of Operational Research

1995;80:76–88.[24] Hadjiconstantinou E, Christofides N. An exact algorithm for general, orthogonal, two-dimensional knapsack problems.

European Journal of Operational Research 1995;83:39–56.[25] Amaral A, Letchford A. Comment on: an exact algorithm for general, orthogonal, two-dimensional knapsack problems.

Working paper, Department of Management Science, Lancaster University, 1999.[26] Bhattacharya S, Roy R, Bhattacharya S. An exact depth-first algorithm for the pallet loading problem. European Journal

of Operational Research 1998;110:610–25.[27] Lins L, Lins S, Morabito R. AnL-approach for packing (l, w)-rectangles into rectangular andL-shaped pieces. Journal of

the Operational Research Society 2003;54:777–89.[28] Morabito R, Farago R. A tight Lagrangean relaxation bound for the manufacturer’s pallet loading problem. Studia

Informatica Universalis 2002;2(1):57–76.[29] Steudel H. Generating pallet loading patterns: a special case of the two-dimensional cutting stock problem. Management

Science 1979;10:997–1004.[30] Smith A, De Cani P. An algorithm to optimize the layout of boxes in pallets. Journal of the Operational Research Society

1980;31:573–8.[31] Bischoff E, Dowsland W. An application of the micro to product design and distribution. Journal of the Operational

Research Society 1982;33:271–80.[32] Nelissen J. Solving the pallet loading problem more efficiently. Working Paper, Graduiertenkolleg Informatik und Technik,

Aachen, 1994.[33] Scheithauer G, Terno J. The G4-heuristic for the pallet loading problem. Journal of the Operational Research Society

1996;47:511–22.[34] Morabito R, Morales S. A simple and effective recursive procedure for the manufacturer’s pallet loading problem. Journal

of the Operational Research Society 1998;49:819–28.[35] Morabito R, Morales S. Errata: a simple and effective recursive procedure for the manufacturers pallet loading problem.

Journal of the Operational Research Society 1999;50:876.[36] Dowsland K. Some experiments with simulated annealing techniques for packing problems. European Journal of

Operational Research 1993;68:389–99.[37] Herbert A, Dowsland K. A family of genetic algorithms for the pallet loading problem. Annals of Operations Research

1996;63:415–36.[38] Dowsland K. Simple tabu thresholding and the pallet loading problem. In: Osman IH, Kelly JP., editors. Metaheuristics:

theory and applications. Dordrecht: Kluwer Academic Publishers; 1996. p. 378–406.[39] Yamassaki C, Pureza V. Um refinamento do algoritmo tabu de Dowsland para o problema de carregamento de paletes do

produtor (A refinement of Dowsland’s tabu search algorithm for the manufacturer’s pallet loading problem). Produção2003;13:6–17.

[40] Arenales M, Morabito R. An and/or-graph approach to the solution of two-dimensional non-guillotine cutting problems.European Journal of Operational Research 1995;84:599–617.

[41] GY, Kang M. A fast algorithm for two-dimensional pallet loading problems of large size. European Journal of OperationalResearch 2001;134:193–200.

[42] Lins L, Lins S, Morabito R.Ann-tet graph approach for non-guillotine packings ofn-dimensional boxes into ann-container.European Journal of Operational Research 2002;141:421–39.

[43] Glover F, Laguna M. Tabu search. Dordrecht: Kluwer Academic Publisher; 1997.[44] Dowsland K. The three-dimensional pallet chart: an analysis of the factors affecting the set of feasible layouts for a class

of two-dimensional packing problems. Journal of the Operational Research Society 1984;35:895–905.[45] Kullick A. Interlocking pallet pattern simulation program. Industrial Engineering 1982;September:22–4.