A heuristic algorithm based on tabu search for vehicle routing problems with backhauls

Article history: Received January 16, 2017 Received in revised format: May 22, 2017 Accepted May 28, 2017 Available online May 28, 2017 In this paper, a heuristic algorithm based on Tabu Search Approach for solving the Vehicle Routing Problem with Backhauls (VRPB) is proposed. The problem considers a set of customers divided in two subsets: Linehaul and Backhaul customers. Each Linehaul customer requires the delivery of a given quantity of product from the depot, whereas a given quantity of product must be picked up from each Backhaul customer and transported to the depot. In the proposed algorithm, each route consists of one sub-route in which only the delivery task is done, and one sub-route in which only the collection process is performed. The search process allows obtaining a correct order to visit all the customers on each sub-route. In addition, the proposed algorithm determines the best connections among the sub-routes in order to obtain a global solution with the minimum traveling cost. The efficiency of the algorithm is evaluated on a set of benchmark instances taken from the literature. The results show that the computing times are greatly reduced with a high quality of solutions. Finally, conclusions and suggestions for future works are presented. Growing Science Ltd. All rights reserved. 8 © 201


Introduction
The Vehicle Routing Problem (VRP) belongs to the classic logistic problems considered in the literature. The VRP consists on carrying products from a depot to a set of customers , by a set of edges with associated costs ( ∈ ∪ and ∈ ∪ . The objective is to find a set of routes, which begin and end at the depot minimizing the traveling cost. The demand for all customers must be satisfied (Oliveira, 2004). Several exact algorithms have been proposed for solving the classic version of the VRP efficiently (Deif & Bodin, 1984). However, exact algorithms have proved to be optimal only on small and medium size instances for different variants of the VRP.
Several variants and considerations of the VRP have been proposed in the literature, such as capacity of the fleet of vehicles, heterogeneous fleet of vehicles, time windows for each customer, pickup and delivery nodes (Laporte, 2009;Aguado, 2009). Therefore, the vehicle routing problem becomes a more complicated problem that frequently exceeds the capacity of classical solution strategies, i.e. nonlinear techniques (Bazaraa et al., 2006). Then, the computational complexity is increased, and more sophisticated algorithms for solving the VRP are required (Dorigo & Gambarella, 1997). Successful applications of VRP variants have been proposed by Chávez et al. (2016), Escobar & Linfati (2012), Escobar (2014), Escobar et al. (2013), Escobar et al. (2014a), Escobar et al. (2014b) and Escobar et al. (2015).
In order to reduce the number of empty travels performed by each vehicle, the idea of pick-up and delivery of goods has been considered in the literature (Lu & Dessouky, 2004). However, this consideration requires special attention to the handling of cargo inside the vehicles. Therefore, a smart design of corridors to allow the easy access to all the products stored in the vehicles should be required. One of the variants of the VRP considers that each vehicle must deliver all cargo until it is empty. Then, each vehicle may travel to the nodes for which the demand of the collected products exist in order to transport these products to the starting point of the route (Deif & Bodin, 1984). This kind of problem is known as Vehicle Routing Problem with Backhauling (VRPB).
In this paper, we propose a heuristic algorithm based on a Tabu Search Approach for solving the VRPB. The proposed algorithm considers intensification of local information and the proper exploitation of local search procedures combined with exploratory stochastic strategies. The solution strategy considers the design of separate routes for both delivery and collection of goods. In order to find high quality solutions the algorithm tries to find the best sequence of customers for each route. Additionally, the best connection among linehaul routes and backhaul routes have been performed. The proposed methodology is implemented and tested on well-known instances from the literature (Mingozzi et al., 1999;Toth & Vigo, 1999a, 1999b. The proposed algorithm obtains good quality solutions in short computing times.

Mathematical model for the VRPB
The VRPB could be modeled by the formulation of a binary programming model, as described in Baldacci et al. (1999). The formulation is described bellow: let be the set of customers with the requirement of products from the depot (Linehauling), and be the set of customers with the requirement of collection of products (Backhauling). Let us define the set of feasible routes and . Each route ∈ only contains nodes belonging to , and it starts at the depot and finishes at a given linehaul customer. On the other hand, each route ∈ only contains customers belonging to , starts at a given backhaul customer and ends at the depot. In addition, let be the set of routes on , which cross the customer ∈ ; and be the set of routes on , which finish at customer ∈ . Furthermore, denotes the set of routes in passing through the customer ∈ , while considers the set of routes of , which finish at customer ∈ . Finally, let consider be the set of the edges, which allow joining the customer ∈ and the customer ∈ . The goal of the VRPB is to determine the routes to be performed in order to fulfill the requirements of the customers with the minimum traveling cost. Each customer must be visited exactly once by a single route and the total demand of each route must not exceed the vehicle capacity .
In the following formulation, three types of binary variables are considered. is equal to1, if the route ∈ is selected as part of the solution; otherwise assumes the value of 0. takes the value of 1, if the route ∈ is selected as part of the solution; otherwise takes the value of 0. Finally, assumes the value of 1 if the edge connecting ∈ with the route ∈ belongs to the solution, and 0 otherwise. The mathematical model for the VRPB is formulated by equations (1) - (7), where is the number of available homogeneous vehicles at the depot; _ is the overall cost of the route ∈ , _ is the overall cost of the route ∈ , and _ is the cost of traveling through the edge , ∈ which connects the node ∈ with the node ∈ .

Proposed algorithm based on Tabu Search
The mathematical model described by Eqs.
(1-7) could be solved efficiently by using exact methods when the number of customers in the system is relatively small. If the number of customers to be fulfilled is increased, then the space of solution grows exponentially. In these cases, the implementation of approximation algorithms (heuristics or metaheuristics) could be a good option to solve the VRPB. In fact, these types of approaches reduce the complexity of the search process based on optimality conditions (Baldacci et al. 1999). In particular, we have applied an algorithm based on Tabu Search heuristic (Glover, 1989) to solve the VRPB. The Tabu Search (TS) is characterized by solving complex combinatorial optimization problems by using local search criteria. For this reason TS is also known as a neighborhood-based approach.  Similarly, the position with 1,2, . . , and 1,2, . . , , stores the customer to be visited at the turn l by the route j. Furthermore, determines the number of customers to be served by the backhaul route . Finally, the position stores the index of the backhaul route that is merging with the linehaul route . If assumes a zero value then the vehicle in the route i return to the depot without serving any pickup demand. Such case only happen when .

Initial Solution
The initial solution for the proposed algorithm is obtained by a constructive approach based on the nearest neighborhood, i.e. the lower distance to the current location. Hence, starting from the depot, each route receives the customer with the lower distance to the depot among the customers not assigned yet. This rules is sequentially repeated until all delivery customers have been assigned. However, the distance to be considered is the lower distance to the last customer belonging to the current route. Then, backhaul customers are connected to the last linehaul customer for each route. At this point, backhaul customer could be assigned to the route. Finally, when all customers have been assigned, the routes are connected to the depot.

Neighborhood Criteria
Given a solution X, the algorithm moves to a new solution into the neighborhood of X, denoted as . The neighborhood is created by slight variations in the attributes of , which follow predefined rules of generation of movements. In the proposed algorithm, three different neighborhoods are considered. They are shown in Figure 2 to Figure 4, where a series of continuous lines indicate the new edges added to the solution as a consequence of the movement. On the contrary, the removed edges have been indicated by dashed lines.
 Insertion move: A customer is relocated to another position belonging either to the same route or to a different route. If the customer has delivery demand then the relocation is only performed between Linehaul routes. Otherwise, if the customer has recollection demand, the relocation is only performed between Backhaul routes. The Figure 2 shows an example of Insertion move.

Tabu List Design
The Tabu search algorithm defines a list of attributes in order to prevent the exploration to solutions that have already been visited during the search. In particular, we have defined an attribute as a vector of three positions to store the sequence of customer which linked to the moved customer, i.e. the previous one already visited, the moved customer, and the next customer to be served. In Figure 3, for example, the swap move on the same route is performed by permuting the customers and . In such case two attributes would be tested: , , and , , .
Let us define a matrix , with x x dimensions, to identify all the possible attributes that could be obtained from the problem. This matrix could be used to represent generically the Tabu List of the algorithm, as the values stored in each position determine the iteration in which an attribute were accepted, i.e. the iteration which the movement to generate the attribute were performed. If the movement was recently removed from the solution then it is banned and other movement must be checked. Thus, the criterion for acceptance or rejection of any movement is stated by the rule described in (8), where is the position of the matrix TL defined by the components stored in the vector of attribute A. Then, given a determined number of iterations ( ), the stored attributes are released and could be considered for the new solutions.

∨ (8)
Once the movement is selected to be performed, the components of the matrix TL to be updated are the positions defined by the attributes already removed from the solution. For example, in the Figure 3, the attributes , , , and , , are updated to the value of the current iteration. So, they only could be accepted again when NTabu additional iterations were performed. The proposed approach to validate the movements enables a fast checking of the attributes already banned. However it increases the memory requirements in the Tabu List of the algorithm. This fact did not spoil the global execution of the approach, as we have proven in the next section

Criterion for acceleration of convergence
The proposed algorithm tries to evaluate intensively small regions in the space of solutions and to determine the next region to be explored. In theory, the algorithm shall move from solution to another solution only if improves the objective function. However, the neighborhood could not Linehaul routes Backhaul routes produce any improvement of the objective function. In order to avoid local stagnation, the algorithm could accept some level of degradation in the quality of solution. In the proposed approach, the level of degradation to be expected is controlled by a dynamic factor calculated through the equation (9), where is the number of iterations with no improvement in the quality of the global solution (i.e. the incumbent), with a limit of iterations given by the parameter _ _ . Similarly, is the counter of iterations of the algorithm, as the maximum of iterations have been set with parameter _ . On the other hand, is a parameter to be optimized in accordance with the instance.
The factor speeds up the convergence of the algorithm when the approach is closing up to the iteration bound. On the other hand, the same factor enables the degradation of the objective function when several iteration have been performed since the last updating of the incumbent. Hence, the exploration is favored at the initial phase of the algorithm, and the exploitation is reinforced in the final phase. such that it improves the value of the objective function times a factor , and the attributes needed to reach the solution from are not prohibited in the Tabu List. However, the aspiration criterion considers the change in the current solution when the current incumbent is improved by , even with banned attributes. The best solution found by the algorithm is stored in X . The convergence criterion of the algorithm is determined by the number of iterations _ _ and _ .

Computational results
The proposed algorithm has been implemented in Delphi 7.0, and its performance has been evaluated by considering benchmark instances for the VRPB proposed by Baldacci et al. (1999) and Toth & Vigo (1999b). For each instance, we have performed 100 executions in order to obtain the average of both the execution time and the objective function, as well as the standard deviation of the results. In order to obtain results through the proposed approach, the parameters were set as: 20, _ _ 2000 , _ 10000, and 5. Theses parameter were fixed for all the executions and the total of instances. The results have been compared with a heuristic algorithm showed by Toth and Vigo (1999a). In addition, the results obtained by the exact algorithm proposed by Deif and Bodin (1984) has been used, as this reference matches the results in the lowest computational requirements. Hence, Table 1 shows the results obtained over the considered instances. The first columns (Instance, NL, NB, kL, kB) describe the characteristics of the instances. The CPU used for the proposed algorithm is AMD10 processor with 2.3 GHz and 8 MB of RAM.  Fig. 6 shows the convergence of the algorithm during one execution of the algorithm at the instance IEL2380A. The first stage of the algorithm is featured by exploration, and high degradation of the objective function is permitted. This procedure enables to getting out from stagnation on local suboptimal. Otherwise, at the final stage, the degradation is highly controlled and the convergence is accelerated. Fig. 6. Behavior of convergence of the algorithm. Instance evaluated EIL2380A

Concluding remarks
In this paper, an effective heuristic algorithm based on a Tabu Search has been proposed for the VRPB. The main goal was to find a set of routes by considering that the backhaul customers must be served only when the linehaul routes are performed. The results obtained over the benchmarking instances show the effectiveness of the proposed algorithm. The value of the objective function obtained in 14 instances are close to those obtained by Toth and Vigo (1999a), worsen as much as 5%. In fact, the average ratio in the objective function, considering all the instances, was lower than 10% compared with the benchmark. However, the average time required was just 70% of that shown by the algorithm proposed byDeif and Bodin (1984). The low time requirements exposed by the proposed algorithm could be applied to different variants of the VRPB, such as time windows, stochastic elements, multiple vehicle capacity, among others.
The algorithm has exhibited a poor performance as the size of the problem was increased. It means that additional amends are needed in order to enhance the quality of the algorithm. On the other hand, the impact of the factor needs a complete examination in order to optimize their value for the overall instances. In addition, other diversification strategies could be applied in order to explore new parts of the space of solutions. These aspects may lead to better quality results and prevent the stagnation on suboptimal solutions.