0 valutazioniIl 0% ha trovato utile questo documento (0 voti)
129 visualizzazioni10 pagine
The document summarizes research on 3D container packing heuristics. It describes the container packing problem of fitting rectangular boxes into a container to maximize space utilization. It categorizes packing problems and surveys existing heuristic approaches, such as wall building methods that build layers of boxes. The authors then propose two new heuristics - a basic heuristic and two augmenting heuristics - to handle homogeneous and heterogeneous box types. Their algorithms exceed benchmark results by an average of 4.5% on tested problems.
The document summarizes research on 3D container packing heuristics. It describes the container packing problem of fitting rectangular boxes into a container to maximize space utilization. It categorizes packing problems and surveys existing heuristic approaches, such as wall building methods that build layers of boxes. The authors then propose two new heuristics - a basic heuristic and two augmenting heuristics - to handle homogeneous and heterogeneous box types. Their algorithms exceed benchmark results by an average of 4.5% on tested problems.
Copyright:
Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
The document summarizes research on 3D container packing heuristics. It describes the container packing problem of fitting rectangular boxes into a container to maximize space utilization. It categorizes packing problems and surveys existing heuristic approaches, such as wall building methods that build layers of boxes. The authors then propose two new heuristics - a basic heuristic and two augmenting heuristics - to handle homogeneous and heterogeneous box types. Their algorithms exceed benchmark results by an average of 4.5% on tested problems.
Copyright:
Attribution Non-Commercial (BY-NC)
Formati disponibili
Scarica in formato PDF, TXT o leggi online su Scribd
c 2005 Springer Science + Business Media, Inc. Manufactured in The Netherlands.
3-D Container Packing Heuristics A. LIM Department of IEEM, Hong Kong University of Science and Technology, Clear Water Bay, Hong Kong B. RODRIGUES School of Business, Singapore Management University, 469 Bukit Timah Road, Singapore 259756 Y. YANG Department of Computer Science, National University of Singapore, 3 Science Drive 2, Singapore 117543 Abstract. In this paper, we study the 3-D container packing problem. The problem is divided into box selection, space selection, box orientation and new space generation sub-problems. As a rst step, a basic heuristic is devised. From results using this heuristic, problems are categorized as homogeneous and heterogeneous. Two augmenting heuristics are then formulated to deal with these categories. They are complementary in their capabilities in dealing with a range of practical problems, and in terms of their computational consumption. Results using our algorithms exceed the benchmark by 4.5% on average. Keywords: packing, heuristics, combinatorial optimization, logistics 1. Introduction The problem that we study in this paper is that of packing a subset of a number of given rectangular three-dimensional (3D) boxes into a given rectangular container. Packing boxes or cartons into containers is a basic material handling activity in the manufacturing and distribution industries. There are a number of vari- ants of container packing depending on the objectives that are required and constraints present. Generally, 3D packingproblems fall intothe followingclassications. Bin-Packing Problems (3D-BPP): Given a list of rect- angular boxes of various sizes and a number of rect- angular containers or bins, we attempt to pack all the boxes into a minimum number of bins. The assump- tions here are that items may not be rotated, i.e., that they are packed with each edge parallel to the corre- sponding bin edge. The 3D-BPP is strongly NP-hard see Martello et al. [1], for example. Knapsack Loading Problems (3D-KLP): The knapsack loading of a container is determined by the objective of maximizing prot where each item to be loaded into a single container has an associated prot. In this case, if we take prot of each item to be its volume then the 3D-KLP corresponds to the minimization of wasted space. Heuristics for this problem have been presented by Gehring [2] and Pisinger [3]. Container-Packing Problems (3D-CPP): Boxes have to be packed into a single container, with the objective of minimizing volume utilization in the container. In a commonly found Strip Packing variant of this problem, the container is assumed to be of innite height and the problem is then to nd a packing which minimizes the height to which the container is lled. Recent work on this problem has been done by Miyazawa and Wakabayashi [4] and Fiana [5]. George and Robinson [6] gave a rst heuristic for the 3D-CPP and there have been several studies since. In addition to the above constraints, there may be other constraints such as orientation restrictions, weight distribution, locality restrictions that may be imposed 126 Lim, Rodrigues and Yang in the 3D-CPP. We refer the reader to Dyckhoff [7], Dychoff and Finke [8], Dowsland et al. [911] and Dyckhoff et al. [12] for general classication of pack- ing and loading problems. Several other constraints can be imposed on packing problems. Weight of boxes impact stability and balance there may be restriction on how much loading each box can withstand, and how packing walls are formed to provide stability. For example, this would be a feature in pallet pack- ing. Bischoff and Ratcliff [13] provide details on such problems, while Bischoff et al. [14] give a heuristic on pallet-loading. Another constraint is when loads should be divided into separate and distinct sections of a container for unloading at various drop-off points; this multi-drop problem is studied by Bischoff and Ratcliff. Another important characteristic is the mix of boxes to be packed. At one extreme, we have entirely homogeneous (or identical) boxes, while situations ex- ist where box sets are strongly heterogeneous (i.e. con- sisting of many different box types). Gehring et al. [2] and Bortfeldt [15] note that the distribution of box types cause heuristics to performbadly when given instances change. In the next Section 2, we give the description of the problem and a short survey of heuristics that have been developed for the 3D-CPP and related problems. In Section 3, we give a basic heuristic for packing a con- tainer which gives a packing tree as output, and which we use as a base to develop enhanced algorithms in Sections 4 and 5 for homogeneous and heterogeneous problems respectively. Experimental results and com- parisons are given throughout this study. In Section 6 we summarize our ndings and make some conclu- sions. 2. Problem Description and A Survey of Heuristics Given a set of rectangular boxes B = {b 1 . . . . . b n } and a container C, let x i , y i and z i be the dimensions of the box b i . Let o i x , o i y and o i z be box orientation 0-1 indicators which dictate if a placement in the vertical orientation is permissible or not for the x, y and z di- mensions of the box. The objective of the problem is to select a subset S from B, i.e. S B, and assign a position to each box, b j S, in container C such that b j B (x j .y j .z j ) is maximized subject to the constraints: all boxes in S must be totally contained in C; no two boxes in S overlap; and the orientations of boxes in S comply with their orientation indicators o i x , o i y and o i z . George and Robinson formulated a heuristic algo- rithm for the packing of up to 20 different box types into one container. In their algorithm, a wall-building method was proposed for the rst time. The boxes to be loaded are divided into two classes: opened and unopened, with the distinction being whether boxes of the type in question have already been used or not. Open types are given preference in determining which boxes should be used to commence the next layer. The rst box (layer determining boxLDB) in a layer is crucial, as it dictates the depth of the cross-section con- sidered at that stage of the packing process and attempts are made to ll the section with columns of boxes of the same type. Other box types are considered for only lling spaces left within the current layer or for pack- ing gaps which combine these with spaces in earlier layers. If there are no open box types, then LDB is de- termined on the basis of a series of priority keys: the size of the smallest dimension of a box; the larger it is, the higher the rank; the number of boxes of a particular type; and the size of the largest dimension of a box. If two or more box types are open at the same time, two different possibilities were suggested: select the type with the largest number of boxes yet to be packed; and choose the type with the highest ranking according to the priority key used for unopened box types above. In addition to this approach, George and Robinson [6] employ a parameter k which is used to limit the layer depth to a certain range of values. The solu- tions reported as the result of George and Robinsons approach is the best solution obtained in many runs of different k. In another paper by the same author George [16], a method for solving container packing for a single size of box was described. In this paper, the notions of unpacking and repacking and rotation were introduced to improve performance. Bischoff and Dowsland [17] give a method based on lling the con- tainer by building layers across its width. There are two main differences to Georges approach: rst, each layer is constructed only from a single type of box; and secondly, the arrangement of boxes within a layer is determined through a two-dimensional packing pro- cedure which aims to maximize the area utilization of the cross-section (i.e. of the rectangle formed by the width and height of the container). This maximization of the area utilization is achieved by a heuristic origi- nally proposed for calculating layout patterns for boxes on a pallet. Like the approach of George and Robinson, 3-D Container Packing Heuristics 127 the criterion used to decide the depth dimension of a layer, is of paramount importance. For deciding the LDB, each of the three sides of boxes is examined in turn as a potential depth dimension for a layer. With this dimension xed, the maximum number of boxes whichcanbe accommodatedinthe cross-sectionis then determined by means of the two-dimensional packing routine. Han et al. [18] provided a heuristic based on the dynamic programming method and wall-building method. In his study, the objective was to maximize the volume utilization and there were no orientation constraints. The algorithm calls for the boxes to be packed along the base and one vertical wall of the container. After this L-shaped packing is complete, a new container was formed, which is then the focus of the successive packing. An iterative process is then followed until the original container was completely packed. Xue and Lai [19] provided an algorithm based on wall-building method. Both the cargo and container are rectangular. This algorithm was comprised of three heuristics. The ordering heuristic sorts the cartons ac- cording to the depth, quantity and surface area. Higher priority was assigned to cartons with larger values of the above characteristics. The placement heuristic de- termines the depth of the new layer. The third heuristic is layer-building heuristic. Gehring et al. [2] proposed a method to pack rectangular boxes of different size into a shipping container of known dimensions. The problemis to determine positions for placing the boxes in the container such that the inevitable waste of space is minimized. This problem specication does not al- low for orientation constraints. The algorithm is also based on the wall-building method. In the packing of one layer, the best tting pair of boxes is chosen. For a given spare space the best tting box-pair is the pair with the highest volume which can be tted in the spare space. In this method, a series of ranking rules such as box ranking rule, box position ranking rule are assumed. Nadim [20] presented a computer-aided box stacking model for truck transport and pallets. This paper explained a packing algorithm, an algorithm for database generation, a modeling algorithm and a graphics display algorithm. Ngoi et al. [21] designed a heuristic algorithm based on spatial representation techniques to solve the problemof packing rectangular carton boxes into a single rectangular container, which includes nding the best placement position and orien- tation for each box. In addition, the height dimension of boxes was xed along vertical orientation. How- ever, other two dimensions can be interchanged. The method represented boxes and empty spaces as a com- bination of variable orthorhombic cells by means of simple matrixstructure whichmodels the spatial details during packing process. The positions and dimensions of all the packed boxes as well as empty spaces are represented by a single three-dimensional matrix (also called spatial matrix). This spatial matrix consists of a chain of two-dimensional matrices which represents the cross-sectional details for a slice of constant thick- ness. A packed box was represented by matrix cells containing the identication number of the box. Empty space is represented by matrix cells with value 0. As more boxes are placed into the container, the matrix expands to accommodate additional information. One of its main ideas was empty which was dened as the space bounded by the vertical upward projection of a rectangular horizontal face within the container. The horizontal faces are either the top face of the packed boxes or a portion of the container base. With this def- inition, the spaces available in the container were di- vided into orthorhombic shape of different sizes. The other is the matching routine which compared the di- mensions of all unpacked boxes with the preferred di- mensions of all the available empty volumes and selects the best combinations for placement. This algorithm is not a variant of wall-building method. Moreover, this packing algorithmis independent of the ordering of the boxes which usually exists in other algorithms. How- ever, the strategy is apt to divide the original container into many small empty spaces which are not suitable for holding big boxes in successive packing. The test- ing results showed its packing volume utilization is about 80%. Chua et al. [22] described an improved method based on Ngoi et al. which allows the user to suggest the locations of certain boxes which exists in real-life packing problems. Lai et al. [23] gave a graph- theoretic model and method for a container packing problem arising from a multi-customer delivering op- eration, where the custom cargoes have different sizes and each kind of cargo has limited quantity. In a multi- customer delivering operation, several customer orders (set of cargoes) are packed into a container and deliv- ered on a trip. Customer orders are packed in reverse order of their delivering point along the route. Further- more cargoes belong to the same customer must be packed together in the container. Therefore, container space are partitioned into length-wise sections and as- signed to customer orders. To deliver as many cus- tomer orders as possible (in a single trip) is equivalent to the problemof minimizing the section each customer 128 Lim, Rodrigues and Yang order occupies. In this algorithm, a graph is constructed on the base of the method of Christodes and Whitlock [24] for a two dimensional cutting stock problem. Each feasible location (including origin and orientation) of a box corresponds to one vertex of graph. Two vertices are adjacent if and only if they are not the same box and are non-overlapping for the position and orientations. In the specication of his problem, packed boxes have the same shape. The packing problem is then equiva- lent to nd the maximumclique of the generated graph. One of the disadvantages of this method is the graph size, for example, the number of nodes is about 1000 even there are no more than 10 boxes. Ivancic et al. [25] proposed an integer programming based heuris- tic approach to the three dimensional packing problem where a container is to be packed so as to maximize a linear function of the boxes packed. Most packing strategies are based on the wall- building with some adaptations. The method itself is a greedy heuristics which can lead to weak - nal solutions. Other methods include using spatial- representation, reducing the problem to maximum clique problem or an integer programming problem. For methods based on the spatial representation, empty volume search routines are apt to generating small spaces, whereas the successful utilizationof these small spaces is difcult. For methods based on graph theory and integer programming, one of the disadvantages is the loss of information during the reduction, and the other is the inherent difculty of these reduced prob- lems. On the whole, published works generally give successful implementations and provided some inter- esting insights into the various views on howsuccessful packings are best achieved. William [26] discussed the benets of the develop- ment of a general packing heuristic and its difculties. However, the conceptual and computational difcul- ties inherent in the solution of such problems mean that it is unlikely that a heuristic designer will be able to produce a satisfactory, generally applicable solution method. Input from simpler problems was emphasized in Williams analysis. Astudy of methodologies used in lower-dimensional packing reveals that exact solution approaches based on mathematical programming and graph theory could theoretically be extended to three- dimensions. However, they would almost certainly be intractable for realistic problems in three-dimensions. The effect which certain parameters of a problem mayhave onthe performance of a heuristic, was studied by Bischoff and Ratcliff [27]. Fourteen heuristics were analyzed in this paper. Among the fourteen heuristics, six heuristics were variants of approach of George [6] All these six heuristics used the same ordering principle for open and unopened types, but have different box ranking rules. 3. A Packing Tree Generating Heuristic Most algorithms on the 3D-CPP use wall-building or layering methods. We develop here an approach that discriminates between what we call a geometric box anda positionedbox. This thenisolates practical con- straints in implementation since most of the latter will be concerned with positioned boxes. Also, we orga- nize the packing process as a data structurea packing tree. This makes it easy to isolate successful and un- successful packing steps in the packing process which is useful for the purpose of further improvements. 3.1. Preliminaries and Terminology A geometric box is a rectangular box (or arrangement of several such boxes) which have dimensions and ori- entation. A positioned box (see [20]) is used to record space occupied by geometric boxes. It records: the geo- metric box including the dimensions along a reference set of axes of the geometric box corresponding to a per- missible orientation of the latter, and a space generation scheme (described below). Space generation: Once a geometric box is packed and its position box created, there are six possible schemes for which the space left- over by the position box can be viewed as made up of rectangular spaces (or just spaces ). Once the space generation scheme is chosen for the box, it is recorded in the position box. Space refers to a rectangular box- shaped space. When a box is loaded into a space and its location and orientation is xed (or a positioned box is created), this space will be partitioned into several rectangular subspaces by this created positioned box. There are six ways to generate these new rectangular subspaces. Once a partitioning method is chosen, it is recorded as a property of the positioned box. An example of generated subspaces is shown in Fig. 1. There are six subspace generation schemes, none of which is su- perior. In our heuristics, we will rank space genera- tion schemes arbitrarily since, from experiments, no one scheme provides an advantage. In ranking ge- ometric boxes, we adopt a decreasing order of V, 3-D Container Packing Heuristics 129 Figure 1. An example of newly generated subspaces. R and L, where V is the volume of a box, R length of its diameter and L its perimeter. Bischoff and Marriott [28] have shown that ranking in certain attributes pro- duce good results when compared with other rank- ing orders. We will also rank positioned boxes by the rank of the represented geometric box and rank spaces by non-decreasing volume. Small free spaces are con- sidered earlier in our packing. Orientation constraints are specied within box orientation indicators. Pack- ing tree: Once a box is placed and a space generation scheme picked, the container will have three empty spaces as described above. As these are lled, we con- tinue this process producing more new spaces. A pack- ing tree is thus generated where the root represents the largest space (the container). Further, a packing tree node contains a positioned box; the space to be packed currently and its volume; and a memory list whichis usedtorecordpositionboxes chosentoprevent the same position box to be chosen in subsequent im- provement searches. Beside the properties of tree data structure, packing trees have a common property of re- maining boxes which recrod the list of boxes not yet packed. For position boxes, the ranking order proposed by Gehring et al. [2] is adopted here. We rank free spaces in a non-decreasing order of the volumes. Low-volume free spaces are considered earlier for packing. Orientation constraints for the cargo are specied by the 0-1 box orientation indicators in input data le (see [29]). Lastly, a memory list is used to record position boxes chosen to prevent the same position box being chosen in subsequent search. 3.2. The packing tree Heuristic We assume that we have a box list consisting of n boxes and a space list with m 1 spaces (container). Our basic heuristic is given below. Input: A box list B with n (n 1) geometric boxes; a space list S with m (m 1) spaces (containers). Output: A packing tree (packingtree) for each container. Algorithm: packing tree Outline: Order B as b 1 . b 2 . . . . . b n based on the geo- metric box ranking order and S as s 1 . s 2 . . . . . s m based on the space selection criteria. For i = 1 to m: Con- struct a tree Node (root i ) with s i as its space property and a newly-constructed list as its memory list prop- erty. Set packingtree i =Packing(root i , B) and assign the remaining boxes of packingtree i to B. If B is empty, we break the (for) loop. Sub-Routine: Packing(Node :, List glist) Outline: Construct a tree (packingtree) with only : as its root. If list glist is empty, return null. Let s be the space property of Node : and mlist be the memory list of Node :. Set boxpair = PairFind (s, glist, mlist): If boxpair == null, return null. Otherwise boxpair will include one or two positioned boxes (e.g. b p and b q ) from the geometric box list glist such that volume(b p )+volume(b q ) volume(s) is maximized. WLOG, we assume volume(b p ) volume(b q ). Now, pack b p into s as fol- lows: Remove the geometric box of b p from the box list glist and let b p be the positioned box property of the Node :. Generate no more than three child spaces (s x , s y , s z ) by packing b p . WLOG, we assume volume(s z ) volume(s y ) :olume(s x ). For each of the newly- generated s x , s y , s z : Construct a newNode (nodet emp) with one of these newly-generated spaces as its space property and a newly constructed list as its memory list. Set subpackingtree = Packing(nodet emp, glist) and packingtree = packingtree +subpackingtree. Cal- culate the volume utilization of space s and set it to be the volume utilization property of Node : to return packingtree. Sub-Routine: PairFind(Space s, List glist, List mlist) Outline: If the sorted geometric box list glist is empty, return null. Find the rst geometric box at the be- ginning of glist which can be contained in s. If such 130 Lim, Rodrigues and Yang a box cannot be found, return null. Create and record all positioned boxes of this geometric box which can be contained in s. These positioned boxes are to be used to partition s. For each of the recorded posi- tioned boxes: Choose a space partitioning scheme to generate child spaces of s and record it as a space par- titioning property of this positioned box. [For the same box with the same orientations, the positioned boxes are different if the space partitioning property is dif- ferent.] This positioned box is saved in mlist and used later. Find the second box fromthe remaining boxes for which one of its permissible placements can be con- tained in at least one of the newly-generated spaces. The two boxes found above consist one box pair. If a second such box cannot be found, the box pair will only have one box in it. From the above steps, several box pairs are found to correspond to different layouts (including placement and space partitioning schemes) of the rst box . The pair with the maxi- mum volume is chosen for comparisons. Let listtemp be the sublist of glist between the two boxes found above and call on PairFind(s,listtemp, mlist) recur- sively for another box pair to be returned. Finally, com- pare the two box pairs, and return the one with the larger volume. Table 1. Results obtained with test data of Loh and Nee [30]. Volume utilization (%) Loh and Nee [30] Ngoi et al. [21] Bischoff and Ratcliff [13] Bischoff et al. [14] packing tree Problem (a) (b) (c) (d) (e) 1 78.1 62.5 62.5 62.5 62.5 2 76.8 80.7 89.7 90.0 80.4 3 69.5 53.4 53.4 53.4 53.4 4 59.2 55.0 55.0 55.0 55.0 5 85.8 77.2 77.2 77.2 76.7 6 88.6 88.7 89.5 83.1 84.8 7 78.2 81.8 83.9 78.7 77.0 8 67.6 59.4 59.4 59.4 59.4 9 84.2 61.9 61.9 61.9 61.9 10 70.1 67.3 67.3 67.3 67.3 11 63.8 62.2 62.2 62.2 62.2 12 79.3 78.5 76.5 78.5 69.5 13 77.0 84.1 82.3 78.1 73.3 14 69.1 62.8 62.8 62.8 62.8 15 65.6 59.6 59.5 59.5 59.5 Average 74.2 69.0 69.5 68.6 67.0 3.3. Comparisons with Results by Other Researchers The fteen test problems from Loh and Nee [30], Ngoi et al. [21] and Bischoff and Ratcliff [13] are used to evaluate the performance of our heuristic. Table 1 lists these results against ours. Columns (a), (b), (c) and (d) list the results presented in [13, 14, 21, 30] respectively. Column (e) are the results of our basic heuristic. The results of our basic heuristic are marginally in- ferior to the others on the whole, with the note that for (a), volume utilization is generally overstated as these are quoted on smallest rectangular enclosures rather than actual container dimensions. More signicantly, however, our heuristic fully packs cases that are fully packed by the others while being considerably simpler. Although the packing tree algorithm gives results slightly inferior to the others, it is simpler to imple- ment and has a concise packing procedure and data structure which allow for improvement and data vi- sualization. Moreover, the notion of a geometric box introduced here includes customer dened constraints, e.g., orientation. An additional benet is that practical constraints are isolated form implementation by the use of position boxes. The organization of the packing 3-D Container Packing Heuristics 131 process as a packing tree facilitates the understanding of success and failure in the packing process. Experi- ments on the effect of space generation schemes have shown these to be negligible on the average. In general, we have found that most of space that is wasted is ad- jacent to each other, and that this phenomenon occurs especially at the boundary of the container for homoge- neous problems and occurs scattered for heterogeneous problems. As the performance of this basic heuristic is not of concern to us at this point, no further comparison or analysis is needed. The geometric property of the wasted spaces gener- ated by the heuristic approaches could be very com- plex. Generally, for homogeneous problems, most of the wasted spaces will be in the container periphery while for the heterogeneous problems, they seem to be scattered. We nd that many low-volume wasted spaces are adjacent and that it is worth the effort to reuse such spaces. In the following, a 2D algorithm is described that addressed this for homogeneous problems while a search algorithm is designed specically for the het- erogeneous problem. 4. An Improved Heuristic for Homogeneous Problems From experiments we found that much of the smaller spaces generated by packing tree is not utilized. In examining the literature on the 3D-CPP, we found no work on wasted space recycling. It is appropriate there- fore that we examine recycling which we do here in a two-dimensional setting for the purpose of developing an enhanced heuristic. This two-dimensional heuris- tic is appropriate since, for the homogeneous case, i.e., when there is no mix in items to be packed, most unused or wasted space has been found to be at the boundaries of the container. 4.1. The max empty rectangle Search Consider a 2D rectangular space containing two small rectangular barriers. We seek the maximum rectangu- lar empty space within this space with no overlap with these barriers. A spatial representation system devel- oped by Ngoi and Whybrew [31] is employed. Objects and empty spaces are represented as a combination of variable orthorhombic cells by means of a simple ma- Figure 2. Matrix representation. trix structure. A similar method is described to repre- sent the empty rectangles and rectangular barriers in 2D problems. In Fig. 2, the entire rectangle is divided into a 55 matrix. As more barriers are placed into the rect- angle, the matrix expands to accommodate additional information. Each element (cell) contains information on whether the cell is occupied by a barrier and the dimensions of the cell. When the cell is not occupied it is empty and, otherwise, it is lled. More generally, a matrix M RC is used, where R is the number of current rows and C the number of current columns and e i. j represents the element in the i th row and j th column. The following terms are used in the statement of the algorithm below: open row: the rst row is open iff at least one cell is not empty. Otherwise, the rst rowis not considered and the second row becomes the rst row. Row i > 1, is open iff there exists a j (1 j C) such that e i 1. j is not empty and e i. j is empty. For example, in Fig. 3 the 4th and 5th rows are open whereas the 2nd and 3rd are not. open column: symmetrical denition to open row. closed row: the Rth rowis closed. Rowi - R is closed iff there exists a j (1 j C) such that e i +1. j is not empty but e i. j is empty. For example, in Fig. 3, the 2nd and the 5th are closed rows. closed column: symmetrical denition to closed row. segment: a segment consists of adjacent cells in the same rowand is represented by the rst and last cells. For example, the segment e i.1 to e i.4 is represented as e i.1 e i.4 empty block: is a rectangular empty space bounded by rows r1 and r2, where r1 r2 and columns c1 and c2 where c1 c2, where r1 and c1 are open and r2 132 Lim, Rodrigues and Yang and c2 are closed. We say that the size of the empty block is the area of empty spaces it represents (and not the number of cells it contains). It is represented by an appropriate sub-matrix. For example, AFLG and ADNH in Fig. 2 is an empty block. We can now state the max empty rectangle search algorithm: Input: A 2D R C matrix M describing the barrier locations and empty spaces. Output: The maximum empty rectangular space. Algorithm: max empty rectangle Outline: Generate sets O of open rows; + of closed rows; +of open columns and Aof closed columns and sort these in increasing order; dene empty set L; for each i O, split row i into segments containing only empty cells. If entire row is empty the result is only one segment. For each empty segment, S, generated above, set emptyblock : search max empty block (S) and add emptyblock to L; return the maximum empty rectangle in L. Subroutine: search max empty block(S) Outline: Let e i.t e i.s represent S above; create an empty box, E, bounded by rows i and m and columns t and s.where we choose m i to be the smallest element in + such that there exists a k with t k s and where e m.k is nonempty. Set maxemptybox = E; if m = R return maxemptyblock; split subrow, e m+1.t e m+1.s into segments consisting of only empty cells. For any such segment e m+1.u e m+1.: generated, dene the empty block F =search max empty block (e m+1.u e m+1.: ). Let e m+1.n and e a.b be the left-most bottom and right- most top cell respectively of F. Combine the submatrix whose left-most bottom cell is e i.n and whose right- most top cell is e m.b with F and rename this matrix F. Let maxemptyblock = max (F, maxemptyblock); return maxemptyblock. 4.2. The Improved Heuristic The preceding 2D methods can be used to organize on wasted spaces near the faces of the container. How- ever, adaptations the 2D algorithm for the 3D case are needed. We can redene size of empty blocks as fol- lows: Assuming the empty block consists of a set of empty cells. Each cell will have a corresponding third dimension. Let D be the minimum value of these di- mensions and redene the size of the empty block to be D ARE A, where ARE A is the size of the empty block in the original 2D algorithm. We can now describe an improved improved packing tree 1 algorithm. Input: packingtree given by the basic heuristic algorithm. Output: An improved packingtree. Algorithm: improved packing tree 1 Outline: Let S be the empty spaces recorded in pack- ing tree;face i be the container face perpendicular to axis i = 1. 2. 3. S i := {x : x S and x is adja- cent to face i }; Create a matrix representation M i of S i and for each M i , employ the above 2D algorithm to get maxemptyrectangle i ; Let maxemptyspace = max i (maxemptyrectangle i ) and use our heuristic to pack maxemptyspace to get another packing tree - ptree - and let the root of ptree be a child of the root of packingtree; return packingtree. 5. An Improved Heuristic for Heterogeneous Problems Fromthe conclusions in the previous section, we found a need to develop another approach to the 3D-CPP when cargo is weakly heterogeneous (mixed) or for strongly heterogeneous problems. The packing tree that was developed has as it root a the container. As this container will be divided into two or three sub- spaces after the rst positioned box is packed, and these subspaces will likewise be packed, and divided, it is natural to think of improving packing by singling out steps (or nodes) that have low volume utilization when compared to those at the same tree level say. These identied nodes could then be unpacked and repacked. This approach, however, has failed in our experiments, where improvements, if any, were small and comput- ing time extensive. Fromexperience gained in these ex- periments, we have designed the following enhanced algorithm which provides higher priorities for parent nodes to deal with the heterogeneous case. Each node of any packing tree includes a memory list (mlist) and a space S. The application of such a mem- ory list can be understood through the basic heuristic given above. In that algorithm, the rst step in pack- ing a specied space S is the choice of a positioned 3-D Container Packing Heuristics 133 box by which the space S is partitioned into three new subspaces. There are many feasible choices of this po- sitioned box. We note that the memory list mlist for this node (or for the space S included in this node) is used to record such positioned boxes chosen to prevent the same positioned box to be used in the successive search improvement. 5.1. The Improved Heuristic Input: packi ngTree given by the basic heuristic. Output: An improved packi ngTree. Algorithm: improved packing tree 2 Outline: Make a copy(besttree) of ptree; label 1 : while (TRUE), do breadth-rst traversal on ptree with its root as the beginning point of the traversal to nd node N suchthat: (1) The number of element inmlist of Node N does not exceed a specied bound and (2) (1j)S VB min , where S is the space of the node N, VB min is the volume of the minimum box among the remaining boxes of the ptree, and j is the volume utilization of S. Next, if N = null, break label 1 . Let S be the space included in node N and subtree be the subtree of which the root is N of ptree. Let RBS be the remainingboxes of ptree and let UPBS represent boxes packed in the space S. UPBS can be obtained by cutting subtree from ptree and collecting all the boxes in the subtree. Let RBS = RBS UPBS and assign RBS as the new remaining boxes of the ptree. Now, update the properties of node N so that: its volume utilization property is zero and its positioned box property is null and other properties such as memory list and space property are unchanged. Set subtree = Packing(N. RBS). If subtree == null, Table 2. Comparisons with Bischoffs heuristics. Average volume utilization (%) Test le Bischoffs heuristic packing tree packing tree 1 packing tree 2 thpack1.txt 85.4 74.9 79.9 87.4 thpack2.txt 86.25 75.6 79.4 88.7 thpack3.txt 85.86 76.9 78.9 89.3 thpack4.txt 85.08 77.5 79.2 89.7 thpack5.txt 85.21 76.7 78.6 89.7 thpack6.txt 83.84 77.0 78.8 89.7 thpack7.txt 82.95 76.8 78.3 89.4 copy besttree to ptree and continue label 1 . Let ptree = ptree subtree and update the properties of relative nodes such as the parent, grandparent nodes of the node N and the root of the ptree, and update the remaining boxes of ptree. If ptree is better than besttree, then copy ptree to besttree. If the remaining box property of the ptree is null, then break label 1 . Copy besttree to ptree. End while and return the besttree. 6. Experiments We carried out several experiments to compare the improved heuristics developed here with each other as well as with other results and specically with Bischoffs benchmarks. Case 1: Test data is from [18] is usedhere. All boxes are identical in this problem. Compared with the volume utilization of [18] (95.75%), the volume utilization of our basic heuristic is about 82.5%. However, with application of wasted space recycling as given here, the volume utilization is boosted to 96.0%. Case 2: In this case, the test les in the ORLIB [29] are used. In Table 2, the results of Bischoff [13] are compared with ours. Bischoffs results are currently the best, while data in OR-Library is generated following his box generation method. This allows these results to be taken as the benchmark. In this table, we see that the performance of Bischoffs algorithm is affected by the number of box types where his algorithm performs better for the low- volume box type number. However, the results of our second augmenting algorithm come very close for these problems. What is signicant is that volume utilization of our algorithm goes beyond that of Bischoff by 4.5% on average. 134 Lim, Rodrigues and Yang 7. Summary Our packing strategy takes form in three steps. In the rst, a basic heuristic was proposed, essentially to gen- erate a packing tree for successful or unsuccessful packing. Two augmenting algorithms are then designed to improve the resultant packing tree generated by this basic heuristic. For homogeneous problems, because wasted space is located largely on the boundaries, a 2D recycling method was developed. Its performance surpasses that of [18] which was developed speci- cally for packing identical boxes. The improvements of volume utilization for the basic heuristic is about 15% for homogeneous problems and about 5% for het- erogeneous problems in [29]. For the heterogeneous problems, a search method was designed to improve the packing tree generated by our basic heuristic. This search algorithm is recursive in nature. Each node of the packing tree is searched completely before any of its nodes were searched. The number of search steps on each node is limited by a memory list associated with each node. Our results show that the performance of this algorithm exceeds the benchmark signicantly by 4.5% on the average. Further improvements are obtained by combining these three algorithms. This is possible since input and output for all are packing trees. The algorithms com- plement each other and can be used together. References 1. S. Martello, D. Pisinger, and D. Vigo, The three dimensional bin packing problem, Operations Research, vol. 48, pp. 256267, 2000. 2. H. Gehring, K. Menschner, and M. Meyer, A computer-based heuristic for packing pooled shipment containers, European Journal of Operational Research, 1990. 3. D. Pisinger, The container loading problem, in Proceedings NOAS97, 1997. 4. Y. Wakabayashi and F.K. Miyazawa, An algorithm for the three dimensional packing problem with asymptotic perfor- mance analysis, Algorithmica, vol. 18, pp. 122144, 1997. 5. L. Faina, A global optimization algorithm for the three dimen- sional packing problem, European Journal of Operational Re- search, vol. 126, pp. 340354, 2000. 6. J.A. George and B.F. Robinson, A heuristic for packing boxes into a container, Computer and Operational Research, vol. 7, pp. 147156, 1980. 7. H. Dyckhoff, A typology of cutting and packing problems, European Journal of Operational Research, vol. 44, pp. 145 159, 1990. 8. H. Dyckhoff and U. Finke, Cutting and Packing in Production and Distribution, Physica Verlag, Heidelberg: Germany, 1992. 9. W.B. Dowsland, Three dimensional packing-solution approaches and heuristic development, International Journal of Operational Research, vol. 29, pp. 16371685, 1991. 10. K.A. Dowsland and W.B. Dowsland, Packing problems, Euro- pean Journal of Operational Research, vol. 56, pp. 214, 1992. 11. K.A. Dowsland and W.B. Dowsland, Acomparative analysis of heuristics for the two dimensional packing problem, in EURO 6 Conference Paper, 1983. 12. H. Dyckhoff, G. Scheithauer, and J. Terno, In Annotated Bibliographies in Combinatorial Optimization, edited by M. DellAmico, F. Mafoli and S. Martello, John Wiley and Sons, 1997. 13. E.E. Bischoff and M.S.W. Ratcliff, Issues in the development of approaches to container loading, OMEGA, 1995. 14. E.E. Bischoff, F. Janetz, and M.S.W. Ratcliff, Loading pallets with non-identical items, European Journal of Operational Re- search, 1995. 15. A. Bortfeldt, Agenetic algorithmfor the container loadingprob- lem, in Proceedings of the Conference on Adaptive Computing and Information Processing, London, 1994. 16. J.A. George, A method for solving container packing for a sin- gle size of box, J. Opl Res., 1992. 17. E. Bischoff and W.B. Dowsland, An application of the micro- computer to product design and distribution, Operational Re- search Society Journal, 1982. 18. C.P. Han, K. Knott, and J.P. Egbelu, Aheuristic approach to the three-dimensional cargo-loading problem, Int. J. Prod. Res., vol. 27, no. 5, pp. 757774, 1989. 19. J. Xue and K.K. Lai, Effective methods for a container packing operation, Mathl. Comput. Modelling, 1997. 20. M.A. Nadim, A computer-aided box stacking model for truck transport and pallets, Computers in Industry, 1991. 21. B.K.A. Ngoi, M.L. Tay, and E.S. Chua, Applying spatial rep- resentation techniques to the container packing problem, Int. J. Prod. Res., 1994. 22. C.K. Chua, V. Narayanan, and J. Loh, Constraint-based spatial representation technique for the container packing problem, Integrated Manufacturing Systems, 1998. 23. K.K. Lai, J. Xue, and B. Xu, Container packing in a multi- customer delivering operation, Computers ind. Eng., 1998. 24. N. Christodes and C. Whitlock, An algorithm for two- dimensional cutting problems, Operations Research, 1977. 25. N. Ivancic, K. Mathur, and B.B. Mohanty, An integer program- ming based heuristic approach to the three dimensional packing problem, Journal of Manufacturing and Operations Manage- ment, 1989. 26. B.D. William, Three-dimensional packing-solutions ap- proaches and heuristic development, Int. J. Prod. Res., 1991. 27. E.E. Bischoff and M.S.W. Ratcliff, Issues in the development of approaches to container loading, Omega. Int. J. Mgmt Sci., vol. 23, no. 4, pp. 337390, 1995. 28. E.E. Bischoff and M.D. Marriott, A comparative evaluation of heuristics for container loading, European Journal of Opera- tional Research, 1990. 29. OR-Library, http://mscmga.ms.ic.ac.uk/info.html. 30. T.H. Loh and A.Y.C. Nee, A packing algorithm for hexahedral boxes, in Proceedings of the Conference of Industrial Automa- tion, Singapore, 1992, pp. 115126. 31. B.K.A. Ngoi and K. Whybrew, A fast spatial representation method, Journal of International Advance ManufacturingTech- nology, 1993.