A Hybrid Heuristic Approach to Solve the Capacitated ...

59 downloads 32 Views 102KB Size Report
Université de Technologie de Belfort-Montbéliard 90010 Belfort cedex, France tel/fax : +33384583354 ... L is the length of the tour produced by the bestant. 1. ... (Dorigo et al., 1999), the Vehicle Routing Problem (Bullnheimer et al.,. 1999a) ..... in research and engineering development at Osiatis engineering, France.
Journal of Artificial Intelligence: Theory and Application (Vol.1-2010/Iss.1) Bouhafs et al. / A Hybrid Heuristic Approach to Solve the Capacitated ... / pp. 31-34

A Hybrid Heuristic Approach to Solve the Capacitated Vehicle Routing Problem Lyamine Bouhafs*, Amir Hajjam*, Abder Koukam* *Laboratoire Systèmes et Transports, Équipe Systèmes Multi-Agents, Université de Technologie de Belfort-Montbéliard 90010 Belfort cedex, France tel/fax : +33384583354 e-mail : [email protected], [email protected], [email protected] Submitted: 19/01/2010 Accepted: 11/02/2010 Appeared: 16/02/2010 HyperSciences.Publisher

Abstract — In this paper, we propose a hybrid approach for solving the capacitated vehicle routing problem. We combine an Ant Colony System (ACS) algorithm with a Savings algorithm and, then, we improve solutions by a local search heuristic. The Ant Colony System is a distributed system that combines an adaptive memory with a local heuristic search function to repeatedly construct solutions of hard combinatorial optimization problems. The results of experimentations show that this approach is competitive with the other classic heuristics.

Keywords: Optimization, Ant Colony, Routing Problem, Hybrid Heuristic

∆τ ij = τ 0 the initial pheromone trail.

NOMENCLATURE

V = {v0 , v1 , v 2 ,..., v n } is a set of vertices

{

}

∆τ ij which is equal to1 / L*

A = (vi , v j ) : i ≠ j is a set of arcs. Vertex

L* is the length of the tour produced by the best ant.

v0 denotes the depot, the other vertices of V represent cities

or customers

1. INTRODUCTION

Nonnegative weights

d ij , which are associated with each

The Vehicle Routing Problem (VRP) is a class of well-known NPhard combinatorial optimisation problems. The VRP is concerned with the design of the optimal routes used by a fleet of identical vehicles stationed at a central depot to serve a set of customers with known demands. In the basic version of the problem, known as Capacitated VRP (CVRP), only the capacity restrictions for the vehicles are considered and the objective is to minimize the total cost (or length) of the routes. All the itineraries start and end at the depot and they must be designed in such a way that each customer is served only once and just by one vehicle. Due to its theoretical and practical interest (it has numerous real world applications, given that distribution is a major part of logistics and a substantial cost for many companies), the VRP has received a great amount of attention since its proposal in the 1950’s.

arc (vi , v j ) , represent the distance (or the travel time or the cost) between

vi and v j

For each customer

vi a nonnegative demand q i and a nonnegative

service time δ i is given (q 0 = 0, δ 0 = 0)

q is a random number uniformly distributed in [0, ..., 1]

q 0 is a parameter (0 ≤ q 0 ≤ 1)

τ ij

is the pheromone associated with arc (i, j)

η ij is the heuristic desirability, known as visibility, and is the local heuristic function which is the inverse of the distance between customer i and j

Due to the nature of the problem, it is not viable to use exact methods for large instances of the VRP (for instances with few nodes, the branch and bound technique (Desrosiers et al., 1999) is well suited and gives the best possible solution). Therefore, most approaches rely on heuristics that provide approximate solutions. Some specific methods have been developed to this problem (Thanghia et al., 1996), (Prosser et al., 1997). Another option is to apply standard optimization techniques, such as tabu search (Tan et al., 2000) (Bouhafs et al., 2008), simulated annealing (Bouhafs et al., 2006) (Bent et al., 2001) (Shaw et al., 1998) constraint programming (Francisco et al., 2002), genetic algorithms (Francisco et al., 2002) and ant systems.

f and g are two parameters Fk is the set of feasible customers that remain to be visited by ant k and α , β and λ are a parameters which determine the relative importance of the trails, distance and the savings heuristic, respectively.

ρ

is the pheromone decay parameter (0 < ρ < 1)

Copyright © 2010 HyperSciences_Publisher. All rights reserved

31

www.hypersciences.org

Journal of Artificial Intelligence: Theory and Application (Vol.1-2010/Iss.1) Bouhafs et al. / A Hybrid Heuristic Approach to Solve the Capacitated ... / pp. 31-34

The Ant System, introduced by. (Dorigo et al., 1996) (Dorigo et al., 1999), is a new distributed meta-heuristic for hard combinatorial optimization problems and was first used on the well known Travelling Salesman Problem (TSP). The Ant Colony Optimization is based on the behaviour of real ants searching for food. Real ants communicate with each other using an aromatic essence called pheromone, which they leave on the paths they traverse. If ants sense pheromone in their vicinity, they are likely to follow that pheromone, thus reinforcing this path. The pheromone trails reflect the ’memory’ of the ant population. The quantity of the pheromone deposited on paths depends on both, the length of the paths as well as the quality of the food source found.

Ant Colony System known as the ACS algorithm used successfully to solve the TSP (Dorigo et al., 1997a) . 3. THE HYBRID ANT COLONY SYSTEM FOR THE CVRP In this section we describe the algorithm based on the Ant Colony System and the Savings algorithm. 3.1 Construction of vehicle routes Initially, m ants are positioned on n customers randomly and initial pheromone trail levels are applied to arcs. In order to solve the CVRP, artificial ants construct solutions by successively choosing a customer to visit, continuing until each customer has been visited. When constructing routes if all remaining choices would result in an infeasible solution due to vehicle capacity being exceeded then the depot is chosen and a new route is started. Ants choose the next city to visit using a combination of heuristic and pheromone information. During the construction of a route the ant modifies the amount of pheromone on the chosen arc by applying a local updating rule. Once all ants have constructed their tours then the amount of pheromone on arcs belonging to the best solution, as well as the global best solution, are updated according to the global updating rule.

In artificial terms the optimization method uses the trail following behaviour described above in the following way. Ants construct solutions by making a number of decisions probabilistically. In the beginning there is no collective memory, and the ants can only follow some local information. As some ants have constructed solutions, pheromone information is built. In particular, the quantity of pheromone deposited by the artificial ants depends on the solution quality found by the ants. This pheromone information guides other ants in their decision making, i.e. paths with high pheromone concentration will attract more ants than paths with low pheromone concentration. On the other hand, the pheromone deposited is not permanent, but rather evaporates over time. Thus, over time, paths that are not used will become less and less attractive, while those used frequently will attract ever more ants.

The probabilistic rule used to construct routes is as follows. Ant k positioned on node i chooses the next customer j to visit with probability pk(i, j) given in Equation (1).

This approach has been applied to a number of combinatorial optimization problems, such as the Graph Coloring Problem, the Quadratic Assignment Problem, the Travelling Salesman Problem (Dorigo et al., 1999), the Vehicle Routing Problem (Bullnheimer et al., 1999a) (Bullnheimer et al., 1999b) (Chia-Ho et al., 2006) and the Vehicle Routing Problem with Time Windows (Gambardelle et al., 1999). In the previous approach for the VRP (Dorigo et al., 1996), the Savings algorithm is combined with the basic Ant System. In our approach we combine the Savings algorithm with the Ant Colony System algorithm (ACS) which is derived from Ant System.

{[ ] [ ] [ ] }

arg max τ ij α . ηij β . γ ij λ if q ≤ q 0 ,j ∈ Fk  τ ij α . ηij β . γ ij λ  p k (i, j ) =  if q > q 0 ,j ∈ Fk (1) α β λ  ∑u∈Fk [τ iu ] .[ηiu ] .[γ iu ] 0 otherwise  The selection probability is then further extended by problem specific information. There, the inclusion of savings leads to better results. The saving function (Paessens et al., 1998) is represented by

[ ][ ] [ ]

γ ij = d i 0 + d 0 j − g.d ij + f . d i 0 − d 0 j The parameter

q 0 determines the relative importance of exploitation

against exploration. Before an ant selects the next customer to visit the random number q is generated. If q ≤ q 0 then exploitation is

The remainder of this paper is organized as follows: In the next section we briefly describe the Capacitated Vehicle Routing Problem prior to introducing our approach. Then, we will report on computational results. In Section 5 we conclude with a discussion on our findings.

encouraged, whereas q ≻ q0 encourages biased exploration. 3.2 Update pheromone trail

2. THE CAPACITATED VEHICLE ROUTING PROBLEM

While an ant is building its solution, the pheromone level on each arc (i, j) that is visited is updated according to the local updating rule given in Equation (2). τ ij = (1 − ρ ) + ρ .∆τ ij (2)

The Capacitated Vehicle Routing Problem (CVRP) can be represented by a complete weighted directed graph. The objective sought is to find minimum cost vehicle routes assuming: • Every customer is visited exactly once by exactly one vehicle, • All vehicle routes begin and end at the depot, • For every vehicle route the total demand does not exceed the vehicle capacity Q .

Once all ants have built their tours then the global updating rule is applied. In the ACS method only the globally best ant is allowed to deposit pheromone in an attempt to guide the search. The global updating rule is given in the Equation (3).

τ ij new = (1 − ρ )τ ij old + ρ∆τ ij

(3)

Initially one ant is placed at each customer. After the ant system is initialised, the steps detailed above are repeated for a given number of

The CVRP is closely related to the TSP, we base our method upon the

32

Journal of Artificial Intelligence: Theory and Application (Vol.1-2010/Iss.1) Bouhafs et al. / A Hybrid Heuristic Approach to Solve the Capacitated ... / pp. 31-34

REFERENCES

iterations. Once each ant has produced a set of routes the local optimizer 2-opt is applied to improve the solutions if possible. The proposed algorithm can be described by the schematic given in Fig.1.

Bent, R. and Hentenryck, P. V. (2001). A Two-Stage Hybrid Local Search for the Vehicle Routing Problem with Time Windows, Technical Desrosiers, J., Madsen, O., Solomon, M. and Soumis, F. (1999). 2-Path Cuts for the Vehicle Routing Problem with Time Windows, Transportation Science, Vol. 33, No. 1, pp. 101-116. Bouhafs, Hajjam, A Koukam (2008) A Tabu Search and Ant Colony System Approach for the Capacitated Location-Routing Problem, SNPD 2008, pp. 46-50. Bouhafs, A Hajjam, A Koukam (2006) A Combination of Simulated Annealing and Ant Colony System for the Capacitated LocationRouting Problem, In LNCS Lecture Notes in Computer Science, Knowledge-Based Intelligent Information and Engeneering Systems, vol. 4251/2006, ISBN 978-3-540-46535-5, Springer. Report, CS-01-06, Brown University. Bullnheimer, B., Hartl, R. F. and Strauss, Ch.(1999a), Applying the ant system to the vehicle routing problem. In: Voss, S., Martello, S., Osman, I. H. and Roucairol, C. (Eds.), Meta-Heuristics: Advances and Trends in Local Search Paradigms for Optimization,. Kluwer, Boston. Bullnheimer, B., Hartl, R. F. and Strauss, Ch.(1999b), An improved ant system algorithm for the vehicle routing problem, Annals of Operations Research 89, pp.319–328 Chia-Ho Chen and Ching-Jung Ting (2006), An Improved Ant Colony System Algorithm for the Vehicle Routing Problem, Journal of the Chinese Institute of Industrial Engineers, 23, pp. 115-126. Dorigo, V. Maniezzo, and A. Colorni. (1996), Ant system: Optimization by a Colony of Cooperating Agents, IEEE Trans. Sys., Man, Cybernetics 26 1, pp. 29-41. Dorigo and L. Gambardella (1997a), Ant Colony System: A Cooperative Learning Approach to the Travelling Salesman Problem, IEEE Transactions on Evolutionary Computation, 1(1), pp.53–66. Dorigo, M. and Gambardella, L. M.(1997b), Ant Colony System: A cooperative learning approach to the Travelling Salesman Problem,. IEEE Transactions on Evolutionary Computation 1(1) , pp. 53–66. Prosser, P. and Shaw, P. (1997). Study of Greedy Search with Multiple Improvement Heuristics for Vehicle Routing Problems, Technical Report RR/96/201, Department of Computer Science, University of Strathclyde, Glasgow. Dorigo, G. Di Caro, L.M. Gambardella. (1999), Ant algorithms for discrete optimization. In Artificial Life 5, pp. 137–172. Francisco B. Pereira, Jorge Tavares, Penousal Machado, Ernesto Costa (2002), "GVR: a New Genetic Representation for the Vehicle Routing Problem", in Proc. of the 13th Irish Conference on AICS Artificial Intelligence and Cognitive Science, Limerick, pp. 95-102. Gambardella, L. M., Taillard, E. and Agazzi, G. (1999), MACSVRPTW: A Multiple Ant Colony System for Vehicle Routing Problems with Time Windows. In: Corne, D., Dorigo, M. and Glover, F. (Eds.), NewIdeas in Optimization, McGraw-Hill, London. Paessens (1998), The savings algorithm for the vehicle routing problem, Eur. J. Oper. Res. 34(1988)336. Shaw, P. (1998). Using Constraint Programming and Local Search Methods to Solve Vehicle Routing Problems, Proceedings of the Fourth International Conference on Principles and Practice of

1 Initialise 2 For I max itération do : (a) For all ants generate a new solution using Formula (1) and the savings heuristic. (b) Update the pheromone trails using Formula (2) (Local updating) (c) Improve all vehicle routes using 2-opt-heuristic (d) Update the pheromone trails using Formula (3) (Global updating) Fig.1. Hybrid ant colony system for the CVRP 4. COMPUTATIONAL EXPERIENCE The set of test problems correspond to the CVRP instances proposed by Augerat and al., Eilon et al. For the setting parameters we use n-1 artificial ants, α = β = λ = 5 , ρ = 0.1 , q 0 = 0.9 , f=g=2 (for the savings function). Table 1 gives the computational results for the test problems obtained by our approach. For each problem the columns give the name of problem, the size n and the capacity Q. In the last two columns the best solutions obtained with our approach (denoted by HACS) are compared to the best published solutions (denoted by Best pub.). Table 1. The test results for the HACS approach (D- The total distance travelled; V- Number of vehicle needed). The best known solutions are marked in bold

Prob.

N

Q

Best pub.

HACS

D

V

D

V

P-n20-k2

20

160

220

2V

218

2V

P-n45-k5

45

150

510

5V

510

5V

80

745

10V

743

10V

100

1058

15V

1047

15V

112

1114

14V

1110

14V

P-n51-k10 eilB76 eilB101

51 76 101

From Table 1 can be seen that our algorithm shows competitive results. New best solutions are found by our approach. The solutions of problems: P-n20-k2, P-n51-k10, eilB76 and eilB101are improved. 5. CONCLUSIONS In this paper we have shown the possible improvements to Ant Colony System approach for CVRP through the use of a problem specific heuristic, namely the Savings algorithm. The computational study performed shows the performance of our new approach. New best solutions are found for some benchmark problems in the literature. Furthermore, our approach is competitive with other metaheuristics such as Tabu Search and Simulated Annealing.

33

Journal of Artificial Intelligence: Theory and Application (Vol.1-2010/Iss.1) Bouhafs et al. / A Hybrid Heuristic Approach to Solve the Capacitated ... / pp. 31-34

Constraint Programming (CP '98), M. Maher and J. Puget (eds.), pp. 417-431.-2002 Proceedings. Tan, K. C., Lee, L. H., Zhu, Q. L. and Ou K. (2000). Heuristic Methods for Vehicle Routing Problem with Time Windows, Artificial Intelligent in Engineering, pp. 281-295. Thangiah, S., Potvin, J. and Sun, T. (1996). Heuristic Approaches to Vehicle Routing with Backhauls and Time Windows, Int. Journal of Computers and Operations Research, pp.1043-1057.

Appendix A. BEST SOLUTION The customers are denoted as 1-(N-1). Each route starts and ends at the depot (node 0). Problem instance P-n20-k2. Distance : 218.30. Vehicles: 2. route 1: 1 10 13 8 17 18 3 12 15 11 4; route 2: 6 2 7 9 16 14 5 19 Problem instance P-n51-k10. Distance : 743.26. Vehicles: 10. route 1: 13 41 40 19 42 ; route 2: 49 10 39 33 45 15 ; route 3: 29 21 50 34 30 9 ; route 4 : 11 2 16 38 ; route 5 : 27 6 14 25 ; route 6 ; 8 26 31 28 22 1 46 ; route 7 12 17 44 37 5 ; route 8 : 47 4 18 ; route 9 : 48 23 7 43 24 ; route 10 :32 20 35 36 3. Problem instance eilB76. Distance : 1047.84. Vehicles: 15. route 1: 47 36 71 60 70 20 37 ; route 2:14 59 53 7 ; route 3: 35 11 66 65 ; route 4: 74 21 69 61 28 ; route 5: 23 56 41 42 64 22 ; route 6: 16 63 43 1 73 33 ; route 7: 52 27 13 54 19 8 ; route 8: 51 49 24 18 50 55 25 ; route 9: 3 44 32 40; route 10: 72 31 10 38 58 ; route 11:17 9 39 12 26 ; route 12: 6 62 2 30 68 ; route 13: 45 29 57 15 5 48 ; route 14: 67 46 34 route 15: 75 4 Problem instance eilB101. Distance : 1110.05. Vehicles: 14. route 1: 31 10 63 90 32 30 70 69; route 2: 92 14 44 38 86 16 91 ; route 3: 58 2 57 15 43 42 87 13 ; route 4: 54 24 29 34 78 81 33 50 1 ; route 5: 76 77 3 79 68 80 ; route 6: 27 88 62 11 64 49 36 46 8 ; route 7: 6 94 98 100 37 97 95; route 8: 52 7 19 47 48 82 ; route 9: 89 60 5 61 84 17 45 83 18 ; route 10: 96 99 93 85 59 ; route 11: 41 22 23 75 74 72 73 ; route 12: 4 55 25 67 39 56 21 40 ; route 13: 51 9 35 71 65 66 20 ; route 1: 53 26 12 28

34

AUTHORS PROFILE Lyamine Bouhafs received his Ph.D. in Computer Science from University of Technology of Belfort-Monbeliard, France, in 2006. His research interest includes ant colony system and tabu search applied to intelligent transportation services. He is currently in research and engineering development at Osiatis engineering, France. His current research interest includes metaheuristics and their applications to the real industrial problems. Amir Hajjam received his Ph.D. in Computer Science from University of Haute-Alsace, France, in 1990. He is currently an associate professor in Computer Sciences and Engineering at the University of Technology of Belfort-Montbeliard, France, and performs research activity at the Systems and Transportation (SeT) Laboratory. His current research interest includes evolutionary algorithms and neural networks applied to networks, telecommunications and intelligent transportation services. Abder Koukam is professor of Computer Science at the University of Technology of Belfort-Montbeliard, France. He received the Ph.D. in Computer Science from University of Nancy I, France, in 1990. He heads research activities at Systems and Transportation (SeT) Laboratory on modelling and analysis of complex systems, including software engineering, multi-agent systems and optimization.