Noname manuscript No. (will be inserted by the editor)

Container loading for nonorthogonal objects: an approximation using local search and simulated annealing Vicen¸ c Torra, Isaac Cano, Sadaaki Miyamoto, Yasunori Endo

the date of receipt and acceptance should be inserted later

Abstract Container loading problems consists of ﬁnding an appropriate way to load objects into a container. A few alternative algorithms have been deﬁned based on diﬀerent optimization approaches. Diﬀerent algorithms also depend on the types of objects considered. In most of the cases, however, the shape of the objects is restricted to be orthogonal (i.e., standard boxes). In this paper we consider the case where the shape of the objects can be any polyhedron. We propose an algorithm using local search and simulated annealing, and we show that for standard boxes it has a similar performance than previously established methods. Keywords Container loading · nonorthogonal objects · metaheuristics · local search · simulated anealing

1 Introduction Companies devoted to international trade are interested in optimizing the use of the resources involved in the trade so that their beneﬁt is maximized (see e.g., [6,16, 18]). Container loading is one of the areas in logistics in which the optimization of the resources play an important role. However, container loading is a diﬃcult problem due to its computational complexity. V. Torra · I. Cano IIIA, Artiﬁcial Intelligence Research Institute CSIC, Spanish National Research Council Campus UAB, 08193 Bellaterra (Catalonia, Spain). E-mail: [email protected], [email protected] S. Miyamoto · Y. Endo Department of Risk Engineering School of Systems and Information Engineering University of Tsukuba, Ibaraki 305-8573, Japan E-mail: [email protected], [email protected]

Formally, the formalization of a container loading problem requires the deﬁnition of the properties of the container (or sets of containers), the properties of the objects to be loaded and the constraints that have to be taken into account so that the ﬁnal solution is acceptable. The literature oﬀers several approaches for container loading problems. Existing solutions deal with particular types of objects and some of the possible constraints. Among the characteristics to deﬁne the objects we have shape, dimension, and weight. Among the constraints, we can underline the direction allowed for the objects. That is, whether all surfaces of an object can be used as its bottom position. Also, we have constraints on the maximum weight allowed at the top of the objects. The fragility of the objects can be also considered as a constraint. Given a formalization of the objects and the constraints for a solution, the problem of container loading can be formulated in a mathematical precise way. It corresponds to a constrained optimization problem. In this problem, the function to be maximized is the space allocated, and the constraints are to force the objects not to collide (i.e., some positions are forbidden) and be loaded in an appropriate way (e.g., no heavy objects are put on the top of a fragile one). The computation of an optimal solution for such task is an NP-hard problem. Due to this, heuristic methods [20] have been developed. Diﬀerent approaches are based on diﬀerent assumptions on the objects to be allocated and the constraints considered. Papers [9] and [10] by Dyckhoﬀ present a characterization of the container loading problems. These papers include a categorization of the diﬀerent problems according to the constraints and object types. Most methods pressume that the objects are repre-

2

sented in terms of boxes (they are rectangular). Therefore, only three dimensions are enough to deﬁne the objects. There exist methods that consider other shapes, but in this case, it is usual that the methods have been specially designed to such types of objects. For example, both [2] and [15] consider cylindrical objects (as paper rolls), but then only cylindrical objects are allowed in the containers ([15] permits the user to have diﬀerent cylinders with diﬀerent radius). First approaches only required loaded objects not to overlap. See e.g. the systems described in [7], [12], and most of the papers published before 1995. More recently, new constraints have been included in the systems. New research lines are rooted on [4], a paper that states that the existing systems (1995) are not enough because they consider problems that are too simple. The work includes a description of the constrains that have to be considered in these types of problems. In relation to the additional constraints, [6] considers restrictions on the orientation and stability of the objects. [3] considers the fragility of the objects to avoid overloading. More speciﬁcally, in this latter paper, the object representation (the three dimensions of each box and the weight) is expanded to include the maximum load that can hold (in kg/cm2). This is used latter in the constraints. The problem of having a correct distribution of the weight in the container is considered in [8] (not to overload some regions of the container). A few diﬀerent approaches have been used to solve these problems. Some are based on heuristic methods [11, 19,3], genetic algorithms [13,6], linear programming, and search methods as e.g. tabu search [7,14]. In addition, there are methods that combine diﬀerent techniques. In this paper we focus on the problem of container loading for nonorthogonal objects. In particular, we consider the case of loading polyhedrons. We describe an approach to deal with this type of objects and present the results of the application of our method. The comparison of the diﬀerent existing algorithms is diﬃcult as it is often the case that the assumptioms are diﬀerent. Nevertheless, some benchmarks have been developed. See e.g. [4] that describes a set of 700 problems. These problems correspond to rectangular objects. Although our approach is focused to other types of objects, we will use these problems for the sake of comparability. The structure of this paper is as follows. In Section 2, we describe the objects we consider, how we represent them and how we solve the problem of detecting collisions for such type of problems. In Section 3, we describe an approach to load the objects in the container, and in Section 4, we describe the experiments

we have performed and the results obtained. The paper ﬁnishes with some conclusions and future work.

2 Nonorthogonal objects: their representation and collision detection As we have brieﬂy stated in the introduction, the novelty of our approach is that we not only permit the user to load orthogonal objects to the container, but also nonorthogonal ones. In general, we have developed an approach that permits the user to represent any object that is a polyhedron. That is, any object that can be represented in terms of polygons. The internal representation of the polyhedrons uses a redundant structure to simplify the computations required to detect the collisions. Formally, we represent each object in terms of its vertexes, edges and surfaces (polygons that are represented in terms of the edges). Some additional information about each object is also included in its internal representation either for easing the computations (as the normal vector for each polygon), or for future use (as the maximum load a surface can hold). An important aspect in our system is collision detection. As objects can have diﬀerent shapes, it is not as easy as for boxes to decide whether two objects collide given their position in the container. In addition, the standard requirements of most algorithms [23] for collision detection (as e.g. in computer animation) are neither appropriate for our purpose. In our system, contact collision (or tangent collision) should be allowed and only proper collisions should be forbidden. This is not the case in e.g. computer animation where contact collision is already detected as a collision. Note that in our case, contact collision is acceptable, and, in fact, often preferable as it implies a better optimization of the space of the container. Due to these aspects, we have developed our own algorithm for detecting collisions that corresponds to an adaptation of a method for image processing in virtual reality [22,21]. Formally, given two polyhedrons A and B, [22,21] try to ﬁnd whether there is intersection between the two polyhedrons. This is achieved considering the set of surfaces or polygons that deﬁne the polyhedrons (say, PA and PB ). Then, the method checks whether each edge in A intersects with each polygon in PB . Nevertheless, this is not enough for detecting the collision between A and B and also the reversal case (whether an edge in B intersects with a polyhedron in PA ) is checked. The computational cost of our approach for collision detection is proportional to the number of edges in polyhedron A multiplied by the number of edges in polyhedron

3

B. As A and B can have the same role, the computational cost is, in fact, the maximum of the two cases. In addition, the computational cost is also proportional to the number of boxes already loaded in the container. In general, the more accurate the algorithm for collision detection, the larger it costs. The simplest method is to use a spherical bounding box, the cost is constant but the error is very high for non spherical boxes. Our modiﬁcation consists of detecting only when an edge crosses a polygon but not when the polygon is only touched (that is, the case of tangent collision). This modiﬁcation causes some additional diﬃculties when an edge intersects another edge. Note that it would be possible that two polyhedrons only intersect through some edges. To avoid problems in this case, the algorithm includes some safeguards so that in the case that one edge crosses another edge penetrating the interior of the polyhedron, collision is also detected. Formally, the algorithm and our modiﬁcation is mainly deﬁned in terms of conditional rules.

3 Our approach for solving the problem In this section we describe our approach. We start restricting ourselves to the case of orthogonal objects. We will consider later, also in this section, the more general case. Our approach to load the objects in the container is based on ﬁnding an appropriate sequence of the objects. That is, the goal is to determine which object is loaded ﬁrst, second, and so on. Formally, given a set of N objects O = {o1 , . . . , oN }, we express a possible sequence as (o1 , . . . , oN ). Then, we will consider the set of all possible sequences built from O and denote them by S(O). Then, given a sequence s = (oπ(1) , . . . , oπ(N ) ) (where π denotes a permutation of 1, . . . , N ), we will consider the search through the neighborhood of s where the neighborhood of s corresponds to all those sequences where two elements of s have been swapped. E.g., given the sequence

is an improvement in the performance. The second solution follows the schema of simulated annealing. We describe below in some detail an algorithm for this purpose. In simulated annealing, the function to optimize is represented in terms of an energy. In addition, a temperature decreasing with respect to time is also used in the process. In our context, the energy corresponds to the unused space in the container. Therefore, the goal is to ﬁnd a solution where = 0 or with an as low as possible. Formally, we use = us · 100 where us is the unused space in cm3 . The constant value 100 allows us to use the same T values and T boundaries typically suggested in the literature on Simulated Annealing [1], because ΔE is, in most cases, of the order of 10−3 . In the algorithm, T represents the temperature and we use a simple cooling plan, T = T · α, with α = 0.85. Careful cooling with α = 0.8 . . . 0.99 will lead to an asymptotic drift towards the minimum temperature. The algorithm iterates 40 times for a given T . This value was selected heuristically. The same benchmark was run increasing the number of iterations from 10 up to 100 and the result was that after the 40th iteration the volume occupied was not increased. In general, due to the cooling parameter T , one run of the algorithm examines 600 = 40 × 15 solutions. The algorithm is described in detail below. Note that the implementation of local search can also be deﬁned in terms of the algorithm for simulated annealing when the new sequence is only accepted when ΔE < 0, and the temperature T is not used.

(o1 , . . . , oi−1 , oj , oi+1 , . . . , oj−1 , oi , oj+1 , . . . , oN ) for all i and j}

1. Select initial sequence s (random) 2. Order the objects (optional) 3. Apply the container loading algorithm and compute its evaluation result () 4. T=1; 5. while (T > 0.1) // the stopping criteria is not satisﬁed 6. repeat 40 times 6.1. Determine a sequence s in the neighborhood of s (s ∈ N (s)) 6.2. Apply the container loading algorithm and compute its evaluation result ( ) 6.3. ΔE = − 6.4. If ΔE < 0 or random < e−ΔE/T then accept the new sequence (s=s’) otherwise do not accept it. 7. end repeat 8. T = T · 0.85 9. end while

Two approaches have been considered for this search. The ﬁrst one is local search. That is, given a sequence, we move to another one in the neighborhood if there

Three diﬀerent variations have been considered for this algorithm. The ﬁrst one is not to order the objects. That is, step 2 is not applied. The second variation

s = (o1 , . . . , oi−1 , oi , oi+1 , . . . , oj−1 , oj , oj+1 , . . . , oN ), the neighbourhood of s is deﬁned by: N (s) = {s |s =

4

is to order according to the length resulting from the addition of the three dimensions of a box (i.e., given an orthogonal box with dimensions (w, d, h), the length w+d+h is used). This length is in common use in Japan in delivery services. The third variation is to consider for the ordering the volume of the boxes (i.e., given a box with dimensions (w, d, h), w · d · h is used).

3.1 Vertex Management Fig. 1 Dodecahedron with objects reusing the empty space

Given a particular sequence s, we load the container using an approach that we call the vertex management approach. This approach, based on e.g. [17], uses a list of vertexes where objects can be loaded. Initially, there is a single vertex in the list: the origin (0, 0, 0). In general, when a new object is loaded on a particular vertex, the corresponding vertex is removed from the list (as it is now occupied), and a few additional vertexes are added to the list. 1. Deﬁne the initial set of vertexes SV as the one containing the single vertex (i.e., SV = {(0, 0, 0)}). 2. i=1; // we deal with object oi 3. For all vertex v = (x, y, z) in SV 3.1. For all permissible rotations ρ of object oi 3.1.1. If object oi in s can be put in vertex v with rotation ρ without a collision, 3.1.1.1. Add vertexes (x+wi , y, z), (x, y+di , z), (x, y, z+ hi ) to the vertex management list and remove v. 3.1.1.2. i := i + 1; jump to step 3. 3.1.2. Else ﬁnish and return unused space in the container ().

Fig. 2 Optimization of the space with hexagonal prisms

3.2 The case of nonorthogonal objects In the description given above we have only considered orthogonal objects. In order to permit the user to use nonorthogonal objects, a few variations have been included in the algorithms. The major modiﬁcation consists of checking for each object whether its current selected position collides with previously loaded objects. As we have already discussed in Section 2, this problem was solved with the algorithm that checks the intersection of edges and polygons. Another modiﬁcation is about the vertex management procedure. In a ﬁrst approach we proceeded in the same way and included three vertexes for each object. These vertexes were the counterparts of the three vertexes used for orthogonal objects. Later, we added a few additional vertexes so that the remaining space could be better employed. Figures 3 and 4 show the two objects considered (dodecahedron and hexagonal prism) as well

Fig. 3 Dodecahedron with the corresponding vertexes for the vertex management approach.

as the vertexes to be added in the vertex list. These vertexes permit the system to locate objects under the dodecahedron (see e.g., Figure 1) as well as put a set of hexagonal prisms together to form a honeycomb-like structure (see Figure 2).

4 Experiments We have considered a few diﬀerent scenarios. We describe them below, together with the results obtained.

5 20 13 6 7 7 7 7 6 7 6 6 7 6 7 7 Fig. 4 Hexagonal prism with the corresponding vertexes for the vertex management approach.

Case 1 Case 2 Case 3

N. of shapes 13 33 30

N. of objects 47 93 42

Min (wj , dj , hj ) (6,3,5) (2,2,2) (4,2,3)

Max (wj , dj , hj ) (7,5,10) (8,20,8) (10,8,8)

Table 1 Description of a data set.

4.1 Size 20 We have considered two sets of problems similar to the ones described in [17]. All consist of a container of size (20, 20, 20) and then three diﬀerent problems corresponding to three sets of boxes. The ﬁrst one consisting of 47 boxes of 13 diﬀerent shapes, the second one consisting of 93 boxes of 33 diﬀerent shapes, and the third one consisting of 42 boxes of 30 diﬀerent shapes. The two sets of problems diﬀer on whether all boxes can be put in all orientations or only on a few of them. Table 1 describes the three problems. Figure 5 represents one of the problems corresponding to Case 1 (13 diﬀerent shapes of boxes). In the ﬁgure, the ﬁrst row corresponds to the dimensions (x = y = z = 20) of the container in cm, the second row to the number of diﬀerent boxes (13) and the container’s total volume in m3 , (0.00799), the remaining rows include three pairs of the form (dimension, vertical position?), the seventh column means the number of boxes and the remaining columns contains additional information about the boxes (weight and maximum load on the corresponding surface). Here, dimension is expressed in cm and corresponds to x for the ﬁrst pair, to y for the second one and the third pair corresponds to z. The value vertical position? is a boolean value indicating whether the corresponding dimension can be put in a vertical position. The structure of this ﬁle is based on the one in [4] (see below). We do not use in the current version of the sys-

20 1 0 1 1 0 0 0 0 0 1 1 1 0

4 4 4 4 3 5 3 4 4 5 4 3 4

20 0.00799 0 5 1 0 6 1 0 8 1 1 7 0 1 9 0 1 5 0 0 7 1 1 8 0 1 6 0 1 10 0 1 8 0 1 5 0 1 7 0

6 4 3 3 3 3 4 4 4 2 3 5 3

246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24

0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670

0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648

0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365

Fig. 5 Example of a ﬁle representing one problem for Case 1, for a container of dimensions (20, 20, 20) and 13 boxes.

Case

Management

Case 1

random sorting random sorting random sorting

Case 2 Case 3

Before LS/SA 46.9825 51.0787 26.2 44.6725 42.2725 58.9187

After LS 80.5237 83.4787 74.485 78.4312 80.55 82.6487

After SA 81.042 83.702 72.7062 73.72 78.0987 81.697

Table 2 Average results of 10 executions for the problem described in Table 1 when not all dimensions can be put in vertical positions.

Case

Management

Case 1

random sorting random sorting random sorting

Case 2 Case 3

Before LS/SA 61.36375 73.4525 48.787 56.76 46.7837 72.4425

After LS 86.10625 90.39125 76.35625 80.6375 83.36625 86.68875

After SA 87.68125 87.4675 76.73125 80.41875 82.37625 85.9526

Table 3 Average results of 10 executions for the problem described in Table 1 when all dimensions can be put in vertical positions.

tem such additional information. Test ﬁles can be found in [24]. The application of our method to these problems leads to results similars to the ones in [17]. The results and the percentage of occupation are given in Tables 2 and 3. In the ﬁrst table, boxes are restricted only to allow some of the dimensions in the vertical direction. In the second table, all dimensions are permitted to be in the vertical direction. Tables display the average results either with an initial random order of the boxes, or either ordered by vol-

6

ume. Then, average results are also given when just the initial ordering is considered (column Before LS/SA), or when local search (column After LS) and simulated annealing (column After SA) are applied. The results show that the initial ordering has a large inﬂuence in the results, although this inﬂuence is smaller once local search or simulated annealing is applied.

4.2 Bischoﬀ and Ratcliﬀ ﬁles We have also considered the problems described in [4] and accessible through the web site in [5]. They consist of 7 sets of 100 problems. In each set, all problems have the same number of diﬀerent boxes, although the sizes of the boxes are not the same. Table 4 shows the results of the three methods presented in [4]. The tables include the number of diﬀerent boxes in each set of problems and also the average occupancy. Table 5 presents the results we have obtained for the same set of problems. The results correspond to the case of ordering the boxes according to volume, and considering only local search. Simulated annealing implies some improvement but the computational cost is much higher (an average execution time of 2822 seconds was obtained for simulation annealing). The results we have obtained are slightly worse than the ones obtained by Bischoﬀ and Ratcliﬀ. A diﬀerence of about 5% or less is obtained. Nevertheless, diﬀerence is at the cost of permitting additional shapes for the boxes (Section 4.3 includes the results for nonorthogonal boxes). In any case, for some of the particular problems we achieve a good score (e.g. 91% or 92% as shown in Table 5).

4.3 Variation of Bischoﬀ and Ratcliﬀ ﬁles This is a variation of the previous ﬁles where other kinds of boxes are also permitted. We have considered, as in the Bischoﬀ and Ratcliﬀ ﬁles, sets of 3, 5, 8, 10, 12, 15, and 20 diﬀerent box types. Then, for each of these alternatives, we have considered diﬀerent situations with respect to the proportion of the diﬀerent shapes. Table 6 gives the 6 diﬀerent sets of boxes considered. Properly speaking, we have considered all possible non empty subset of boxes from {boxes, dodecahedrons, prisms} except the case of only boxes because this has already been studied above. That is, we have considered the case of 50% regular orthogonal boxes and 50% hexagonal prisms, the case of 50% regular orthogonal boxes and 50% dodecahedron, etc. The data ﬁles are publicly available trough the web page given in [24].

Case No. Average (wtpack) Boxes Occup. SD First method (Section 4.1. of [4]) Case 1 3 81.76 5.98 Case 2 5 81.70 6.54 Case 3 8 82.98 5.44 Case 4 10 82.60 4.11 Case 5 12 82.76 4.03 Case 6 15 81.50 3.88 Case 7 20 80.51 3.75 Second method (Section 4.2. of [4]) Case 1 3 83.79 4.67 Case 2 5 84.44 3.97 Case 3 8 83.94 3.12 Case 4 10 83.71 3.07 Case 5 12 83.80 2.88 Case 6 15 82.44 3.05 Case 7 20 82.01 2.58 Combined method [4] Case 1 3 85.40 4.30 Case 2 5 86.25 3.49 Case 3 8 85.86 3.27 Case 4 10 85.08 2.47 Case 5 12 85.21 2.49 Case 6 15 83.84 2.62 Case 7 20 82.95 2.43

Highest

Prob. No.

94.36 93.76 92.63 88.89 90.39 89.15 88.28

39 33 49 60 41 58 51

93.58 91.85 89.65 90.06 89.87 88.39 86.88

13 39 37 22 2 72 14

94.36 93.76 92.63 90.06 90.39 89.15 88.28

39 33 49 22 41 58 51

Table 4 Average results of 10 executions using our approach for the problems described by Bischoﬀ and Ratcliﬀ in [4].

Management sorting sorting sorting sorting sorting sorting sorting

Case (wtpack) Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7

Average Occup. 80.23 77.96 79.11 78.15 77.81 77.06 76.51

SD

Highest

5.99 4.85 4.27 3.80 3.18 3.49 2.84

92.61 91.64 85.84 85.66 84.03 83.76 82.63

Table 5 Average results of 10 executions using our approach for the problems described by Bischoﬀ and Ratcliﬀ in [4].

The average occupancy of our solutions is described in Table 7. The following ﬁgures for average occupancy can be distinguished: 70.19 (for 3 box types), 71.01 (for 5 box types), 69.81 (for 8 box types), 71.48 (for 10 box types), 70.48 (for 12 box types), 68.81 (for 15 box types), and 71.80 (for 20 box types). The results obtained are naturally worse than the ones achieved when only orthogonal boxes were considered, and the worst case is when only dodecahedrons are

7

Subset

Boxes

Dodecahedron

Subset 1 50% Subset 2 50% 50% Subset 3 Subset 4 50% Subset 5 100% Subset 6 33% 33% Subset Average SD Subset 1 67.87 3.41 Subset 2 73.00 6.56 Subset 3 61.23 5.33 Subset 4 78.37 7.61 Subset 5 75.49 6.73 Subset 6 67.12 6.20

Hexagonal prism 50% 100% 50% 33% Highest 72.37 83.45 73.24 94.28 91.7 79.41

Table 6 Description of our variation of Bischoﬀ and Ratcliﬀ ﬁles, average occupancy, deviation, and highest result (bottom) according to box types (top).

Management sorting sorting sorting sorting sorting sorting sorting

Case (wtpack) Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7

Average Occup. 70.19 71.01 69.81 71.49 70.48 68.81 71.81

SD

Highest

8.89 9.64 6.41 7.56 8.92 9.09 8.82

91.70 94.29 77.82 81.66 88.62 82.40 83.45

Table 7 Average results of our approach applied to a variation of the ﬁles by Bischoﬀ and Ratcliﬀ.

considered. However, this is natural because its shape leaves empty spaces that cannot be ﬁlled. In any case, we consider that the results obtained are acceptable, as we got an average occupancy larger than 60%, and achieving a good average occupancy for some of the problems (e.g. 78% for subset 4 with 50% dodecahedrons and 50% hexagonal prisms).

5 Conclusions and future work In this paper we have considered the container loading problem for nonorthogonal objects. Our approach has been applied to three types of objects: typical boxes (orthogonal boxes), dodecahedrons and hexagonal prisms. We have presented the results of our approach that are in the range of other solutions that only deal with standard boxes. In addition, our proposal permits its application to the new types of objects considered.

As future work we consider the extension of the approach to take into account the maximum load on a box and a correct distribution of the weight. 6 Acknowledgments This work is partially supported by the Spanish Ministerio de Fomento (project PON, T27/2006) and MEC (projects CONSOLIDER INGENIO 2010 CSD2007-00004, and TSI2007-65406-C03-02) and by the Generalitat de Catalunya (AGAUR, 2006BE-2 00338). References 1. Berthold, M., Hand, D. J., 2003. Intelligent Data Analysis. Springer Berlin Heidelberg, ISBN 978-3-540-43060-5, 351-401. 2. Birgin, E. G., Martnez, J. M., Ronconi, D. P., 2005. Optimizing the packing of cylinders into a rectangular container: A nonlinear approach. European Journal of Operational Research 160, 19-33. 3. Bischoﬀ, E. E., 2006. Three-dimensional packing of items with limited load bearing strength. European Journal of Operational Research 168, 952-966. 4. Bischoﬀ, E. E., Ratcliﬀ, M. S. W., 1995. Issues in the Development of Approaches to Container Loading. Omega Int. J. of Management Sciences 23(4), 377-390. 5. http://people.brunel.ac.uk/˜mastjjb/jeb/orlib/ﬁles/wtpack1.txt (to wtpack7.txt) 6. Bortfeldt, A., Gehring, H., 2001. A hybrid genetic algorithm for the container loading problem. European Journal of Operational Research 131, 143-161. 7. Bortfeldt, A., Gehring, H., Mack, D., 2003. A parallel tabu search algorithm for solving the container loading problem. Parallel Computing 29, 641-662. 8. Davies, A. P., Bischoﬀ, E. E., 1999. Weight distribution considerations in container loading. European Journal of Operational Research 114, 509-527. 9. Dyckhoﬀ, H., 1990. A typology of cutting and packing problems. European Journal of Operational Research 44, 145-159. 10. Dyckhoﬀ, H., Finke, U., 1992. Cutting and Packing in Production and Distribution, Physica, Heidelberg. 11. Eley, M., 2002. Solving container loading problems by block arrangement. European Journal of Operational Research 141, 393-409. 12. Eley, M., 2003. A bottleneck assignment approach to the multiple container loading problem. OR Spectrum 25, 45-60. 13. Gehring, H., Bortfeldt, A., 1997. A Genetic Algorithm for Solving the Container Loading Problem. Int. Trans. Operational Research 4:5/6, 401-418. 14. Gendreau, M., Iori, M., Laporte, G., Martello, S. 2006. A Tabu Search Algorithm for a Routing and Container Loading Problem. Transportation Science 40:3, 342-350. 15. George, J. A., George, J. M., Lamar, B. W., 1995. Packing diﬀerent-sized circles into a rectangular container. European Journal of Operational Research 84, 693-712. 16. Iori, M., Salazar-Gonzalez, J.-J., Vigo, D., 2007. An Exact Approach for the Vehicle Routing Problem with TwoDimensional Loading Constraints. Transportation Science 41:2 253-264. 17. Miyamoto, S., Endo, Y., Hanzawa, K., Hamasuna, Y., 2006. Metaheuristic Algorithms for Container Loading Problems: Framework and Knowledge Utilization. J. of Advanced Intelligence and Intelligent Informatics 11:5, 51-60.

8 18. Narasimhan, A., Palekar, U. S. 2002. Analysis and Algorithms for the Transtainer Routing Problem in Container Port Operations. Transportation Science 36:1 63-78. 19. Pisinger, D., 2002. Heuristics for the container loading problem. European Journal of Operational Research 141, 382-392. 20. Takahara, S., Kusumoto, Y., Miyamoto, S., (2003), Solution for textile nesting problems using adaptive meta-heuristics and grouping, Soft Computing 7 154-159. 21. Zachmann, G., 2000. Virtual Reality in Assembly Simulation Collision Detection, Simulation Algorithms, and Interaction Techniques. PhD Dissertation, Technischen Universitt Darmstadt. 22. Zachmann, G., 1994. Exact and Fast Collision Detection. Diploma Thesis, Technischen Universitt Darmstadt. 23. http://www.cs.unc.edu/˜geom/collide/ 24. http://www.iiia.csic.es/˜vtorra/projecte.pon/

Container loading for nonorthogonal objects: an approximation using local search and simulated annealing Vicen¸ c Torra, Isaac Cano, Sadaaki Miyamoto, Yasunori Endo

the date of receipt and acceptance should be inserted later

Abstract Container loading problems consists of ﬁnding an appropriate way to load objects into a container. A few alternative algorithms have been deﬁned based on diﬀerent optimization approaches. Diﬀerent algorithms also depend on the types of objects considered. In most of the cases, however, the shape of the objects is restricted to be orthogonal (i.e., standard boxes). In this paper we consider the case where the shape of the objects can be any polyhedron. We propose an algorithm using local search and simulated annealing, and we show that for standard boxes it has a similar performance than previously established methods. Keywords Container loading · nonorthogonal objects · metaheuristics · local search · simulated anealing

1 Introduction Companies devoted to international trade are interested in optimizing the use of the resources involved in the trade so that their beneﬁt is maximized (see e.g., [6,16, 18]). Container loading is one of the areas in logistics in which the optimization of the resources play an important role. However, container loading is a diﬃcult problem due to its computational complexity. V. Torra · I. Cano IIIA, Artiﬁcial Intelligence Research Institute CSIC, Spanish National Research Council Campus UAB, 08193 Bellaterra (Catalonia, Spain). E-mail: [email protected], [email protected] S. Miyamoto · Y. Endo Department of Risk Engineering School of Systems and Information Engineering University of Tsukuba, Ibaraki 305-8573, Japan E-mail: [email protected], [email protected]

Formally, the formalization of a container loading problem requires the deﬁnition of the properties of the container (or sets of containers), the properties of the objects to be loaded and the constraints that have to be taken into account so that the ﬁnal solution is acceptable. The literature oﬀers several approaches for container loading problems. Existing solutions deal with particular types of objects and some of the possible constraints. Among the characteristics to deﬁne the objects we have shape, dimension, and weight. Among the constraints, we can underline the direction allowed for the objects. That is, whether all surfaces of an object can be used as its bottom position. Also, we have constraints on the maximum weight allowed at the top of the objects. The fragility of the objects can be also considered as a constraint. Given a formalization of the objects and the constraints for a solution, the problem of container loading can be formulated in a mathematical precise way. It corresponds to a constrained optimization problem. In this problem, the function to be maximized is the space allocated, and the constraints are to force the objects not to collide (i.e., some positions are forbidden) and be loaded in an appropriate way (e.g., no heavy objects are put on the top of a fragile one). The computation of an optimal solution for such task is an NP-hard problem. Due to this, heuristic methods [20] have been developed. Diﬀerent approaches are based on diﬀerent assumptions on the objects to be allocated and the constraints considered. Papers [9] and [10] by Dyckhoﬀ present a characterization of the container loading problems. These papers include a categorization of the diﬀerent problems according to the constraints and object types. Most methods pressume that the objects are repre-

2

sented in terms of boxes (they are rectangular). Therefore, only three dimensions are enough to deﬁne the objects. There exist methods that consider other shapes, but in this case, it is usual that the methods have been specially designed to such types of objects. For example, both [2] and [15] consider cylindrical objects (as paper rolls), but then only cylindrical objects are allowed in the containers ([15] permits the user to have diﬀerent cylinders with diﬀerent radius). First approaches only required loaded objects not to overlap. See e.g. the systems described in [7], [12], and most of the papers published before 1995. More recently, new constraints have been included in the systems. New research lines are rooted on [4], a paper that states that the existing systems (1995) are not enough because they consider problems that are too simple. The work includes a description of the constrains that have to be considered in these types of problems. In relation to the additional constraints, [6] considers restrictions on the orientation and stability of the objects. [3] considers the fragility of the objects to avoid overloading. More speciﬁcally, in this latter paper, the object representation (the three dimensions of each box and the weight) is expanded to include the maximum load that can hold (in kg/cm2). This is used latter in the constraints. The problem of having a correct distribution of the weight in the container is considered in [8] (not to overload some regions of the container). A few diﬀerent approaches have been used to solve these problems. Some are based on heuristic methods [11, 19,3], genetic algorithms [13,6], linear programming, and search methods as e.g. tabu search [7,14]. In addition, there are methods that combine diﬀerent techniques. In this paper we focus on the problem of container loading for nonorthogonal objects. In particular, we consider the case of loading polyhedrons. We describe an approach to deal with this type of objects and present the results of the application of our method. The comparison of the diﬀerent existing algorithms is diﬃcult as it is often the case that the assumptioms are diﬀerent. Nevertheless, some benchmarks have been developed. See e.g. [4] that describes a set of 700 problems. These problems correspond to rectangular objects. Although our approach is focused to other types of objects, we will use these problems for the sake of comparability. The structure of this paper is as follows. In Section 2, we describe the objects we consider, how we represent them and how we solve the problem of detecting collisions for such type of problems. In Section 3, we describe an approach to load the objects in the container, and in Section 4, we describe the experiments

we have performed and the results obtained. The paper ﬁnishes with some conclusions and future work.

2 Nonorthogonal objects: their representation and collision detection As we have brieﬂy stated in the introduction, the novelty of our approach is that we not only permit the user to load orthogonal objects to the container, but also nonorthogonal ones. In general, we have developed an approach that permits the user to represent any object that is a polyhedron. That is, any object that can be represented in terms of polygons. The internal representation of the polyhedrons uses a redundant structure to simplify the computations required to detect the collisions. Formally, we represent each object in terms of its vertexes, edges and surfaces (polygons that are represented in terms of the edges). Some additional information about each object is also included in its internal representation either for easing the computations (as the normal vector for each polygon), or for future use (as the maximum load a surface can hold). An important aspect in our system is collision detection. As objects can have diﬀerent shapes, it is not as easy as for boxes to decide whether two objects collide given their position in the container. In addition, the standard requirements of most algorithms [23] for collision detection (as e.g. in computer animation) are neither appropriate for our purpose. In our system, contact collision (or tangent collision) should be allowed and only proper collisions should be forbidden. This is not the case in e.g. computer animation where contact collision is already detected as a collision. Note that in our case, contact collision is acceptable, and, in fact, often preferable as it implies a better optimization of the space of the container. Due to these aspects, we have developed our own algorithm for detecting collisions that corresponds to an adaptation of a method for image processing in virtual reality [22,21]. Formally, given two polyhedrons A and B, [22,21] try to ﬁnd whether there is intersection between the two polyhedrons. This is achieved considering the set of surfaces or polygons that deﬁne the polyhedrons (say, PA and PB ). Then, the method checks whether each edge in A intersects with each polygon in PB . Nevertheless, this is not enough for detecting the collision between A and B and also the reversal case (whether an edge in B intersects with a polyhedron in PA ) is checked. The computational cost of our approach for collision detection is proportional to the number of edges in polyhedron A multiplied by the number of edges in polyhedron

3

B. As A and B can have the same role, the computational cost is, in fact, the maximum of the two cases. In addition, the computational cost is also proportional to the number of boxes already loaded in the container. In general, the more accurate the algorithm for collision detection, the larger it costs. The simplest method is to use a spherical bounding box, the cost is constant but the error is very high for non spherical boxes. Our modiﬁcation consists of detecting only when an edge crosses a polygon but not when the polygon is only touched (that is, the case of tangent collision). This modiﬁcation causes some additional diﬃculties when an edge intersects another edge. Note that it would be possible that two polyhedrons only intersect through some edges. To avoid problems in this case, the algorithm includes some safeguards so that in the case that one edge crosses another edge penetrating the interior of the polyhedron, collision is also detected. Formally, the algorithm and our modiﬁcation is mainly deﬁned in terms of conditional rules.

3 Our approach for solving the problem In this section we describe our approach. We start restricting ourselves to the case of orthogonal objects. We will consider later, also in this section, the more general case. Our approach to load the objects in the container is based on ﬁnding an appropriate sequence of the objects. That is, the goal is to determine which object is loaded ﬁrst, second, and so on. Formally, given a set of N objects O = {o1 , . . . , oN }, we express a possible sequence as (o1 , . . . , oN ). Then, we will consider the set of all possible sequences built from O and denote them by S(O). Then, given a sequence s = (oπ(1) , . . . , oπ(N ) ) (where π denotes a permutation of 1, . . . , N ), we will consider the search through the neighborhood of s where the neighborhood of s corresponds to all those sequences where two elements of s have been swapped. E.g., given the sequence

is an improvement in the performance. The second solution follows the schema of simulated annealing. We describe below in some detail an algorithm for this purpose. In simulated annealing, the function to optimize is represented in terms of an energy. In addition, a temperature decreasing with respect to time is also used in the process. In our context, the energy corresponds to the unused space in the container. Therefore, the goal is to ﬁnd a solution where = 0 or with an as low as possible. Formally, we use = us · 100 where us is the unused space in cm3 . The constant value 100 allows us to use the same T values and T boundaries typically suggested in the literature on Simulated Annealing [1], because ΔE is, in most cases, of the order of 10−3 . In the algorithm, T represents the temperature and we use a simple cooling plan, T = T · α, with α = 0.85. Careful cooling with α = 0.8 . . . 0.99 will lead to an asymptotic drift towards the minimum temperature. The algorithm iterates 40 times for a given T . This value was selected heuristically. The same benchmark was run increasing the number of iterations from 10 up to 100 and the result was that after the 40th iteration the volume occupied was not increased. In general, due to the cooling parameter T , one run of the algorithm examines 600 = 40 × 15 solutions. The algorithm is described in detail below. Note that the implementation of local search can also be deﬁned in terms of the algorithm for simulated annealing when the new sequence is only accepted when ΔE < 0, and the temperature T is not used.

(o1 , . . . , oi−1 , oj , oi+1 , . . . , oj−1 , oi , oj+1 , . . . , oN ) for all i and j}

1. Select initial sequence s (random) 2. Order the objects (optional) 3. Apply the container loading algorithm and compute its evaluation result () 4. T=1; 5. while (T > 0.1) // the stopping criteria is not satisﬁed 6. repeat 40 times 6.1. Determine a sequence s in the neighborhood of s (s ∈ N (s)) 6.2. Apply the container loading algorithm and compute its evaluation result ( ) 6.3. ΔE = − 6.4. If ΔE < 0 or random < e−ΔE/T then accept the new sequence (s=s’) otherwise do not accept it. 7. end repeat 8. T = T · 0.85 9. end while

Two approaches have been considered for this search. The ﬁrst one is local search. That is, given a sequence, we move to another one in the neighborhood if there

Three diﬀerent variations have been considered for this algorithm. The ﬁrst one is not to order the objects. That is, step 2 is not applied. The second variation

s = (o1 , . . . , oi−1 , oi , oi+1 , . . . , oj−1 , oj , oj+1 , . . . , oN ), the neighbourhood of s is deﬁned by: N (s) = {s |s =

4

is to order according to the length resulting from the addition of the three dimensions of a box (i.e., given an orthogonal box with dimensions (w, d, h), the length w+d+h is used). This length is in common use in Japan in delivery services. The third variation is to consider for the ordering the volume of the boxes (i.e., given a box with dimensions (w, d, h), w · d · h is used).

3.1 Vertex Management Fig. 1 Dodecahedron with objects reusing the empty space

Given a particular sequence s, we load the container using an approach that we call the vertex management approach. This approach, based on e.g. [17], uses a list of vertexes where objects can be loaded. Initially, there is a single vertex in the list: the origin (0, 0, 0). In general, when a new object is loaded on a particular vertex, the corresponding vertex is removed from the list (as it is now occupied), and a few additional vertexes are added to the list. 1. Deﬁne the initial set of vertexes SV as the one containing the single vertex (i.e., SV = {(0, 0, 0)}). 2. i=1; // we deal with object oi 3. For all vertex v = (x, y, z) in SV 3.1. For all permissible rotations ρ of object oi 3.1.1. If object oi in s can be put in vertex v with rotation ρ without a collision, 3.1.1.1. Add vertexes (x+wi , y, z), (x, y+di , z), (x, y, z+ hi ) to the vertex management list and remove v. 3.1.1.2. i := i + 1; jump to step 3. 3.1.2. Else ﬁnish and return unused space in the container ().

Fig. 2 Optimization of the space with hexagonal prisms

3.2 The case of nonorthogonal objects In the description given above we have only considered orthogonal objects. In order to permit the user to use nonorthogonal objects, a few variations have been included in the algorithms. The major modiﬁcation consists of checking for each object whether its current selected position collides with previously loaded objects. As we have already discussed in Section 2, this problem was solved with the algorithm that checks the intersection of edges and polygons. Another modiﬁcation is about the vertex management procedure. In a ﬁrst approach we proceeded in the same way and included three vertexes for each object. These vertexes were the counterparts of the three vertexes used for orthogonal objects. Later, we added a few additional vertexes so that the remaining space could be better employed. Figures 3 and 4 show the two objects considered (dodecahedron and hexagonal prism) as well

Fig. 3 Dodecahedron with the corresponding vertexes for the vertex management approach.

as the vertexes to be added in the vertex list. These vertexes permit the system to locate objects under the dodecahedron (see e.g., Figure 1) as well as put a set of hexagonal prisms together to form a honeycomb-like structure (see Figure 2).

4 Experiments We have considered a few diﬀerent scenarios. We describe them below, together with the results obtained.

5 20 13 6 7 7 7 7 6 7 6 6 7 6 7 7 Fig. 4 Hexagonal prism with the corresponding vertexes for the vertex management approach.

Case 1 Case 2 Case 3

N. of shapes 13 33 30

N. of objects 47 93 42

Min (wj , dj , hj ) (6,3,5) (2,2,2) (4,2,3)

Max (wj , dj , hj ) (7,5,10) (8,20,8) (10,8,8)

Table 1 Description of a data set.

4.1 Size 20 We have considered two sets of problems similar to the ones described in [17]. All consist of a container of size (20, 20, 20) and then three diﬀerent problems corresponding to three sets of boxes. The ﬁrst one consisting of 47 boxes of 13 diﬀerent shapes, the second one consisting of 93 boxes of 33 diﬀerent shapes, and the third one consisting of 42 boxes of 30 diﬀerent shapes. The two sets of problems diﬀer on whether all boxes can be put in all orientations or only on a few of them. Table 1 describes the three problems. Figure 5 represents one of the problems corresponding to Case 1 (13 diﬀerent shapes of boxes). In the ﬁgure, the ﬁrst row corresponds to the dimensions (x = y = z = 20) of the container in cm, the second row to the number of diﬀerent boxes (13) and the container’s total volume in m3 , (0.00799), the remaining rows include three pairs of the form (dimension, vertical position?), the seventh column means the number of boxes and the remaining columns contains additional information about the boxes (weight and maximum load on the corresponding surface). Here, dimension is expressed in cm and corresponds to x for the ﬁrst pair, to y for the second one and the third pair corresponds to z. The value vertical position? is a boolean value indicating whether the corresponding dimension can be put in a vertical position. The structure of this ﬁle is based on the one in [4] (see below). We do not use in the current version of the sys-

20 1 0 1 1 0 0 0 0 0 1 1 1 0

4 4 4 4 3 5 3 4 4 5 4 3 4

20 0.00799 0 5 1 0 6 1 0 8 1 1 7 0 1 9 0 1 5 0 0 7 1 1 8 0 1 6 0 1 10 0 1 8 0 1 5 0 1 7 0

6 4 3 3 3 3 4 4 4 2 3 5 3

246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24 246.24

0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670 0.07670

0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648 0.15648

0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365 0.03365

Fig. 5 Example of a ﬁle representing one problem for Case 1, for a container of dimensions (20, 20, 20) and 13 boxes.

Case

Management

Case 1

random sorting random sorting random sorting

Case 2 Case 3

Before LS/SA 46.9825 51.0787 26.2 44.6725 42.2725 58.9187

After LS 80.5237 83.4787 74.485 78.4312 80.55 82.6487

After SA 81.042 83.702 72.7062 73.72 78.0987 81.697

Table 2 Average results of 10 executions for the problem described in Table 1 when not all dimensions can be put in vertical positions.

Case

Management

Case 1

random sorting random sorting random sorting

Case 2 Case 3

Before LS/SA 61.36375 73.4525 48.787 56.76 46.7837 72.4425

After LS 86.10625 90.39125 76.35625 80.6375 83.36625 86.68875

After SA 87.68125 87.4675 76.73125 80.41875 82.37625 85.9526

Table 3 Average results of 10 executions for the problem described in Table 1 when all dimensions can be put in vertical positions.

tem such additional information. Test ﬁles can be found in [24]. The application of our method to these problems leads to results similars to the ones in [17]. The results and the percentage of occupation are given in Tables 2 and 3. In the ﬁrst table, boxes are restricted only to allow some of the dimensions in the vertical direction. In the second table, all dimensions are permitted to be in the vertical direction. Tables display the average results either with an initial random order of the boxes, or either ordered by vol-

6

ume. Then, average results are also given when just the initial ordering is considered (column Before LS/SA), or when local search (column After LS) and simulated annealing (column After SA) are applied. The results show that the initial ordering has a large inﬂuence in the results, although this inﬂuence is smaller once local search or simulated annealing is applied.

4.2 Bischoﬀ and Ratcliﬀ ﬁles We have also considered the problems described in [4] and accessible through the web site in [5]. They consist of 7 sets of 100 problems. In each set, all problems have the same number of diﬀerent boxes, although the sizes of the boxes are not the same. Table 4 shows the results of the three methods presented in [4]. The tables include the number of diﬀerent boxes in each set of problems and also the average occupancy. Table 5 presents the results we have obtained for the same set of problems. The results correspond to the case of ordering the boxes according to volume, and considering only local search. Simulated annealing implies some improvement but the computational cost is much higher (an average execution time of 2822 seconds was obtained for simulation annealing). The results we have obtained are slightly worse than the ones obtained by Bischoﬀ and Ratcliﬀ. A diﬀerence of about 5% or less is obtained. Nevertheless, diﬀerence is at the cost of permitting additional shapes for the boxes (Section 4.3 includes the results for nonorthogonal boxes). In any case, for some of the particular problems we achieve a good score (e.g. 91% or 92% as shown in Table 5).

4.3 Variation of Bischoﬀ and Ratcliﬀ ﬁles This is a variation of the previous ﬁles where other kinds of boxes are also permitted. We have considered, as in the Bischoﬀ and Ratcliﬀ ﬁles, sets of 3, 5, 8, 10, 12, 15, and 20 diﬀerent box types. Then, for each of these alternatives, we have considered diﬀerent situations with respect to the proportion of the diﬀerent shapes. Table 6 gives the 6 diﬀerent sets of boxes considered. Properly speaking, we have considered all possible non empty subset of boxes from {boxes, dodecahedrons, prisms} except the case of only boxes because this has already been studied above. That is, we have considered the case of 50% regular orthogonal boxes and 50% hexagonal prisms, the case of 50% regular orthogonal boxes and 50% dodecahedron, etc. The data ﬁles are publicly available trough the web page given in [24].

Case No. Average (wtpack) Boxes Occup. SD First method (Section 4.1. of [4]) Case 1 3 81.76 5.98 Case 2 5 81.70 6.54 Case 3 8 82.98 5.44 Case 4 10 82.60 4.11 Case 5 12 82.76 4.03 Case 6 15 81.50 3.88 Case 7 20 80.51 3.75 Second method (Section 4.2. of [4]) Case 1 3 83.79 4.67 Case 2 5 84.44 3.97 Case 3 8 83.94 3.12 Case 4 10 83.71 3.07 Case 5 12 83.80 2.88 Case 6 15 82.44 3.05 Case 7 20 82.01 2.58 Combined method [4] Case 1 3 85.40 4.30 Case 2 5 86.25 3.49 Case 3 8 85.86 3.27 Case 4 10 85.08 2.47 Case 5 12 85.21 2.49 Case 6 15 83.84 2.62 Case 7 20 82.95 2.43

Highest

Prob. No.

94.36 93.76 92.63 88.89 90.39 89.15 88.28

39 33 49 60 41 58 51

93.58 91.85 89.65 90.06 89.87 88.39 86.88

13 39 37 22 2 72 14

94.36 93.76 92.63 90.06 90.39 89.15 88.28

39 33 49 22 41 58 51

Table 4 Average results of 10 executions using our approach for the problems described by Bischoﬀ and Ratcliﬀ in [4].

Management sorting sorting sorting sorting sorting sorting sorting

Case (wtpack) Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7

Average Occup. 80.23 77.96 79.11 78.15 77.81 77.06 76.51

SD

Highest

5.99 4.85 4.27 3.80 3.18 3.49 2.84

92.61 91.64 85.84 85.66 84.03 83.76 82.63

Table 5 Average results of 10 executions using our approach for the problems described by Bischoﬀ and Ratcliﬀ in [4].

The average occupancy of our solutions is described in Table 7. The following ﬁgures for average occupancy can be distinguished: 70.19 (for 3 box types), 71.01 (for 5 box types), 69.81 (for 8 box types), 71.48 (for 10 box types), 70.48 (for 12 box types), 68.81 (for 15 box types), and 71.80 (for 20 box types). The results obtained are naturally worse than the ones achieved when only orthogonal boxes were considered, and the worst case is when only dodecahedrons are

7

Subset

Boxes

Dodecahedron

Subset 1 50% Subset 2 50% 50% Subset 3 Subset 4 50% Subset 5 100% Subset 6 33% 33% Subset Average SD Subset 1 67.87 3.41 Subset 2 73.00 6.56 Subset 3 61.23 5.33 Subset 4 78.37 7.61 Subset 5 75.49 6.73 Subset 6 67.12 6.20

Hexagonal prism 50% 100% 50% 33% Highest 72.37 83.45 73.24 94.28 91.7 79.41

Table 6 Description of our variation of Bischoﬀ and Ratcliﬀ ﬁles, average occupancy, deviation, and highest result (bottom) according to box types (top).

Management sorting sorting sorting sorting sorting sorting sorting

Case (wtpack) Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7

Average Occup. 70.19 71.01 69.81 71.49 70.48 68.81 71.81

SD

Highest

8.89 9.64 6.41 7.56 8.92 9.09 8.82

91.70 94.29 77.82 81.66 88.62 82.40 83.45

Table 7 Average results of our approach applied to a variation of the ﬁles by Bischoﬀ and Ratcliﬀ.

considered. However, this is natural because its shape leaves empty spaces that cannot be ﬁlled. In any case, we consider that the results obtained are acceptable, as we got an average occupancy larger than 60%, and achieving a good average occupancy for some of the problems (e.g. 78% for subset 4 with 50% dodecahedrons and 50% hexagonal prisms).

5 Conclusions and future work In this paper we have considered the container loading problem for nonorthogonal objects. Our approach has been applied to three types of objects: typical boxes (orthogonal boxes), dodecahedrons and hexagonal prisms. We have presented the results of our approach that are in the range of other solutions that only deal with standard boxes. In addition, our proposal permits its application to the new types of objects considered.

As future work we consider the extension of the approach to take into account the maximum load on a box and a correct distribution of the weight. 6 Acknowledgments This work is partially supported by the Spanish Ministerio de Fomento (project PON, T27/2006) and MEC (projects CONSOLIDER INGENIO 2010 CSD2007-00004, and TSI2007-65406-C03-02) and by the Generalitat de Catalunya (AGAUR, 2006BE-2 00338). References 1. Berthold, M., Hand, D. J., 2003. Intelligent Data Analysis. Springer Berlin Heidelberg, ISBN 978-3-540-43060-5, 351-401. 2. Birgin, E. G., Martnez, J. M., Ronconi, D. P., 2005. Optimizing the packing of cylinders into a rectangular container: A nonlinear approach. European Journal of Operational Research 160, 19-33. 3. Bischoﬀ, E. E., 2006. Three-dimensional packing of items with limited load bearing strength. European Journal of Operational Research 168, 952-966. 4. Bischoﬀ, E. E., Ratcliﬀ, M. S. W., 1995. Issues in the Development of Approaches to Container Loading. Omega Int. J. of Management Sciences 23(4), 377-390. 5. http://people.brunel.ac.uk/˜mastjjb/jeb/orlib/ﬁles/wtpack1.txt (to wtpack7.txt) 6. Bortfeldt, A., Gehring, H., 2001. A hybrid genetic algorithm for the container loading problem. European Journal of Operational Research 131, 143-161. 7. Bortfeldt, A., Gehring, H., Mack, D., 2003. A parallel tabu search algorithm for solving the container loading problem. Parallel Computing 29, 641-662. 8. Davies, A. P., Bischoﬀ, E. E., 1999. Weight distribution considerations in container loading. European Journal of Operational Research 114, 509-527. 9. Dyckhoﬀ, H., 1990. A typology of cutting and packing problems. European Journal of Operational Research 44, 145-159. 10. Dyckhoﬀ, H., Finke, U., 1992. Cutting and Packing in Production and Distribution, Physica, Heidelberg. 11. Eley, M., 2002. Solving container loading problems by block arrangement. European Journal of Operational Research 141, 393-409. 12. Eley, M., 2003. A bottleneck assignment approach to the multiple container loading problem. OR Spectrum 25, 45-60. 13. Gehring, H., Bortfeldt, A., 1997. A Genetic Algorithm for Solving the Container Loading Problem. Int. Trans. Operational Research 4:5/6, 401-418. 14. Gendreau, M., Iori, M., Laporte, G., Martello, S. 2006. A Tabu Search Algorithm for a Routing and Container Loading Problem. Transportation Science 40:3, 342-350. 15. George, J. A., George, J. M., Lamar, B. W., 1995. Packing diﬀerent-sized circles into a rectangular container. European Journal of Operational Research 84, 693-712. 16. Iori, M., Salazar-Gonzalez, J.-J., Vigo, D., 2007. An Exact Approach for the Vehicle Routing Problem with TwoDimensional Loading Constraints. Transportation Science 41:2 253-264. 17. Miyamoto, S., Endo, Y., Hanzawa, K., Hamasuna, Y., 2006. Metaheuristic Algorithms for Container Loading Problems: Framework and Knowledge Utilization. J. of Advanced Intelligence and Intelligent Informatics 11:5, 51-60.

8 18. Narasimhan, A., Palekar, U. S. 2002. Analysis and Algorithms for the Transtainer Routing Problem in Container Port Operations. Transportation Science 36:1 63-78. 19. Pisinger, D., 2002. Heuristics for the container loading problem. European Journal of Operational Research 141, 382-392. 20. Takahara, S., Kusumoto, Y., Miyamoto, S., (2003), Solution for textile nesting problems using adaptive meta-heuristics and grouping, Soft Computing 7 154-159. 21. Zachmann, G., 2000. Virtual Reality in Assembly Simulation Collision Detection, Simulation Algorithms, and Interaction Techniques. PhD Dissertation, Technischen Universitt Darmstadt. 22. Zachmann, G., 1994. Exact and Fast Collision Detection. Diploma Thesis, Technischen Universitt Darmstadt. 23. http://www.cs.unc.edu/˜geom/collide/ 24. http://www.iiia.csic.es/˜vtorra/projecte.pon/