An Ant System Algorithm for the Vehicle Routing Problem ... - CiteSeerX

2 downloads 81 Views 175KB Size Report
observation of the behaviour of real life ant colonies, in particular the way in which real ... tours then the amount of pheromone on arcs belonging to the best λ ...
MIC’2001 - 4th Metaheuristics International Conference

199

An Ant System Algorithm for the Vehicle Routing Problem with Backhauls Anne Wade∗

Said Salhi∗



School of Mathematics and Statistics The University of Birmingham, U.K. Email: [email protected], [email protected]

1

Introduction

The ant system is a metaheuristic developed for the solution of hard combinatorial optimization problems. It was first proposed by Colorni et al. [4] and Dorigo [6]. The method was inspired by the observation of the behaviour of real life ant colonies, in particular the way in which real ants find the shortest path between food sources and their nest. While walking ants deposit a substance called pheromone on to the ground which forms a pheromone trail. Ants can detect the pheromone and choose their way according to the level of the pheromone trail. The greater the concentration of pheromone on the ground the higher the probability that an ant will choose that path. Where there is a shorter path from a food source to the nest, ants will reach the end of the path in a quicker time compared to ants on a longer path. This means that the trail will build up at a faster rate on the shorter path which in turn causes more ants to choose the shorter path which also causes a greater level of pheromone. In time all ants will have the tendency to choose the shorter path. This real life behaviour of ants has been adapted to solve combinatorial optimization problems using simulation. A number of artificial ants build solutions in parallel using a form of indirect communication. The artificial ants co-operate the artificial pheromone level deposited on arcs which is calculated as a function of the quality of the solution found. The artificial ants construct solutions iteratively by adding a new node to a partial solution using information gained from past performance and also a greedy heuristic. The greedy heuristic, known as the visibility, is introduced in an attempt to guide the search. Ant systems were first developed to solve the Travelling Salesman Problem (TSP), a number of ant systems have been proposed for the TSP. Ant systems have also been proposed for many other combinatorial problems, such as the sequential ordering problem, the quadratic assignment problem and the vehicle routing problem. For an overview see Bonabaeu et al. [1]. In this paper we propose an ant system for the vehicle routing problem with backhauls (VRPB). First we introduce the VRPB, then we present our ant system algorithm followed by preliminary results and conclusions.

1.1

The Vehicle Routing Problem with Backhauls

The VRPB is an extension to the VRP where two different types of customer are served. Linehaul customers who require a given demand quantity to be delivered from the depot and backhaul customers who require a given supply quantity to be picked up and transported to the depot. The goods are transported to or from a single depot by a fleet of homogeneous vehicles. Methods in the literature Porto, Portugal, July 16-20, 2001

200

MIC’2001 - 4th Metaheuristics International Conference

to solve the VRPB either restrict all backhauls to be visited once all linehauls have been served, the classical VRPB, or allow mixed linehaul and backhaul customers along the routes, the mixed VRPB. In this paper we propose an ant system to solve the mixed VRPB. The objective is to find the set of routes with the least cost where: • each customer is visited exactly once, • all routes begin and end at the depot, • the load on the vehicle at any point along the route must not exceed the vehicle capacity. The mixed problem is more complicated than the classical VRPB due to the fluctuating load on the vehicle. The mixed VRPB has not received as much attention in the literature as its counterpart the classical VRPB. For more information see Deif and Bodin [5], Casco et al. [3], Salhi and Nagy [10] and Halse [9]. The VRPB is closely related to the TSP, we base our method upon the Ant Colony System known as the ACS algorithm used successfully to solve the TSP, see Dorigo and Gambardella [7].

2

Methodology

Initially, m ants are positioned on n customers randomly and initial pheromone trail levels are applied to arcs. In order to solve the VRPB, 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 λ solutions, as well as the global best solution, are updated according to the global updating rule. This is a modification to the original ACS method. 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).  β   [τ (i, j)] · [η(i, j)] β pk (i, j) =



  0

[τ (i,j)]·[η(i,j)] β j∈F [τ (i,j)]·[η(i,j)]

if q ≤ q0 , j ∈ Fk if q > q0 , j ∈ Fk

(1)

k

otherwise

where q is a random number uniformly distributed in [0, ..., 1] and q0 is a parameter (0 ≤ q0 ≤ 1). τ (i, j) is the pheromone associated with arc (i, j), η(i, j) 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. Fk is the set of feasible customers that remain to be visited by ant k and β is a parameter which determines the relative importance of the heuristic value. The parameter q0 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 ≤ q0 then exploitation is encouraged, whereas q > q0 encourages biased exploration. 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). Porto, Portugal, July 16-20, 2001

MIC’2001 - 4th Metaheuristics International Conference

τ (i, j) ← (1 − ρ) + ρ · ∆τ (i, j)

201

(2)

where ρ is a parameter (0 < ρ < 1) and ∆τ (i, j) = τ0 the initial pheromone trail. The role of the local updating rule is to change the desirability of the arcs dynamically. In other words each time an ant chooses an arc then that arc becomes less desirable encouraging a wider search of the neighbourhood. 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. In this paper we base our global updating rule on the rank based version proposed by Bullnheimer et al. [2]. In this method the best λ ranked ants as well as the global best ant are used to update pheromone levels. The reasoning behind this choice is to try to prevent the method from becoming trapped in a local minimum. The global updating rule is given in Equation (3).

τ

new

(i, j) = (1 − ρ)τ

old

(i, j) +

λ−1 

∆τ µ (i, j) + λ∆τ ∗ (i, j)

(3)

µ=1

where 0 < ρ < 1 is the pheromone decay parameter. If arc (i, j) is used by the µth best ant then the pheromone trail is increased on that arc by ∆µ (i, j) which is equal to (λ − µ)/Lµ , where Lµ is the length of the tour produced by the µth best ant. Arcs belonging to the global best solution, length L∗ , increase the trail by ∆τ ∗ (i, j) which is equal to 1/L∗ . 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 iterations. After each ant has produced a set of routes the local optimizer 2 or/and 3 opt is applied to improve the solutions if possible. In order to reduce the computation time and also improve solution quality a candidate list is used. For each customer, the associated candidate list comprises of the closest n/4 customers, where n is the total number of customers. If an ant has feasible customers remaining to be visited on a particular route but those customers are not contained in the candidate list then the ant chooses the next customer to visit as the closest customer from the feasible list and the depot. However, if only one customer remains to be visited in the problem and the customer is contained in the feasible list but not the candidate list, then the customer is forced to be visited next. This should avoid one remaining feasible customer being forced into a new route.

3

Preliminary Results

The set of test problems correspond to the VRPB instances proposed by Goetschalckx and JacobsBlecha [8]. The problems range in size from 25 to 150 customers. Preliminary results for the set of test problems obtained using our ant system algorithm are reported in Table 1. The name of the problem is given in the table together with the number of linehaul customers n1 , the number of backhaul customers n2 , the vehicle capacity Q and the solution cost L. To our knowledge this set of problems has only been solved for the mixed VRPB by Halse [9], these results are reported in the table under the heading Halse. At this stage of our implementation the preliminary results are not competing as well as we hoped for. We are in the process of gaining more understanding of the way the search is progressing and hence we will be in a position to enhance such an implementation. Porto, Portugal, July 16-20, 2001

202

MIC’2001 - 4th Metaheuristics International Conference N ame a1 a2 a3 b1 b2 b3 c1 c2 c3 e1 e2 e3 g1 g2 g3 g5 h1 h2 h3 j1 j2 j3 l1 l2 m1

n1 20 20 20 20 20 20 20 20 20 30 30 30 45 45 45 45 45 45 45 75 75 75 75 75 100

n2 5 5 5 10 10 10 20 20 20 15 15 15 12 12 12 12 23 23 23 19 19 19 75 75 25

Q 1550 2550 4050 1600 2600 4000 1800 2600 4150 2650 4300 5225 2700 4300 5300 6400 4000 5100 6100 4400 5600 8200 4400 5000 5200

L 248.049 179.744 148.775 254.091 200.828 153.377 266.925 223.760 180.704 250.594 204.624 195.635 346.971 265.551 231.016 218.414 283.141 238.738 239.088 395.709 362.307 313.187 467.021 424.729 456.046

Halse 227.725 169.497 142.032 233.950 182.326 145.699 242.931 197.276 167.663 222.518 190.048 187.793 304.106 235.220 213.757 201.875 235.269 215.649 202.971 337.800 298.432 280.070 412.278 362.399 372.840

Table 1: Preliminary results for Ant System

4

Conclusions

Our preliminary computational results are not as good those published in the literature. However, we feel that the preliminary results show enough encouragement to warrant further research into adapting the ant system specifically for the VRPB. There are a number of ideas which are presently being incorporated into the method. Firstly, adapting the greedy heuristic to be more problem specific. The heuristic could be based on a savings function and incorporate information concerning linehaul/ backhaul load at each customer. In changing the heuristic function it is necessary to strike a balance between computational results and solution quality. Secondly, restricting the use of the candidate list for a given number of iterations within the algorithm. The candidate list can force the solution to contain a large number of routes in some instances, restricting its use may produce improved results by extending the search space. The candidate list should be used for the majority of iterations to avoid an undesirable customer from being picked. Another possibility is to consider the frequency with which each arc has been picked during the solution process. For the first given percentage of iterations, if an arc has been selected for a certain number of times in succession then that arc may be worth being penalised. This penalty of such an arc may be translated into a decrease of its trail value. This will influence the ant system to choose those arcs which may not be explored otherwise. This form of exploration of the search space can be critical to the success of the system. Lastly, the introduction of maximum and minimum values for the pheromone trail in an attempt to avoid stagnation in the solutions is also worthwhile using. The maximum and minimum values would Porto, Portugal, July 16-20, 2001

MIC’2001 - 4th Metaheuristics International Conference

203

only be enforced during given stages of the iteration. If there are no restrictions on the trail values then an arc with a high pheromone level is likely to be picked during the next iteration hence again increasing the trail level. Using a restriction at certain stages of the algorithm should help to prevent the solution from becoming trapped in a local minimum. Some of these ideas are in the process of being implemented.

References [1] E. Bonabaeu, M. Dorigo, and G. Theraulaz. Swarm Intelligence: From Natural to Artificial Systems. Oxford University Press, 1999. [2] B. Bullnheimer, R. F. Hartl, and C. Strauss. A New Rank Based Version of the Ant System: A Computational Study. Pom-03/97, Institute of Management Science, University of Vienna, Austria, 1997. [3] O. Casco, B. Golden, and E. Wasil. Vehicle Routing with Backhauls: Models, Algorithms and Case Studies. In B. Golden and A. Assad, editors, Vehicle Routing: Methods and Studies, pages 127–147. North Holland, Amsterdam, 1988. [4] A. Colorni, M. Dorigo, and V. Maniezzo. Distributed Optimization by Ant Colonies. In F. Varela and P. Bourgine, editors, Proceedings of the European Conference on Atrificial Life, pages 134–142. Elsevier Publishing, Amsterdam, 1991. [5] I. Deif and L. Bodin. Extension of the Clarke and Wright Algorithm for Solving the Vehicle Routing Problem with Backhauls. In A. E. Kidder, editor, Proceedings of the Babson Conference on Software Uses in Transportation and Logistics Managemant, pages 75–96, 1984. [6] M. Dorigo. Optimization, Learning and Natural Algorithms. PhD thesis, Politecnico di Milano, Italy, 1992. [7] M. Dorigo and L. Gambardella. Ant Colony System: A Cooperative Learning Approach to the Travelling Salesman Problem. IEEE Transactions on Evolutionary Computation, 1(1):53–66, 1997. [8] M. Goetschalckx and C. Jacobs-Blecha. The Vehicle Routing Problem with Backhauls. European Journal of Operational Reasearch, 42:39–51, 1989. [9] K. Halse. Modelling and Solving Complex Vehicle Routing Problems. PhD thesis, The Technical University of Denmark, 1992. [10] S. Salhi and G. Nagy. A Cluster Insertion Heuristic for the Single and Multiple Depot Vehicle Routing Problems with Backhauls. Journal of the Operational Research Society, 50(10):1034–1042, 1999.

Porto, Portugal, July 16-20, 2001