A hybrid heuristic based on General Variable Neighborhood Search for the Single Vehicle Routing Problem with Deliveries and Selective Pickups

A hybrid heuristic based on General Variable Neighborhood Search for the Single Vehicle Routing Problem with Deliveries and Selective Pickups

Available online at www.sciencedirect.com Electronic Notes in Discrete Mathematics 39 (2012) 99–106 www.elsevier.com/locate/endm A hybrid heuristic ...

259KB Sizes 1 Downloads 130 Views

Available online at www.sciencedirect.com

Electronic Notes in Discrete Mathematics 39 (2012) 99–106 www.elsevier.com/locate/endm

A hybrid heuristic based on General Variable Neighborhood Search for the Single Vehicle Routing Problem with Deliveries and Selective Pickups I. M. Coelhoa, 1,2 P. L. A. Munhoza, 2 M. N. Haddada, 2 M. J. F. Souzab, 2 L. S. Ochia, 2 a Fluminense Federal University, Niter´ oi, RJ, 24210-240, Brazil b Federal University of Ouro Preto, Ouro Preto, MG, 35400-000, Brazil

Abstract In the Single Vehicle Routing Problem with Deliveries and Selective Pickups (SVRPDSP) deliveries have to be made to a set of customers and there are also pickup goods to be collected. Although pickups are not obligatory, there is a revenue associated with them. Practical applications of this optimization problem arise in reverse logistics, in which customers return goods back to the depot such as in postal logistics. The SVRPDSP is a N P-hard problem, once it can be reduced to the Traveling Salesman Problem when there aren’t any pickups to be made. To solve the problem at hand we propose a hybrid heuristic algorithm, named HGVNS, inspired on the metaheuristic General Variable Neighborhood Search combined with an initial solution generation by means of exact methods. The results show that HGVNS is able to find near optimal solutions and, on average, it performs better than the best known algorithm in literature. Keywords: Single Vehicle Routing Problem with Deliveries and Selective Pickups, General Variable Neighborhood Search, Hybrid Metaheuristics

1571-0653/$ – see front matter © 2012 Elsevier B.V. All rights reserved. doi:10.1016/j.endm.2012.10.014

100

1

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

Introduction

Many problems of vehicle routing have already attracted the research attention over the last decades due to its great practical importance. However, this class of problems still provides a computational challenge in order to find good quality solutions in low computational time. In this work we focus on the Single Vehicle Routing Problem with Deliveries and Selective Pickups (SVRPDSP) in which a single vehicle has to deliver goods and collect other goods from the customers. Both pickup and delivery demands are associated with each customer, nonetheless, it is not required that all pickup demands are satisfied. The SVRPDSP appears in practical applications where the customers have to send back goods to the depot, in reverse logistics operations. The SVRPDSP is a N P-hard problem once it includes the Traveling Salesman Problem (TSP) as a special case when no pickups are required. For this reason, finding the optimal solution to a SVRPDSP using pure exact methods can be computationally infeasible for large-sized problems. Although metaheuristics have proven to provide effective near optimal solutions to the class of Vehicle Routing Problems, relatively little research has been developed using metaheuristics to solve the problem at hand. In this paper, we present a new approach to address the SVRPDSP. Our algorithm, called Hybrid General Variable Neighborhood Search (HGVNS), solves the problem by means of a heuristic inspired in the General Variable Neighborhood Search (GVNS) metaheuristic. The GVNS combines random moves and improving local searches based on systematic changes of multiple neighborhoods. Our results show that the proposed heuristic is able to find near optimal solutions. However, the proposed heuristic strongly depends on the quality of the initial solutions, so a hybrid approach with mathematical programming was developed to find good initial solutions. The idea is to find optimal solutions to the delivery and pickup customers separately and then merge the two solutions in order to create an initial solution to the complete problem. Results show that the hybrid heuristic performs better on average than the best known algorithm in the literature. The remainder of this paper is organized as following. In the next section, we review the previous work in SVRPDSP and present a description of General 1

The authors acknowledge the support from the Brazilian agencies CAPES, CNPq, FAPERJ and FAPEMIG 2 Email: [email protected], [email protected], [email protected], [email protected] and [email protected]

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

101

Variable Neighborhood Search metaheuristic. In Section 3, we describe the hybrid algorithm HGVNS for the problem in focus. In Section 4, we report our experimental results. Section 5 presents the conclusions and future research plans.

2

Related Work

In terms of the problem addressed in this paper, SVRPDSP, relatively little research has been conducted in this direction. A broad summary of recent heuristics for and also parallel algorithms for the Vehicle Routing Problem is given in [5]. The difference from the classic Vehicle Routing Problem is that in SVRPDSP there is a single vehicle (one single route) and there are also pickup customers that optionally return pickup goods back to the depot, if the vehicle capacity is not exceeded. If a pickup is made then a revenue is gained. The objective function is to minimize the total traveled distance also subtracting the gains from the pickups. The SVRPDSP was proposed by [6] and solved by a mixed-integer model with improvement techniques aimed at increasing computational tractability. The work by [1] also proposed a mixed integer linear programming formulation together with classical construction and improvement heuristics, as well as a tabu search heuristic. In [2] is proposed a new mathematical programming model with a branch-and-cut algorithm for the problem and compared to the exact algorithm presented in [6]. The HGVNS algorithm proposed in this paper performs better on average than the algorithm presented in [1] and it is capable of finding near optimal solutions for the SVRPDSP.

3

Hybrid General Variable Neighborhood Search

The algorithm we propose here to solve the SVRPDSP is called Hybrid General Variable Neighborhood Search (HGVNS). It is based on the metaheuristic General Variable Neighborhood Search (GVNS), that uses the local search method called Variable Neighborhood Descent (VND). The idea of the algorithm is to escape from local optima trap by changing the neighborhood structure. It explores neighbors that are distant from the current solution, and jumps to a new solution if an improvement has been made. Recent successful applications of GVNS can be found in [3] and [4]. In this problem the customers have both delivery and pickup demands, so the proposed algorithm divides each one of them in two different customers with the same geographic position. The delivery customers are numbered from

102

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

1 to n and the pickup customers from n+1 to 2n. This way, every customer ci is duplicated into two customers: a customer ci for delivery and a customer ci+n for pickup. A solution to the SVRPDSP consists of a permutation of the delivery and pickup customers. The route starts and ends with a depot (value 0) and all delivery customers must be inside the route. If a customer ci precedes a customer cj , then there is an arc connecting ci to cj . Figure 1 depicts a valid solution S to this problem with 5 delivery and pickup customers.

Fig. 1. Solution S = [0 2 5 10 3 1 6 4 9 7 0] to a SVRPDSP with 5 delivery and pickup customers

In SVRPDSP the vehicle can visit a customer for a delivery and then visit it again for a pickup when the vehicle is less loaded, therefore non-hamiltonian cycles are also allowed. In fact, the authors of [1] show that in this problem non-hamiltonian solutions achieve better objective function values than pure hamiltonian solutions. The evaluation of a solution is based on the costs provided by a cost matrix C, where C(ci , cj ) corresponds to the cost of traveling from customer ci to the next customer cj ; D(ci ) and P (ci ) are delivery and pickup demands (if ci ≤ n then P (ci ) = 0, otherwise D(ci ) = 0); R(ci ) is the revenue associated to a pickup on customer ci (if ci ≤ n then R(ci ) = 0); and finally, Q(ci ) is a vector that contains the accumulated load of the vehicle at the visit to customer ci , that is Q(ci ) = Q(ci−1 ) − D(ci ) + P (ci ). The solution is feasible if the value of Q(ci ) does not exceed the vehicle capacity K for every visited customer. Eq. 1 defines the evaluation function of the problem.   (1) C(ci , cj ) − R(ci ) (ci ,cj )∈S

ci ∈S, ci =0

The HGVNS algorithm is presented in Algorithm 1. The algorithm starts

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

103

by creating an initial solution to the problem. This is done by computing solutions to smaller problems (a TSP with only with delivery customers and a Knapsack problem with only pickup customers 1 ), merging these solutions and performing a local search generating s∗ . The core of HGVNS is to perform local searches on the current solution using the VND method. In VND, different neighborhoods are explored in a specific order, from the fastest to evaluate to the slower ones. The process iterates while a best improvement heuristic finds a better solution in the current neighborhood. Before doing the local search, the algorithm performs p perturbation steps in order to diversify the solution and effectively escape from local optima. In the perturbation step, the algorithm randomly chooses one neighborhood and applies a move on the current solution. After iterMax iterations are performed without improvements, more perturbation steps are executed in order to generate more distant neighborhoods. In HGVNS, the following neighborhoods are used as perturbations: Swap – Permutation between two customers. 2-Opt – Two nonadjacent arcs are removed and another two are added to form a new route. 1Or-Opt – One customer is removed from the current solution and inserted in another position of the solution. 2Or-Opt – Two consecutive customers are removed from the current solution and inserted in another position of the solution. In order to improve the current solution s, in VND all neighbors s are explored, and since this process has the most expensive computational cost, only the most promising neighborhoods are used (in this order): Swap, 1Oropt and 2Or-opt, defined as NS 1 , NS 2 and NS 3 , respectively. Algorithm 1 HGVNS 1: 2: 3: 4: 5: 6: 7: 8: 9: 1

s0 ← Merge (TSP(delivery) + Knapsack(pickup)) s∗ ← VND(s0 ); p ← 0; while p < pM ax do iter ← 0; while iter < iterM ax do s ← s∗ ; for (v = 1 to p + 2) do k ← SelectRandomNeighborhood();

The TSP and Knapsack problems are computed using well-known solvers

104

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

10: s ← Shake(s , k); 11: end for 12: for (k = 1 to 3) do 13: // VND main loop 14: Q ← sum of load values for every customer in s 15: (ci , cj , minCost) ← BestImprovement(s, Q, N S k ); 16: if (minCost < cost of s ) then 17: s” ← Apply the best move (customers ci and cj ) of N S k in s ; 18: s ← s”; 19: k ← 1; 20: end if 21: end for 22: if (cost of s < cost of s∗ ) then 23: s∗ ← s ; 24: p ← 0; 25: iter ← 0; 26: else 27: iter ← iter + 1; 28: end if 29: end while 30: p ← p + 1; 31: end while

4

Experimental Results

In this section we evaluate the performance and the quality of the solutions generated by HGVNS. Our main experimental platform is composed of a CPU Intel i7 2.67 GHz, with 8 GB of memory (only one CPU core was used). HGVNS was implemented in C++ with the framework OptFrame 1.4 2 . The algorithms were tested on 68 problem instances taken from [1] divided into four groups of 17 problems, named p two, half , one and two. The quality of the solution produced by HGVNS depends on the values of the parameters iterMax (maximum number of iterations without improvements), and pMax (maximum number of perturbations). These parameters were set after some preliminary experiments as iterMax = N/2 and +95 pMax = 1.53×N , where N is the total number of customers, that is N/2 N = 2n. These parameter values were set identically for all executions. With these settings, we estimated that there are enough iterations and perturbations 2

OptFrame is available at http://sourceforge.net/projects/optframe/

105

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

to produce good solutions to the problem. In order to evaluate how good the solutions produced by HGVNS are, we compare them with a lower bound of the problem. The goal of the SVRPDSP solution is to minimize the cost of the route and to maximize the benefits of the pickups. So, an optimal solution to the TSP provides a lower bound on the cost of the route, while an optimal solution to the Knapsack problem provides an upper bound on the revenues of the pickups. The measures of the quality of solution are the same as [1], named cost gap (cgap) and revenue gap (rgap). Eq. (2) defines the cost gap cgap, that is the gap from the best solution tour size cost and the lower bound on the tour size c∗ of the associated TSP problem. Eq. (3) defines the revenue gap rgap, that is the gap from the best solution pickup value revenue and the upper bound on the revenue r ∗ of the associated Knapsack problem. (cost − c∗ ) c gap = (2) c∗ ∗ (r − revenue) (3) r gap = r∗ Table 1 shows the cgap and rgap values obtained by HGVNS, compared with the values obtained by the Tabu Search algorithm proposed in [1]. As we can observe in this table, the average cgap results obtained by HGVNS were better than the best results obtained in the literature, showing that the algorithm is capable of finding tours with total traveled distance near the lower bound c∗ . In terms of the metric rgap the proposed algorithm also performed better than literature. These results confirm that HGVNS obtained good quality solutions for the SVRPDSP. The results reported in this table were obtained by the average of 30 executions for each problem instance. Table 1 Comparison of cgap(%) and rgap(%) with [1] for each problem group p two

half

one

two

Average

cgap

rgap

cgap

rgap

cgap

rgap

cgap

rgap

cgap(%)

rgap(%)

Tabu Search [1]

2.94

1.06

2.83

0.27

4.42

0.09

5.92

0.03

4.03

0.36

This work

1.10

0.97

0.52

0.22

1.40

0.05

1.44

0.03

1.11

0.32

5

Conclusions

In this work, we presented a new algorithm called HGVNS inspired on the metaheuristic General Variable Neighborhood Search to deal with the Single Vehi-

106

I.M. Coelho et al. / Electronic Notes in Discrete Mathematics 39 (2012) 99–106

cle Routing Problem with Deliveries and Selective Pickups. Since the problem belong to the N P-hard class, once it can be reduced to the classic Traveling Salesman Problem when there aren’t any pickups to be made, we propose a hybrid heuristic algorithm, starting from good quality initial solutions based on a lower bound of the problem. To validade the proposed algorithm, it was tested over a set of 68 problem instances from literature. According to empirical results, HGVNS is a robust algorithm since its variability is very low. It was compared to literature considering cgap and rgap metrics and HGVNS performed better than literature in both metrics.

Acknowledgment The authors acknowledge the support from the Brazilian agencies CAPES, CNPq and FAPERJ.

References [1] Gribkovskaia, I., G. Laporte and A. Shyshou, The single vehicle routing problem with deliveries and selective pickups, Computers & Operations Research 35 (2008), pp. 2908 – 2924. [2] Guti´errez-Jarpa, G., V. Marianov and C. Obreque, A single vehicle routing problem with fixed delivery and optional collections, IIE Transactions 41 (2009), pp. 1067–1079. URL http://www.tandfonline.com/doi/abs/10.1080/07408170903113771 [3] Hansen, P., N. Mladenovi´c and J. M. P´erez, Variable neighborhood search: methods and applications, 4OR: Quarterly journal of the Belgian, French and Italian operations research societies 6 (2008), pp. 319–360. [4] Hansen, P., N. Mladenovi´c and J. M. P´erez, Variable neighbourhood search: methods andapplications, Annals of Operations Research 175 (2010), pp. 367– 407, 10.1007/s10479-009-0657-6. URL http://dx.doi.org/10.1007/s10479-009-0657-6 [5] Subramanian, A., L. Drummond, C. Bentes, L. Ochi and R. Farias, A parallel heuristic for the vehicle routing problem with simultaneous pickup and delivery, Computers & Operations Research 37 (2010), pp. 1899 – 1911. [6] Sural, H. and J. H. Bookbinder, The single-vehicle routing problem with unrestricted backhauls, Networks 41 (2003), pp. 127–136.