DEVELOPMENT OF A DECISION SUPPORT SYSTEM FOR SOLVING CONTAINER LOADING PROBLEMS

. The globalization of supply chains and rising fuel costs are forcing container carriers both to minimize the number of trips and to maximize available container space. This makes container loading (CL) a critical process especially in real-life applications. Container loading (CL), which is a difficult problem to be solved, has many applications in container transportation and distribution industries. This article presents a container loading support system (CLSS). The proposed CLSS composes of three main components, including a hybrid Bees Algorithm as the main computational algorithm, the graphical user interface (GUI) and a simulation program. The aim of the designed system is to make the packing pattern more visible to the user in order to simplify the loading process. An illustrative example – a CL problem from literature – is also provided to introduce the operation of the system and to prove its efficiency.


Introduction
e globalization of supply chains has signi cantly increased container shipment all around the world (Su and Wang 2009;Miao et al. 2009;Chen and Zeng 2010;Simongáti 2010;Rohács and Simongáti 2007;Vasilis Vasiliauskas and Jakubauskas 2007;Paulauskas and Bentzen 2008). 90% of all cargo moves in containers and approximately 250 million are shipped annually (van de Voort et al. 2003). At the moment, rising fuel costs provide strong incentive for container carriers to maximize available container space, thereby minimizing the number of required trips across the global container transportation system (Wang et al. 2008). us, it can be concluded that the loading phase is one of the critical parts of the container shipment process.
CL problem is NP-Hard problem (Pisinger 2002) which means that the problem is too complex to be solved in polynomial time. e problem can be described as follows: Given a set of n items with width ( i w ), depth ( i d ) and height ( i h ) and a single container with known dimensions ( , , ) W D H where i w W d , i h H d and i d D d . e problem is to pack the items into a container without overlapping while maximizing the utilization rate of the container. Numerous papers have been published on CL problem and related problems. e overview of literature reveals that most of the published works on the subject utilizes di erent types of data structures (Morabito and Arenales 1994;Eley 2002;Lim et al. 2005), heuristic algorithms (George and Robinson 1980;Bischo and Marriott 1990;Gehring et al. 1990;Haessler and Talbot 1990;Ngoi et al. 1994;Pisinger 2002;Bischo 2003;Moura and Oliveira 2005), meta-heuristic algorithms Bortfeldt 1997, 2002;Yeung and Tang 2005;Faina 2000;Bortfeldt and Gehring 2001) and some parallel approaches (Gehring and Bortfeldt 2002;Bortfeldt et al. 2003;Mack et al. 2004). In most of these approaches, the aim was to ll the container with better volume utilization than the others. An interested reader can refer to Wäscher et al. (2007) topology to reach corresponding literature on the categories of a similar problem. is article presents a container loading support system (CLSS) that can be rarely constructed.
Even if CL problem is solved to its optimum, packing shipment into a container is a complex process which o en takes several days to allocate the pooled goods into a number of containers and then packing the allocated goods into them. Occasionally, workers must unload some containers and then reload them in a different pattern to pack more goods in containers (Chien and Deng 2004). Chien and Deng (2004) were the rst researchers that realized this di culty. ey proposed a decision support system (DSS) based on a heuristic packing procedure. Another DSS for a similar problem namely Air-Cargo Loading Problem was put forward by Chan et al. (2006). e two-phased system is suggested to load air cargo pallets e ciently using Linear Programming and heuristics.
Di erently from the previously introduced DSS using heuristic algorithms, the designed CLSS uses a swarm intelligence algorithm which is the core of the system. Other than the computational algorithm, the CLSS has the graphical user interface (GUI) and a simulation program that visualize the actual packing process in a 3D manner.
In the next section, a general overview of the CLSS is supplied. Following this introduction of the overall system, each component of the system is described in detail. Finally, the functioning of the system is explained through a step by step solution of CL problem from literature.

Container Loading Support System
e CLSS composes of a computational algorithm based on a recently new swarm intelligence algorithm called the Bees Algorithm, the GUI and a simulation program that visualizes the actual packing process. e data ow of the system is schematized in Fig. 1.
In order to operate the CLSS, the user should select the parameters of the computational algorithm and problem data from the GUI. Later, this data is sent to the computational algorithm where actual processing is done. By using the corresponding problem data (obtained from the problem database) and the parameters de ned previously by the user, the computational algorithm starts working. When the pre-determined number of iterations is reached, the data about the volume utilization of the solution is sent to the GUI and the data about the position of each box is sent to a le called the visual le containing the x, y and z coordinates of each box of the nal solution computed by the computational algorithm. Finally, the simulation program visualizes the nal packing pattern using the visual le. In the next section, the details about the computational algorithm are presented.

Computational Algorithm
e Bees Algorithm is used for the computational algorithm of the system. It is a recently new swarm intelligence algorithm. Numerous researchers have recently been inspired from the interesting features of honey bee colonies and conducted research on the subjects like foraging, learning, mating and dancing. Most of works in this eld of research have been mainly in uenced from (or based on) the pioneering works of Von Frisch (1967), Seeley (1955) and Dyer (2002). e utilization of the proposed models in this eld and a number of algorithms based on the behaviours of honey bee colonies have been designed. ese algorithms, namely bee or bee colony algorithms, are mainly inspired from two features -mating (Abbass 2001;Afshar et al. 2007;Teo and Abbass 2003;Koudil et al. 2007) and food foraging (Lucic 2002;Yang 2005;Pham et al. 2006aPham et al. , 2006bPham et al. , 2006c. Despite its relatively short history, the approaches inspired from the behaviours of honey bees have been applied to job shop scheduling (Chong et al. 2006), transportation problems (Lucic 2002), partitioning and scheduling problems (Koudil et al. 2007), training of multi-layered perception networks (Pham et al. 2006a), recognizing patterns in control charts (Pham et al. 2006b), optimization of continuous functions (Karaboğa and Baştürk 2007;Pham et al. 2006c), water resources management problems (Bozorg and Afshar 2004), data mining problems (Fathian et al. 2007;Benatchba et al. 2005) and generalized assignment problems (Baykasoğlu et al. 2007). Up to date, this algorithm has not been utilized to solve CL problems. e BA algorithm is hybridized with a heuristic lling procedure to solve CL problem. is hybrid algorithm will follow the introduction of the heuristic lling procedure.
Heuristic Filling Procedure e proposed heuristic lling procedure is a 'wallbuilding' approach that loads the container layer-by-layer in a recursive manner. Before lling each layer, its dimensions are determined which is explained in the next Section.
Layers are lled one at a time. In case it is not possible to ll a layer with the boxes in the set of available boxes, the current layer is closed and a new one is started. e procedure is repeated until it is not possible to locate a new layer to the remaining container width or when the set of available boxes is empty. As a result of this packing process, the container is lled with the isolated vertical layers where spanning boxes between layers is avoided.

Determination of layer dimensions
Before starting the lling process, it is important to determine the dimensions of a layer since the width of the layer must be carefully selected to obtain a good performance (Pisinger 2002).
In this study, the width of each layer L w is set equal to the width of the Layer Determining Box (LDB) (Gehring et al. 1990). In order to determine the LDB, rst, the boxes among the set of available boxes are sorted by width dimension in a non-increasing order. us, the box with the greatest width dimension is given the highest priority. In case of a tie among the boxes with the same width dimension, the box with the smallest depth dimension i d is given a higher priority. Finally, the highest priority box in the set of available boxes is chosen as the LDB.
A er determining the LDB, the layer having width L w equal to the width i w of the LDB, height L h and depth L d equal to those of the container is lled. As a result, the dimensions of the layer are determined as seen in Equation (1): ; .
Filling the layer Following the determination of layer dimensions, it is possible to ll the layers that are lled in a recursive manner. e main advantage of using recursive algorithms is that they reduce the solution to a problem with a particular set of input to the solution of the same problem with smaller input values (Rosen 2006). Besides, recursive algorithms are simple and easy to implement.
When the rst box (LDB) is allocated into the layer, three empty new-spaces namely 'beside', 'in front' and 'above' of the packed box are produced. In the given situation (see Fig. 2 and Fig. 3), only two of these spaces 'in front' and 'above' occur as a result of the allocation of the rst box into the layer. us, only these spaces are shown in Fig. 2. However, when a box having a width smaller than the LDB is packed into the layer, empty space beside the packed box occurs as seen in Fig. 3. In the proposed lling procedure, empty spaces are lled in the following order: rst, the empty space 'in front' of the packed box is lled, then the empty spaces 'beside' and 'above' of the packed box are lled, respectively. Now, suppose that there is a packed box in the layer as shown in Fig. 2 and it is desired to pack the next highest priority box in the set of available boxes into the container. First, the space 'in front' of the packed box is checked. If it is possible to allocate this box into this space, then it is packed there and removed from the set of available boxes since there is not empty space 'beside' the packed box in the current layer and space 'above' the packed box is checked. If it is possible to allocate this box into this space, then the box is packed to this space and the packed box is removed from the set of available boxes. Otherwise, the suitability of the next highest priority box in the set of available boxes to the available empty spaces in the layer is investigated. e process is repeated in a recursive manner for each box in the set of available boxes and for all empty spaces available in the current layer until it is not possible to ll empty spaces with a box in the set of available boxes.
Having introduced the basic features of the heuristic lling procedure in detail, the main steps of the procedure are summarized in Table 1. Table 1. e main steps of the heuristic lling procedure Step 1. Input data on a problem and calculate the rank of each box according to the determined ranking criteria.
Step 2. Is there enough container width for a new layer? If yes, en go to Step 3, Else go to Step 10.
Step 3. Select LDB as the box with the highest rank among the set of available boxes.
Step 4. Select the box with the highest rank in the set of available boxes.
Step 5. Is it possible to pack the selected box to the current layer? If yes, en go to Step 6, Else go to Step 4.
Step 6. Pack the selected box and remove the packed box from the set of available boxes.
Step 7. Update the available space data in the layer.
Step 8. Is there enough space for a new box in the layer? If yes, en go to Step 9, Else go to Step 2.
Step 9. Are there any boxes in the set of available boxes? If yes, en go to Step 2, Else go to Step 10.
Step 10. Calculate the utilization rate of the container and Stop.

for Container Loading Problems
Since it is essential to nd out the dimensions of a layer for a good container loading performance as discussed previously, BA is considered. As mentioned before, the width of the layers is set equal to the width of the boxes, which has the highest priority in the set of available boxes. If the priority of the boxes in the set of available boxes can be altered, alternative widths for the layers can be considered to reach a good container-loading performance. In our algorithm, the priorities of the boxes (in the set of available boxes) are changed by enabling or disabling the rotation of the boxes. e BA algorithm makes an analogy to a honey bees colony that tries to nd promising food sources in nature. e natural food foraging process of a honey bee colony starts with a number of scout bees from the colony searching for food sources. When scout bees nd a rich food source, they begin the so called 'waggle dance' in the hive (Dyer 2002).
is dance, which is a form of communication between the bees in the colony, includes information about the distance, direction and quality of the food source. Equipped with this important knowledge, the colony sends follower bees -more follower bees are sent to more promising food sources -to these food sources to collect food. While collecting it, bees evaluate the food level of the source and collect the needed information for the next waggle dance. e employed BA mimics the food foraging process of the honey bee colony. e main steps of BA for CL (hybrid-BA) problems hybridized with the heuristic lling procedure presented in the previous section are schematized in Fig. 4 (Daş and Dereli 2007).
In the process of implementing the hybrid-BA for CL, several parameters should be determined. ese key parameters are the number of scout bees n, the number of selected sites m, the number of elite sites e chosen from m sites, the number of bees recruited to search e elite sites nep, the number of bees recruited to search m-e other sites nsp and termination criteria. ese parameters of the algorithm are adjusted by trial and error since there is not a de ned procedure to help the users to choose the most appropriate set of parameters.
As can be seen in Fig. 4, the algorithm starts with n scout bees being placed randomly in the search space. ese n scout bees represent the initial population. Following the acquisition of random initial solutions, the latter found by scout bees are evaluated by the proposed heuristic lling procedure. Bees that have good tness among this initial population are selected so that m sites are chosen for neighbourhood search which is primarily around the best sites among these m sites known as elite sites e and other selected sites m-e. Here, elite sites (e) represent more promising solutions searched with nep bees greater than nsp bees searching the other (m-e) sites.
To obtain the next bee population, the bees (evaluated with the heuristic lling procedure) with the highest tness value are selected from each m site. In order to complete population to n bees, the remaining n-m bees are assigned randomly to the search space in order to nd new solutions. ese steps are repeated until the stopping criterion is met or the solution converges.
At this point, it is meaningful to explain why the 'hybridization' of the algorithm is required. e hybridization of the BA algorithm with the heuristic lling-procedure is essential, since the objective function values corresponding to each solution is needed all through the algorithm. Without these values of an objective function, neighbourhood search is not started in the algorithm. In Fig. 4, the interactions between the BA algorithm and the heuristic procedure are also illustrated. Fig. 4 clearly indicates that the heuristic procedure is called upon whenever the objective value of a solution is needed by the BA algorithm.

Representation of a solution and neighbourhood search
Each bee in the population represents a bit string of length equal to the number of the box types of the given CL problem. Each bit in this string shows an alternative orientation of a box type (there can be di erent rotation orientations for di erent problems). Suppose that, CL problem having relevant data like one presented in Table 2 is being dealt with. e problem contains a total of 320 boxes of 9 different box types (boxes of a similar type have the same dimensions). e bit string representation of this problem is shown in Fig. 5. Suppose that these boxes can only be base-rotated and that there is a 'this way up' constraint for these boxes. Each bit in this string represents box type and the numbers '0' and '1' represent whether all the boxes of that type are rotated or not. e rotation of an ordinary box is shown in Fig. 6. e solution provided in Fig. 5 suggests a program to rotate (to exchange width and depth dimensions in case only rotation on the base is allowed) all the boxes of types 2, 3, 5, 7, 8 and 9 allocating these boxes into the container following this new rotation-orientation. is structure is preferred to the structure where each bit in the string represents a box dealing with the problem. In this case, the resulting bit string will be of length 320 which will be a very inconvenient and time-consuming structure for large sized problems.
Two operators, namely '1-ip' and 'k-ip' , are dened in this work in order to reach neighbourhood solutions. In case of the '1-ip' type of the operator, the value of a randomly selected bit is ipped from '1 to 0' or from '0 to 1' , i.e. all the boxes of a selected box type are either rotated or not. e second operator is inspired from the work done by Kong et al. (2008). A simple random 4-ip method as local search was designed. is operator randomly selects four variables from the solution and ips their values from '1 to 0' or from '0 to 1' . If the newly generated solution is better, the original solution is replaced with the new one. is method was applied 1000 times for each solution. e number of ips and the number of execution through a set of experiments were selected. Similarly to this structure, an operator named 'k-ip' is designed for this work. is operator rotates a corresponding number of boxes ('k' times 'total box number') that are randomly selected. It is possible to rotate the boxes of a speci c box-type as well as the boxes of an alternative box-type using operator one a er another. For example, for the sample problem provided in Table 2, the neighbourhood search process through the use of operators discussed above is illustrated and explained in Fig. 7. For the example provided above, rst, '1-ip' operator is applied to the randomly selected bit. Accordingly, the randomly selected bit representing all the boxes of type 3 is rotated. Following '1-ip' operator, 'k-ip' operator is also applied to the example of a bit string.
'k-ip' is applied to the number of a selected bit position equal to the 'k' times of 'total box number' in that position (where k < 1). If k is selected as 0.5, then, a total of 320´0.5 randomly selected individual boxes should be rotated, for example, randomly selected boxes where box number 15 having type 1, box number 123 having type 3, etc.
If the obtained neighbourhood solution is better than the current one, then, the neighbourhood solution is saved. Otherwise, the current solution is saved. Using both operators, it is possible to evaluate a large number of solutions.

e Graphical User Interface and the Simulation Program
e GUI of the CLSS is designed in Borland Builder. is interface is used to select the problem type and parameters of the computational algorithm and to visualize the packing pattern. e snapshot of the interface is shown in Fig. 8. A simulation program is used to visualize the packing pattern. e simulated program is coded in OpenGL and integrated into the GUI for user friendly use.   T1  T2  T3  T4  T5  T6  T7  T8  T9   0  1  0  0  1  0  1  1  1   T1  T2  T3  T4  T5  T6  T7  T8  T9 1-ip Rotate all the boxes of the selected box type k-ip Rotate 320x0.5 individual boxes

Illustrative Application
e following example is supplied to demonstrate how the CLSS system works in a step-by step manner. e problem is selected from the Loh and Nee (LN) (1992) test cases which are a set of well known test problems. e aim is to allocate a set of boxes with varying dimensions into a container without any overlap to maximize the volume utilization of the container dealing with each problem.
Step 1: e user selects a test case composed of a set of problems from the GUI and determines the individual problem from this set. e snapshot of the CLSS presented in Fig. 9 illustrates the Problem Selection window used for this operation. Suppose that the user selects the LN test cases and problem number 12. A container having the width of 3200, the depth of 2400 and the height of 1000 units and a total of 120 boxes of 6 di erent box types are considered in this example. e dimensions of the boxes corresponding to the selected problem are presented in Table 3.
Step 2: Following the selection of the problem from the Problem Selection window, the user enters directly the parameters of the computational algorithm to the cells in the Problem Parameters section that includes the parameters regarding the hybrid-BA. ese parameters comprise the number of scout bees n, the number of selected sites m, the number of elite sites e chosen from m sites, the number of bees recruited to search e elite sites nep, the number of bees recruited to search m-e other sites nsp and the maximum number of iterations as termination criteria.
Suppose that for the solution of the selected LN problem, the following set of parameters is used: the number of bees (population) n = 5, the number of select-ed sites m = 3, the number of elite sites e = 2, the number of bees send to elite points nep = 4, the number of bees sent to other selected points nsp = 3 and the maximum number of iterations = 1000. Although such a choice of parameters is used in this example, the user is given the opportunity to try di erent values for the parameters of the computational algorithm. Suppose that for the solution of the selected LN problem, the following set of parameters is used: the number of bees (population) n = 5, the number of selected sites m = 3, the number of elite sites e = 2, the number of bees send to elite points nep = 4, the number of bees sent to other selected points nsp = 3 and the maximum number of iterations = 1000. Although such a choice of parameters is used in this example, the user is given the opportunity to try di erent values for the parameters of the computational algorithm.
Step 3: Having selected the problem and parameters, the user can run the computational algorithm by clicking the 'RUN' button.
Step 4: e computational algorithm works until the number of iterations is reached. en, data about Step 5: When the user clicks the 'ILLUSTRATE' button on the spreadsheet, the simulation program attached to the GUI executes and visualizes the packing pattern. e program reads the x, y and z coordinates of each box from the visual data le and shows how each box is loaded into the 3D container one by one. e resultant 3D graph of the packing pattern can be viewed from di erent angles using the arrow buttons located below the three dimensional graph where each loaded box is shown with di erent colours. It is also possible both to pause simulation using the 'PAUSE' button and to adjust the speed of simulation using the '-/+' buttons on both sides of the Speed bar. Fig. 10 and Fig. 11 illustrate the nal packing pattern for the selected problem together with the volume utilization of the problem in the Problem Details section. As can be seen from Fig. 10 and Fig. 11, the volume utilization of 78.5% (optimal value for this problem) is reached in 78 seconds.

Conclusions
In this paper, a CLSS to determine and visualize the container packing pattern of the CL process is presented. e system consists of three main components that include the computational algorithm based on the Bee Algorithm hybridized with a heuristic lling procedure, the GUI and the Simulation Program. e Computational Algorithm solves the selected problem using the input from the GUI coded in Borland Builder, enables the determination of problem related choices by the user (input to the Computational Algorithm) and the Simulation Program coded via OpenGL, illustrates the nal packing pattern in a 3D manner. e DSS proposed in this study has been also used in a medium-sized company with positive results. e presented simulation program, which is a component of the proposed DSS, can be used independently of the CLSS to visualize a packing pattern computed with a di erent algorithm. us, this component of the system can also be used for academic work on CL problems where visualizing the packing pattern is necessary.