Você está na página 1de 5

International Journal of Computer Information Systems, Vol. 3, No.

5, 2011

Max Min Ant System: An Ant Colony Optimization for Weighted Travelling Salesman Problem
Arjun Arora
Assistant Professor: Computer Sc & Engg dept. Dehradun Institute of Technology Dehradun, India e-mail: arjunarora06dit@gmail.com Ashish Pant Assistant Professor: Computer Sc & Engg dept. Dehradun Institute of Technology Dehradun, India e-mail: ashishluckysunoh@gmail.com Prof. R P Arora Professor: Computer Sc. & Engg dept. Dehradun Institute of Technology Dehradun, India e-mail: rparora_37@yahoo.co.in Suneet Kumar Assistant Professor: Computer Sc. & Engg. Dept. Dehradun Institute of Technology Dehradun, India e-mail: suneetcit81@gmail.com

AbstractAnt System is a general purpose algorithm inspired by real ants. It attacks hard combinatorial optimization problems. In this paper I talk about Max-Min Ant System (MMAS) and how it differs from Ant System. MMAS uses a greedier approach to solving combinatorial problems than the Ant System. In this paper a Weighted Travelling Salesman Problem (WTSP) is considered and is applied to a Modified Max Min Ant System (MMMAS), considering the features of the WTSP. Computational results of benchmark instances with five types of distributions are shown. Keywords- Ant colony optimization; Artificial intelligence ; Adaptive behaviour; Combinatorial optimization; Reinforcement learning; Weighted Travelling Salesman Problem (key words)

I.

INTRODUCTION

Ant Colony Optimization (ACO) is a recently developed, population-based approach which has been successfully applied to several NP-hard combinatorial optimization problems. ACO has been inspired by the behavior of real ant colonies. However ACO involves indirect communication between colony agents called artificial ants, which leave a trail of a chemical called as the pheromone. Ants tend to choose a path based on the intensity of the pheromone trail, a higher amount of pheromone deposit on the path indicates that the path has been laid down by a large amount of ants. Thus ants look for pheromone trails; this concept is used to find optimal solution for combinatorial optimization problems. MMAS is a improved version of Ant System which can be used for both asymmetric and symmetric instances of Travelling Salesman Problem. Travelling Salesman Problem (TSP) is a classical problem in combinatorial optimization studied in operations research and theoretical computer science. Given a list of cities and their pair wise distances, the goal is to find an optimal possible tour that starts from a central city, through each city exactly once and returns the central city. The optimal

tour may be measured by distance, time or cost. In general, the distance is used to be the objective, which is equally formulated by time and cost. TSP has attracted lots of attention of many researchers since it was proposed. The priority of each city in TSP is assumed as the same, while the priority of each city may be different in real world. For a cash transport van, it transports cash among banks and the capability of the van is considered sufficient. During the transportation, the most important factor should be security and risk reduction. Visiting banks which need more money firstly during a trip may be more suitable to reduce the risk of being robbed. Consequently, it is necessary to take the extra cost generated by different priorities into consideration. Hence, Weighted Travelling Salesman Problem, WTSP) is proposed. WTSP can be described that the object is to find the optimal tour costs least. The tour starts from central a city, visits each city only once and returns the central city where the number of cities is n, the distance between two different cities is dij, the cost of travelling per unit-distance by the vehicle, called distance coefficient is notated by Cd, the cost of delivering products of per unit-weight and per unit-distance, called load coefficient is notated by Cl. WTSP aims to construct a route to minimize the transportation cost including two parts, distance cost and loading cost brought by the weight of goods to be delivered. II. ARTIFICIAL ANTS

In this work an artificial ant is an agent which moves from city to city on a TSP graph. It chooses the city to move to using a probabilistic function both of trail accumulated on edges and of a heuristic value, which was chosen here to be a function of the edges length. Artificial ants probabilistically prefer cities that are connected by edges with a lot of pheromone trail and which are close-by. Initially, m artificial ants are placed on randomly selected cities.

November Issue

Page 7 of 59

ISSN 2229 5208

International Journal of Computer Information Systems, Vol. 3, No. 5, 2011 At each time step they move to new cities and modify the pheromone trail on the edges usedthis is termed local trail updating. When all the ants have completed a tour the ant that made the shortest tour modifies the edges belonging to its tourtermed global trail updatingby adding an amount of pheromone trail that is inversely proportional to the tour length. These are three ideas from natural ant behavior that we have transferred to our artificial ant colony: (i) the preference for paths with a high pheromone level, (ii) the higher rate of growth of the amount of pheromone on shorter paths, and (iii) the trail mediated communication among ants. Artificial ants were also given a few capabilities which do not have a natural counterpart, but which have been observed to be well suited to the TSP application: artificial ants can determine how far away cities are, and they are endowed with a working memory Mk used to memorize cities already visited (the working memory is emptied at the beginning of each new tour, and is updated after each time step by adding the new visited city).

Figure 2. Examples of TSP: The figure on the left shows the TSP instance att532,which comprises 532 cities in the United States. The figure on the right shows instance pcb1173, which represents the location of 1173 holes to be drilled on a printed circuit board. Each point gives the localization of cities or holes to be drilled, respectively. Both instances are taken from TSPLIB.

A. Weighted travelling salesman Problem The WTSP can be defined on a graph G = (V,A), where V is the vertex set and A is the arc set. The vertex set V includes cities Vc ={v1,v2,....vn} . The cities are indexed from 1 to n. A= { (vi, vj )|vi, vj V, i j} is the arc set. A distance matrix D= (dij) is defined on A, which is distance between each arc (vi, vj). We assume that D is symmetric and satisfies the triangle inequality. Each citys priority is known as . The vehicle capacity is unlimited. The following notations are used throughout the paper to formulate the model:

Figure 1. (A) Real ants follow a path between nest and food source. (B) An obstacle appears on the path: ants choose whether to turn left or right with equal probability. Pheromone is deposited more quickly on the shorter path. (D) All ants have chosen the shorter path.

III.

TRAVELLING SALESMAN PROBLEM

A TSP can be represented by a complete graph G= (N, A) with N being the nodes(cities) and A being the number of arcs. Each arc (i, j) A is assigned a value dij which represents the distance between cities i and j. TSP is the problem of finding shortest closed path visiting each node in G exactly once. However in case of symmetric TSP the distances between two cities are not dependent on direction of traversal of the arcs dij = dji . In case of asymmetric TSP at least one pair of nodes i , j we have dij dji . The TSP has many applications and also provides testing ground for many algorithms which try to find optimal solutions for combinatorial optimization problems.

The objective function includes distance cost and loading cost. The formula (2)(3) represent that each city is visited exactly once. The constraint (4) is the sub-tour elimination constraint. Constraint (5) shows the relationship between the priority of city i and the vehicle loads on the two arcs linking customer i and j. The mathematical formulation of WTSP can be transformed to the classical TSP when the Cl are equal to 0 and neglecting constraints (5) and (6). IV. MAX MIN ANT SYSTEM

The Ant System which was the original ACO algorithm had a disadvantage in its strategy that it lead to early stagnation of the search that made further tour improvements impossible. In MMAS we only allow the best ant to update the trails. To help us in doing this we exclusively define maximum and minimum trail strengths on the arcs. The maximum and

November Issue

Page 8 of 59

ISSN 2229 5208

minimum trail limits are chosen on the average arc length. The possible range of pheromone trail values to the interval [tmin, tmax]. MMAS pheromone trails are reinitialized each time the system approaches stagnation or when no improved tour has been generated for a number of consecutive iterations. Only the trails on arcs participating in the best tours are allowed to increase their intensities to high level. This maintains trail strength and only good arcs are selected. With respect to performance I present results of MMAS in Table 1. The parameter settings are = 0.99, , , and m= n except for fyv170.atsp where m= n/2.
TABLE I Results on problems for symmetric TSPs, quality is the percentage deviation from the known optimal solution.

International Journal of Computer Information Systems, Vol. 3, No. 5, 2011 optima by randomly mutating the tour and produce a new solution that is not far from the original one. Fig.3 shows the mutation operation.

Figure 3. Before Mutation

Figure 4. After Mutation

Problem

Best

Avg. best

eli51.tsp

426(0.0%)

427.2

1.13

kroA100.tsp

21282(0.0%)

21352.05

50.30

Assuming that solutions after the kth iteration is S={s1,s2,......sn}. The mutation probability is decided by the colony scale m and the larger m is, the more solutions can be mutated. If m is extremely large, the number of mutated solutions can be limited to a given value. Randomly choose one city in the selected parent solution, change it with its next city, and keep other cities unchanged. Through this mutation operation, the new solutions can be got. If a solution is improved after mutation, it replaces the parent solution. Otherwise the solutions remained unchanged. V. EXPERIMENT AND ANALYSIS WTSP doesnt have the benchmark instances, so we adopt the benchmark instances of TSP by adding priority for each city, which forms WTSPs instances. The priority is randomly generated and their values range from 0 to 200. The testing problems are classified into five types. Each type represents a scenario of cities distribution. These testing problems are from 22 cities to 442 cities. Detailed information is shown in Table 2.
Table II. Description of testing problems

d198.tsp

15960(1.14%)

16065.95

73.82

ry48p.tsp

14422(0.0%)

14461.64

39.27

ft70.tsp

38690(0.50%)

36594.36

156.03

ftv170.tsp

28269(1.74%)

2836.40

14.91

Max- Min Ant System can be interpreted as randomized restart procedure that iteratively tries to construct good solution to combinatorial optimization problems. A. Modified Max Min Ant System for WTSP M-MMAS is designed according to the feature of WTSP model. The notations are used to describe the algorithm as follows: n = the number of the cities; m =colony size; dij = the distance from node i to j, i, j = 1,2,. . . ,n; qi= the priority of each city; MMAS was proposed on the original AS by Stutzle in 2000. The improvement of MMAS achieves a strong exploitation of the search history by allowing only the best solutions to add pheromone during the pheromone trail update. Also, limiting the strengths of the pheromone trails effectively avoids premature convergence of the search. Mutation operation of genetic algorithm is introduced to the MMAS. The operator can enlarge the search space, avoid local

Select one from the five types of instances separately to show their distribution characteristics. Figure 5 to Figure 9 are as follows:

November Issue

Page 9 of 59

ISSN 2229 5208

Figure 5. Data set of att48 (Type1)

International Journal of Computer Information Systems, Vol. 3, No. 5, 2011 A. Comparison of M-MMAS with other Algorithm To evaluate the performance of M-MMAS, greedy algorithm, standard MMAS and WTSP costs of the best know solutions in the TSP are compared with M-MMAS. The comparison results are as shown in Table 3. The columnTSP is the objective function value of WTSP corresponding to the best known solutions of TSP. The last column is the best solution of M-MMAS over 30 dependent runs. M-MMAS is more competitive and suitable in solving WTSP. In addition, TSP gets better solutions than M-MMAS only for P12, and the gap is less than 1.3%. While M-MMAS can get much better solutions than TSP for other testing problems, that is to say, the best known solutions of TSP are not suitable for WTSP. The advantage of WTSP model is not obvious for testing problems pcb442 and a280 of regular distribution with the same abscissas or ordinates. And WTSP model can save much more money for testing problems ts225 and ulysses22 of regular distribution with the same abscissas or ordinates and random distribution. B. Effectiveness analysis of M-MMAS to solve TSP As WTSP is an expansion of classical TSP, WTSP can be transformed to TSP when load coefficient Cl = 0 and the priority of each city is equal to 1. The object turns to find a route which costs least and the cost only depends on the length of route. M-MMAS can solve TSP and get satisfactory solutions. The results are shown in Table 4. It can be observed that the gap between M-MMAS and the best known solution of TSP is less than 0.5% for small scale instances. M-MMAS also can reach the best known results for testing problem ulysses22, berlin52, gr96, eil51.
TABLE III. COMPUTATIONAL RESULTS OF M-MMAS AND OTHER

Figure 6. Data set of eil76 (Type 2)

Figure 7. Data set of gr202 (Type 3)

ALGORITHMS

Figure 8. Data set of ts225 (Type 4)

Figure 9. Data set of pr107 (Type 5)

November Issue

Page 10 of 59

ISSN 2229 5208

International Journal of Computer Information Systems, Vol. 3, No. 5, 2011


[9] Puris, A, Bello, R, Herrera, F. Analysis of the efficacy of a Two-Stage methodology for ant colony optimization: Case of study with TSP and QAP, Expert Systems With Applications, vol. 37, pp. 5443-5453, 2010. [10] D.Martens, M.D.Backer, R. Haesen, B. Baesens, C. Mues, and J. Vanthienen, Ant-based approach to the knowledge fusion problem, in Proc. ANTS 2006, ser. LNCS, M. Dorigo et al., Eds., Springer Verlag, vol. 4150, pp. 8495, 2006.

TABLE IV. COMPUTATIONAL RESULTS OF M-MMAS TO SOLVE TSP

CONCLUSION Weighted Travelling Salesman Problem is proposed, based on taking both the distance cost in TSP and the loading cost in practical problems into account. A mathematical formulation based on mix integer programming problems for WTSP is presented. The paper designs a M-MMAS to solve WTSP. The computational results of some instances transferred from TSP benchmark instances reveal that the M-MMAS is effective for both TSP and WTSP. The WTSP formulation is more reasonable and can save more money than the TSP formulation in practice. REFERENCES
[1] Csar Rego, Dorabela Gamboa, Fred Glover, Colin Osterman. Travelling Salesman Problem Heuristics: Leading Methods, Implementations and Latest Advances, European Journal of Operational Research, DOI: 10.1016/j.ejor.2010.09.010. Jiafu Tang, Jun Zhang, Zhendong Pan. A scatter search algorithm for solving vehicle routing problem with loading cost, Expert Systems With Applications, vol. 37, pp. 4073-4083,2010. D. Gamboa, C. Rego, and F. Glover, Implementation Analysis of Efficient Heuristic Algorithms for the Travelling Salesman Problem, Computer & Operations Research, vol. 33, pp. 1154-1172, 2006. Dorigo, M, Maniezzo, V, Colorni, A. Ant system: Optimization by a colony of cooperating agents, IEEE Transactions on Systems Man and Cybernetics Part B-Cybernetics, vol.26, pp.29-41, 1996. Gambardella. L, Taillard. E, Dorigo, M. Ant Colonies for the QAP, Technical Report, vol. 97-4, 1997. Thomas Stutzle, Holger H. Hoos. MAXMIN Ant System, Future Generation Computer System, vol. 16, pp. 889-914, 2000. Thomas Stutzle, Holger Hoos. MAX-MIN Ant System and Local Search for the Traveling Salesman Problem, 2nd International Workshop on Biologically Motivated Computer Vision, pp. 109-116, 2002. Yu. B, Yang. ZZ, Yao, BZ. An improved ant colony optimization for vehicle routing problem, European Journal of Operational Research, vol. 196, pp. 171-176, 2009.

[2]

[3]

[4]

[5] [6] [7]

[8]

November Issue

Page 11 of 59

ISSN 2229 5208

Você também pode gostar