Keywords

1 Introduction

The Three-Dimensional Loading Capacitated Vehicle Routing Problem (3L-CVRP) is a highly complex problem combining three dimensional loading and vehicle routing, which was introduced by Gendreau et al. (2006). The 3L-CVRP calls for the determination of the routes traveled by a fleet of homogeneous vehicles that deliver items to customers such that the total distance traveled by all vehicles is minimized. In addition, the three-dimensional loading plan for each vehicle must be formulated while fulfilling a number of constraints that address issues such as the stability of the items, packing requirements for fragile items, and the convenience of loading and unloading. The problem is of practical interest in freight distribution since the combination of the vehicle routing problem and the 3-D container loading problem with realistic constraints closely models real-life situations, especially when the delivery involves multiple large items of dissimilar dimensions. Examples are the distributions of household appliances, kitchen components, mechanical components and furniture.

On the other hand, the 3L-CVRP is an extremely hard and challenging optimization problem since it generalizes two of the most well known problems in combinatorial optimization: the Capacitated Vehicle Routing Problem (CVRP), and the Three Dimensional Bin Packing Problem (3D-BPP). During the past decades, in the area of combinatorial optimization, CVRP and 3D-BPP problems have been researched intensively but independently. About CVRP and related vehicle routing problems, e.g. the VRP with time windows (VRPTW), we recommend that readers survey the books by Toth and Vigo (2001) and Golden et al. (2008) and recent reviews (Laporte 2009; Vidal et al. 2013). The 3D-BPP problem and its variants, e.g. 3D strip packing problem (3D-SPP), have been solved to optimality so far. Exact methods for the 3D-BPP were proposed by Martello et al. (2000). Heuristic and meta-heuristic methods for the 3D-BPP were developed by Faroe et al. (2003), Crainic et al. (2008), Egeblad and Pisinger (2009).

Only in the recent years have some researchers pay attention to this combined optimization problem. Gendreau et al. (2006) were the first to consider the vehicle routing problem with three-dimensional loading constraints. A tabu search approach was proposed to address the 3L-CVRP problem, where the three-dimensional loading sub-problem was also solved by tabu search algorithm. Tarantilis et al. (2009) designed a hybrid procedure combining the strategies tabu search and guided local search, and they also devised collection of plain packing heuristics. Fuellerer et al. (2010) generalized their ant colony algorithm to the three-dimensional case by checking loading feasibility through fast and effective packing heuristics. Zhu et al. (2012) improved two packing heuristics, namely the Deepest-Bottom-Left-Fill heuristic and the Maximum Touching Area heuristic, for the three-dimensional loading sub-problem and provided efficient implementations. Based on these two new heuristics, an effective tabu search algorithm is given to address the overall problem. Bortfeldt (2012) presented a new hybrid algorithm including a tabu search algorithm for routing and a tree search algorithm for packing boxes into vehicles for the 3L-CVRP. Qingfang Ruan et al. (2013) proposed a hybrid approach which combines Honey Bee Mating Optimization and six loading heuristics to solve the 3L-CVRP. Moura and Oliveira (2009) studied the combination of the Vehicle Routing Problem with Time Window (VRPTW) and the Container Loading Problem. The number of vehicles is to be minimized with higher priority, whereas the total travel distance is to be minimized with lower priority. They proposed a genetic algorithm with a hybrid meta-heuristic methodology combining the strategies of tabu search to solve the problem. Then both a sequential and a hierarchical approach were proposed.

To the best of our knowledge, there is no detailed work that describes the use of the ABC algorithm to deal with 3L-CVRP. We present ABC algorithm with two loading heuristic to solve the 3L-CVRP. A novel real encoding method is presented to represent the solution. The ABC algorithm is mainly searches the space of routing solutions, while checking the feasibility of the three-dimensional loading of each route by means of two loading heuristic deepest-bottom-left fill (DBLF) and max touching area (MTA). Our aim is to provide good solutions to the instances, leading to the algorithm of practical use in transportation.

The remainder of this paper is organized as follows: in Sect. 2, a detailed description of the problem is provided. In Sect. 3 the proposed algorithm is described, and followed by the computational results in Sect. 4. Finally, Sect. 5 concludes the paper.

2 Problem Description

Let G = (V,E) be an undirected graph, where V = (0,1,2, …,n) is the set of n + 1 vertices corresponding to a depot, represented by vertex 0, and n clients, denoted by vertices 1, …, n and E is the set of edges. The cost of an edge (i,j) is denoted by c ij . There are K identical vehicles available; each vehicle has a weight capacity D and a three-dimensional rectangular loading space S = W × H × L defined by width W, height H and length L. Each client i(1,2, …,n) requires the delivery of a set of m i three-dimensional items I it (t = 1, 2, …, m i ) having width w it , height h it and length l it with total weight d i .

In 3L-CVRP, we assume all items are rectangular boxes. The items can only be placed orthogonally inside a vehicle; however, items can be rotated 90° by on the width-length plane. Some items are fragile; only fragile items can be placed on top of other fragile items, whereas any item can be placed on top of a non-fragile item. The stability of the packed items is important; one method to ensure stability is to require items that are placed on top of other items to have sufficient supporting areas. A packing is feasible if all items are either placed directly on the floor of the vehicle or on top of other items with total supporting area of at least α percent of their base areas. Another important requirement is to ensure that items can be easily unloaded; this is approximated by a Last-In-First-Out (LIFO) policy. When client i is visited, all of its corresponding items I it must not be stacked beneath nor be blocked by items of clients that are to be visited later; an item A is beneath B if the interior of the projections of their bases on the vehicle floor intersect, and the top of A is not higher than the bottom of B in the vertical direction. An item is also considered blocked if it will overlap any item of a later client when it is moved along the L axis toward the rear door.

The objective of 3L-CVRP is to find a set of at most K routes (one per vehicle) such that:

  1. 1.

    Every vehicle starts from the depot, visits a sequence of clients and returns to the depot.

  2. 2.

    All clients are served, and every client is served by exactly one vehicle.

  3. 3.

    No vehicle carries a total weight that exceeds its capacity.

  4. 4.

    All items demanded by all the clients served by a vehicle can be orthogonally packed into that vehicle while satisfying the following loading constraints:

    1. (1)

      (Fragility constraint) no non-fragile items are placed on top of fragile items.

    2. (2)

      (Supporting area constraint) all items have a supporting area of at least a percent of their base area.

    3. (3)

      (LIFO constraint) all items fulfill the LIFO policy.

  5. 5.

    The total cost of all edges included in the routes is minimized.

3 The Proposed Algorithm

3.1 Artificial Bee Colony Algorithm

The Artificial Bee Colony (ABC) algorithm is a new swarm intelligence technique inspired by intelligent foraging behavior of honey bees. The first framework of ABC algorithm was presented by Karaboga and Basturk (2007, 2008). In ABC algorithm, the colony of artificial bees contains three groups of bees: employed bees, onlookers and scouts. A bee waiting on the dance area for making a decision to choose a food source is called onlooker and one going to the food source visited by it before is named employed bee. The other kind of bee is scout bee that carries out random search for discovering new sources. The position of a food source represents a possible solution to the optimization problem and the nectar amount of a food source corresponds to the quality (fitness) of the associated solution. In the algorithm, the first half of the colony consists of employed artificial bees and the second half constitutes the onlookers. The number of the employed bees or the onlooker bees is equal to the number of solutions in the population. At the first step, the ABC generates a randomly distributed initial population of SN solutions (food source positions) according Eq. (1).

$$ {x}_i^j={x}_{\min}^j+ rand\left(\right)\left({x}_{\max}^j-{x}_{\min}^j\right)\begin{array}{cc}\hfill \hfill & \hfill \hfill \end{array}i\in SN,j\in D $$
(1)

Where SN denotes the size of population. Each solution x i where i = 1, 2, … SN is a D-dimensional vector. Here, D is the number of optimization parameters. x jmax and x jmin are lower and upper bounds of parameter j, respectively.

After initialization, the population of the positions (solutions) is subjected to repeated cycles C = 1, 2 … MCN of the search processes of the employed bees, the onlooker bees and scout bees. An employed bee produces a modification on the position (solution) using the formula (2) in her memory depending on the local information (visual information) and tests the nectar amount (fitness value) of the new source (new solution). Provided that the nectar amount of the new one is higher than that of the previous one, the bee memorizes the new position and forgets the old one. Otherwise she keeps the position of the previous one in her memory.

$$ {v}_{ij}={x}_{ij}+{\varphi}_{ij}\left({x}_{ij}-{x}_{kj}\right) $$
(2)

Where a food source v i is determined by changing one parameter of x i . k ∈ {1, 2, … SN} and j ∈ {1, 2, … D} are randomly chosen indexes. Although k is determined randomly, it has to be different from i. φ ij is a random number between [−1,1]. It controls the production of neighbor food sources around x ij and represents the comparison of two food positions visible to a bee.

After all employed bees complete the search process; they share the nectar information of the food sources and their position information with the onlooker bees on the dance area. An onlooker bee evaluates the nectar information taken from all employed bees and chooses a food source with a probability value associated with that food source p i calculated by the following expression:

$$ {p}_i=\frac{ fi{t}_i}{{\displaystyle \sum_{i=1}^{SN} fi{t}_i}} $$
(3)

Where fit i is the fitness value of solution i.As in the case of the employed bee, it produces a modification on the position using formula (3) in its memory and checks the nectar amount of the candidate source. Providing that its nectar is higher than that of the previous one, the bee memorizes the new position and forgets the old one. If a position cannot be improved further through a predetermined value named “limit”, then that food source is assumed to be abandoned. The corresponding employed bee becomes a scout. The abandoned position will be replaced with a new food source found by the scout.

3.2 ABC for 3L-CVRP

For these state-of-arts algorithms such as ABC, encoding method is the key problem and also is a kind of art problem. When ABC was used to solve the combinatorial optimization problems, usually has two encoding method: real number encoding and integer number encoding. For the real number encoding method, such as random-key procedure is always used to solve the combinatorial optimization problems. For the integer number coding method, they are more used since can avoid many coding issues. For ABC algorithm, the new operators should be designed when the integer number was used. To avoid the problem, a new real number encoding method was presented in the paper.

3.2.1 Solution Representations and Decoding Methods

3.2.1.1 Solution Representation

For n customers (non depot) k vehicles 3L-CVRP problem, the n real numbers as the representation has the form of a vector of length n.

For example: 8 customers, 3 vehicles.

X(x 1 ,x 2 …,x 8 ) = (1.24563, 3.42294, 0.0234561, 300.453, 54.3432, 6759.87, 43.5559, 8.43223).

3.2.1.2 Decoding Procedure

The next procedure is to decode the representation to the solution. The detail procedure is below:

  • Step1 : Remove the decimal point of x i ; transform x i to integer number. For example: Change X to [X] = (124563, 342294, 234561, 300453, 543432, 675987, 435559, 843223)

  • Step2 : Segregate x i two parts: {X1} and (X2). {X1} has four significant figures and (X2) has two significant figures. You can also adjust the number according to the instance size. For example (Table 1):

    Table 1 Example for Step2
  • Step3 : Modulo operation. the first part modulo n, the second part modulo the number of vehicles k. Then, the first part is plus 1. For example (Table 2).

    Table 2 Example for Step3
  • Step4 : Map the element of X1′ to the current vehicle in the current position X2, and the visited order is the order of customer appearance. So, the customer 6 corresponds to the vehicle 0, and customer 6 is the first visited in the route 0.

The solution is below:

Route 0: 0-6-8-0 Route 1: 0-7-2-0 Route 2: 0-5-3-4-1-0.

3.2.1.3 Revise the Solutions and the Representations

After decoding, maybe some solutions are infeasible. Two issues should be considered. (1) Maybe some customers are duplicated and some missed. (2) Maybe some route will exceed the vehicle capacity. So, we should check the solution, and revised the duplicated customers to the missed customers.

3.2.2 Local Search Procedure for Route

In previous works, many researchers used the meta-heurist algorithms hybrid the local search operator for the route. The local search operator can improve the solution quality very much. In the paper, 2-Opt and 3-Opt were used to improve the solution after decoding and check the solution. The 2-Opt is used to search in the inter route and intra route. The 3-Opt is mainly used to search in the intra route.

3.2.3 Algorithms for Three-Dimension Loading

In this subsection, we want to determine whether all the items needed by customers in a given route can be loaded into a single vehicle while satisfying all loading constraints depicted in Sect. 2. The heuristics presented to solve this problem must be flexible because they should be adaptable to consider all loading constraints or only a subset of them. We make use of the following procedures, aiming at a feasibly loading of items demanded by customers along the route.

To compute the potential infeasibility of a route, we first easily check if the weight constraint is not violated, and then apply the lower bounds for the 3BPP by Martello et al. (2000). If the lower bounds do not prove the infeasibility, then we repeatedly apply the two heuristics: deepest-bottom-left-fill algorithm and max touching area algorithm. These heuristics place the items according to a given sequence, one at a time, into a container of width W, height H and infinite length. Their aim is to find a feasible loading of minimum length, which does not exceed the vehicle length L. By changing the sequence of the items and again invoking the heuristics one can obtain new solutions. This process is iterated θ times or until a feasible solution has been found.

The initial loading sequence is constructed by taking the various loading constraints into account. We sort the items by applying the following sorting rules in order:

  • SR1 : (applies only if the LIFO constraint is to be enforced) Sort the items in reverse order of the clients to be visited. Hence, the items for later customers will be loaded first. Ties are broken using the next rule SR2.

  • SR2 : (applies only if fragility constraint is to be enforced) Sort the items so that non-fragile items are before fragile items. We would like to load the non-fragile items first since fragile item can be placed on top of non-fragile items, but the reverse is prohibited. Ties are broken using the next rule SR3.

  • SR3 : Sort the items by decreasing order of volume.

The deepest-bottom-left-fill algorithm packs the current item into the normal position which has lowest width, breaking ties by lowest height, breaking ties by lowest length. For each position, both feasible orientations on the w-l plane are considered. The first packing satisfying the loading conditions is selected and the process is iterated until all items are packed or no feasible packing exists for an item.

The max touching perimeter algorithm generates among all the possible normal positions for the current item, selects the one maximizing the percentage of the item surface touching the container and other items already packed. In this case too, the process is iterated until all items are packed or no feasible packing exists for an item.

4 Computational Results

In this section, the proposed algorithm is analyzed using several benchmarking problems. The proposed algorithm was coded in Visual C++, executed on an Intel Core2 i5, 2.5 GHz with 4 GB of RAM under Windows 7. The algorithm was tested on the classical 3L-CVRP instances, which were proposed by Gendreau et al. (2006). And they are available at http://www.or.deis.unibo.it/research.html. In the instances, the graphs, customers demand, and vehicle weight capacity are taken from CVRP instances. The arc costs are determined as the Euclidean distances between coordinates of customers. The vehicle loading volume has dimensions W = 25, H = 30, and L = 60. For each customer the number of required items is randomly generated according to a uniform distribution between 1 and 3. Each item dimension is randomly generated according to a uniform distribution in the interval between 20 and 60 % of the corresponding vehicle dimension. The minimum supporting area is set equal to 0.75. In the experiment, we select 10 instances from the benchmark.

The parameters of the proposed algorithm have remarkable effect on the quality and effectiveness of the algorithm. Therefore, with the help of the initial experiments, the algorithm parameters are set as follows: the population size NP is 60, the max iteration MCN is 500, the max try number limit is 50. In the following experiments, each problem is independently run 10 times. The results for every instance are the mean values of 10 times.

In Table 3, we compare its performance of ABC with the solutions solved by TS, GTS, ACO approaches proposed in the literatures (Gendreau et al. 2006; Tarantilis et al. 2009; Fuellerer et al. 2010), respectively. The first columns indicate the instance name, the next two columns report the best results obtained by TS and GTS (Because only best results were reported in their papers). The average results produced by ACO and our proposed ABC algorithm are in the last two columns. The best results of every instance for all the algorithms are denoted by bold.

Table 3 Comparisons of ABC with TS, GTS, ACO on 3L-CVRP instances from the literature

In terms of solution quality the ABC algorithm is clearly superior to the others. The average solution values found by the ABC is worse than the one found by the ACO and GTS in just one case (E036-11h), while in all other cases it is better. In all instance, the average of solutions found by ABC is better 7.32 % than the one found by TS. For GTS except the instance E036-11h, the average performance of ABC is better than 4.13 %. We lastly note that the average quality of ABC is a little better 1.11 % than the ACO.

In Table 4 we examine the effect of the loading constraints discussed in Sect. 2. We run ABC with four different loading constraint configurations: (1) without the fragility constraint; (2) without the supporting area constraint; (3) without the LIFO policy, and (4)with only the 3D loading constraint, it means all three aforementioned constraints are not taken in to account.

Table 4 Performance of the ABC algorithm for different loading configurations

From the results, we can see that although all three constraints have a significant effect on the cost of the final solution, the LIFO and supporting area constraints have a more significant effect than the fragility constraint. We compute the percentage differences between the average solution values found for each loading configuration and the ones found for the standard configuration (gap). The standard constraints include all the constraints and the solutions have been given in last column of the Table 3. The removal of the LIFO constraint and supporting area constraint leads to the larger reduction of 3.6 and 4.22 %, respectively. Removing the fragility constraint leads to the lowest reduction. While removing the fragility constraint only finds a weak reduction of 1.54 % in the average solution value. The configuration with no operational constraints has by far better solution values, with cost reductions close to 6.8 %.

5 Conclusion

In this paper, the 3L-CVRP, as a new variant of vehicle routing problem, is studied. This is a very interesting problem in terms of both theoretical complexity and practical applications. We have developed an ABC algorithm with two loading heuristics to solve the problem. To the best of our knowledge, it is the first time for ABC meta-heuristics to be employed in this combinatorial problem. A novel real number encoding method is presented for the solution representation. Two types of loading heuristics are presented as soon as we obtain the solution of the vehicle routing sub-problem. For testing the robustness and effectiveness of the hybrid approach, 10 benchmark instances of 3L-CVRP are solved. From the computational results, it is shown that the hybrid approach obtains many more optimal solutions.