A Kind of Ant Colony Algorithm with Route Evaluation. ( i, j), n presents the TSP size, m is the total number of ant

Size: px
Start display at page:

Download "A Kind of Ant Colony Algorithm with Route Evaluation. ( i, j), n presents the TSP size, m is the total number of ant"

Transcription

1 Send Orders for Reprints to The Open Autoation and Control Systes Journal, 04, 6, A Kind of Ant Colony Algorith with Route Evaluation Open Access Fang Zhao * Departent of Coputer and Inforation Engineering, Xinxiang University, Xinxiang City, , China Abstract: Ant algorith is a novel etaheuristic optiization algorith, but at the sae tie there are soe disadvantages This paper proposed an ant colony algorith with route evaluation based on the basic ant colony algorith After all ant coplete the route search once, the current search situation can be evaluated according to an iproved forula of standard deviation, then to decide to update global pheroone or not At the sae tie, via the function of interval copression, the pheroone of all routes is copressed to adjust the searching probability of ants to each city Experiental results show that this iproved algorith has ore excellent presentation on convergence, searching optiization, and stability Keywords: Pheroone, ant colony algorith, route evaluation, pheroone interval, copression circle INTRODUCTION Ant algorith is a ind of etaheuristic algorith proposed by Marco Dorigo, et al [, ] scholars in the inspiration by real ants foraging behavior, which is not only successfully used to solve TSP proble [3, 4], and in solving cobinatorial optiization probles [3] such as scheduling [4], graph coloring proble [5] etc, good results also achieved Ant algorith in solving cobinatorial optiization probles which can be presented by available diagras has the potential superiority, therefore this attracts the attention of any researchers and in this study, and soe iproved algoriths [68] are put forward By pheroones the ants decide the next obile site With the bacground of discussing the TSP proble, they have the following characteristics: When oving fro the city to the city, the pheroone is placed on edge Through the transition probability (the function of distance between the cities and su of pheroones on the connection edge) to select the next city to go to In order to ae artificial ants to obtain legal path, unless a path is coplete, otherwise, the cities which have been ased are not allowed to visit again Ant algorith has been successfully applied in any different optiization probles, but it has the disadvantages such as easy preaturity, slow convergence speed in the search process Aiing to these shortcoings of ant colony algorith, this paper proposes an ant colony algorith with path evaluation; this algorith can effectively overcoe the shortcoings in the search process, and has the better search ability and better stability ANT COLONY ALGORITHMS The TSP Proble The TSP proble of n cities is to find a closed loop path with the shortest length, which has only visited each city once If d ij presents the distance between city i and city j,! ij ( t) is the inforation aount at the oent t on the path ( i, j), n presents the TSP size, is the total nuber of ant colony; tabu ( =,,,) presents the taboo list that ant currently wals through the cities, when all n cities join into tabu, then ant copletes a search, the path experienced by ant is a solution of the TSP proble The Resolving of TSP Based on an Ant Colony Algorith The ants are randoly placed into n cities, at the sae tie, the first eleent of each ant tabu list is set to its current city, at this tie the pheroone of each path is equal, which is set to a constant! 0, then each ant independently selects the next city The build process of path is as follows At the oent t, the transition probability of ant oving fro city i to city j is: + "! ij ( t) & # 'ij t ( " ( ) #, if j)allowed ( p (t) = "! ij, * # is ( t) & " # 'is ( t) s)allowed 0, otherwise () In the expression, allowed {,,,n}! tabu represents the next city that ant is allowed to select;! is the infor /4 04 Bentha Open

2 700 The Open Autoation and Control Systes Journal, 04, Volue 6 Fang Zhao ation heuristic factor;! is the expecting heuristic factor;! ij t ( ) is the heuristic function The pheroone updates as follows When all the ants coplete a travel once, the pheroone on each path updates according to expressions (), (3)! t+n ij ( ) = ( "# )! t ij ( ) +! t ij ( ) ()!" ij t!" t ij ( ) = # (3) = ( ) =!" ij ( t ) # & Q, if ant passes path ( i, j)in this travel L 0 otherwise In the expression,! represents pheroone volatilization coefficient,! " represents pheroone residual factor;!" ij t ( ) represents the increent of the pheroone in this ( ),!" ij ( t) represents the inforation ( ), Q is loop on the path i, j aount of the th ant in the loop left on the path i, j a positive constant, L represents the path length of th passed through the travel 3 THE ANT COLONY ALGORITHM WITH ROUTE EVALUTION (ACARE) 3 The Solving of TSP Based on ACARE The path construction: The ant Located in the city i, according to the rules of pseudorando proportional the city j is selected as the next city The rule is given by the following expression: ) 0 j = * p t ij ( ) = ) (, arg ax *" il # il & ' +, if q/q 0 l!allowed J, otherwise, " #! ij ( t) & " # 'ij ( t ( ) ( * " #! is ( t) & " # 'is ( t) s)allowed / if 0 else (4) (5) j+allowed (6) ( ) is a paraeter, In the expression, q is a rando variable uniforly distributed in the range of!" 0,#, q 0 0! q 0! J is a rando variable produced according to the probability distribution of given (6) Global pheroone update: Only the current optial path can be done the global pheroone update, the rules are as follows: bs! = "# ij ( )! + #! ij ij!( i, j) "T bs (7)!" ij bs = C bs (8) Local pheroone update: After an ant finds out a path, the current path can be done locally pheroone update, the update rules are as follows:! ij = ( "# )! +! ij 0 (9) In the expression,! and! 0 are two paraeters,! eets 0 <! <! 0 is the initial value of pheroone volue ACARE is used to do the iproveent in the following two aspects: () According to the iproved variance calculation forulas to evaluate current path, it is used to deterine if to ipleent a global pheroone update When all the ants coplete a route search, according to the standard variance forula (0) the variance can be calculated F = "( x i!x) (0) Thereinto, represents the ants nuber, x i represents the path length searched by the i th ant in the circular search, x represents the average value of path length that ants found For different sizes of TSP proble, x i is not the sae, the calculated variance ay be great, now forula (0) is odified as follows: F = "( x i!x) NNTour () Hereinto, NNTour represents the route length according to the greed rules According to the standard variance forula, when the data distribution is closer to the average, the standard deviation is saller; the further away is fro the average data distribution, the bigger is the standard deviation Therefore, if F is larger, which eans the length difference of paths that ants find is larger, that is, the paths differences are also bigger, the search scope in the loop search for ant is larger; If F is sall, which eans the length difference of paths that ants find is lesser, that is, the paths differences are also sall, the search scope in the loop search for ant is saller

3 A Kind of Ant Colony Algorith with Route Evaluation The Open Autoation and Control Systes Journal, 04, Volue 6 70 Therefore, at the early stage of the search, if the calculated variance is sall, the search range is sall, in order to have larger search range, at the tie of pheroone update, only local pheroone can update without a global update, it won't ae the pheroone on current optial path to increase, increasing the next cycle ant chooses the probability of this path to ae the algorith lost in local search, and lead to preature phenoenon; if the calculated variance is bigger, the search range is larger, which are regarded as noral, global pheroone updating and local pheroone updating are perfored, it is as sae as in the later stage of search Here, the search is divided into three stages, and paraeters a and b, a > b are introduced, the paraeters a and b are called the bloc paraeters In the early stage, coparing a and variance F, only when the calculated variance F > a, global update can be done In idter stage, coparing b with variance F, only when the calculated variance F > b, global update can be done; in the late stage, global pheroone updating and local pheroone updating are perfored () Adopt the range copression ethod to adjust the pheroone on all trails Definition 3 pheroone interval: at the sae tie, the pheroone on the paths between two cities distributes in an interval, this range is called pheroone interval [9] In the searching process of ants, if in a certain period of tie there is no ore superior solution, it ay be preature, the pheroone in soe local path is significantly higher than that on the other paths, which aes subsequent ants to choose a local path with higher probability, at this tie the pheroone range is larger The copression function copresses the pheroone interval, the copressed pheroone is distributed in a saller range, which aes the gap of pheroone on the paths saller, adjusts the selection probability in the search process of ants, and increases the search probability of other paths Definition 3 copression cycles: every once in a while to copress the pheroones on all paths, this period of tie is called the copression cycle [0], it is ared as T ys The copression cycle cannot be too sall Pheroones copression adjusts the selection probability of ants to each city According to the copressed pheroone on the paths, over a period of tie a better solution ay be found after the search, if the copression cycle is too sall, the opportunity ay be destroyed to get a better solution There are two inds of copression strategy: linear subsection copression and nonlinear copression [] : linear subsection copression The range copression function is: y = Ax A! 0, ( ) () q!w if " ij <" & A = & q+w if " ij #" & ' (3) In the expression, q,q!( 0,) w is a perturbation paraeter, w!"# 0,005),! ij is the pheroone on the path (i, j),! is a value in the pheroone interval : nonlinear copression (secondary copression) The range copression function is: y = ax + bx + c (4) In the expression, a,b,c are three constant paraeters 3 The Ipleentation of ACARE Progra Begin Initialize the paraeters ncycle=0, tabu =0; While(ncycle<=MAXcycle) { For(antnuber=0; antnuber <=M; antnuber++) { while( tabu <citynuber) { if( F b { according expression 5 to select the next city tabu ++ } if( tabu =citynuber) the ant return bac to the start city according to expression 9 to update current path pheroone coparing with current route } Confir the optial route of this circle and calculate the variance F if (early stage) { if ( F > a ) according to expression (7) to globally update the pheroone of current optial route } if iddle stage > ) according to expression (7) to globally update the pheroone of current optial route } else to globally update the pheroone of current optial route if there is no better solution in a period of tie { For the pheroone distribution interval of all routes according to the expression () or (4) to do range copression } } Output the result End 33 The Siulation Experients 33 Paraeter Selection Ant nuber is 5 ties to the nuber of city, the nuber of iterations is decided according the solved proble size,

4 70 The Open Autoation and Control Systes Journal, 04, Volue 6 Fang Zhao Fig () Nonlinear copression figure, using one segent dividing ethod, the copression cycle and staging paraeters with utual collocation Fig () Nonlinear copression convergence figure, using two segents dividing ethod, the copression cycle and staging paraeters with utual collocation copression cycle is selected three ways: T ys = 0,5,0; Through the experiental statistical analysis of variance, bloc paraeters select a = 088 b = 08; a = 09, b = 08 ; and a = 095 b = 085 three groups, the dividing ethods of three stages of the ant search are: ethod : T = 3 T T = 3 T ; ethod : T = 5 T T = 3 T, the siulation experients are 5 done based on these paraeters (atch each other) The rest of the paraeters are as follows: : using linear subsection copression If the value of A in expression () is too sall, the pheroone range copression is bigger, the pheroone on each edge is very close, the change of the ant selecting probability to next city is too large, which will affect the convergence of the algorith; If the value of A is too large, it is not very obvious to adjust the ant search probability Therefore, the value of A is taen near the golden section ratio!" 0,#, in expression (3) q is taen 07, q is taen 06, w is a disturbance of rando uber in!" 0,005),! is the idpoint of pheroone interval : nonlinear copression (secondary copression)

5 A Kind of Ant Colony Algorith with Route Evaluation The Open Autoation and Control Systes Journal, 04, Volue Fig (3) Linear copression convergence figure, using a segent dividing ethod, the copression cycle and staging paraeters with utual collocation Fig (4) Linear copression convergence figure, using two segents dividing ethod, the copression cycle and staging paraeters with utual collocation Through the statistical analysis to the pheroone on each edge, with the aid of Matlab tool, in the expression (4), it is obtained that a =!67, b = 5, c = 0 33 Experiental Results In Fig (4), eil5 proble is given, and the iteration nuber is 000 ties, the convergence condition figures, such as a phase dividing ethod, copression cycle and segentation paraeter atch with each other, presents that the iproved ACARE algorith has better convergence In Table, aiing to eil5, eil0, ch50 three probles, the AS, ACS and ACARE three algoriths run 0 consecutive tests to obtain the statistical data Fro Table, the iproved ACARE has better ability to find a better solution The proxiity between found optial solution and nown optial solution, and the statistical result s average of continuous running for ten ties, are superior to AS algorith and ACS algorith; Fro the value of statistical standard variance, ACARE algorith is better than AS algorith and ACS algorith at the stability

6 704 The Open Autoation and Control Systes Journal, 04, Volue 6 Fang Zhao Table The basic paraeters of ACS and ACARE AS ACS ACARE!!!!!!!!!!! Table AS, ACS, and ACARE algoriths testing data aiing to eil5, eil0, and ch50 TSP Algorith Best Worst Avg Stdv AS ACS Eil5 ACARE Method Method AS ACS Eil0 ACARE Method Method AS ACS Ch50 ACARE Method Method

7 A Kind of Ant Colony Algorith with Route Evaluation The Open Autoation and Control Systes Journal, 04, Volue CONCLUSION The ant colony algorith with path evaluation is proposed in this paper, has significantly iproved at the convergence, stability, and searching the optial solution, which can effectively overcoe the probles in the basic ant colony algorith such as easy to be preature and trapping in local optial solution Through siulation experients, the perforance of an ant colony algorith with path evaluation has better perforance than the basic ant colony algorith CONFLICT OF INTEREST The author confirs that this article content has no conflict of interest ACKNOWLEDGEMENTS Declared none REFERENCES [] C M Dorigo, and V Maniezzo, Distributed optiization by ant colonies, In Proceedings of the First European Conference on Artificial Life, pp344, 99 [] M Dorigo,V Maniezzo and A Colorni, The ant syste: Optiization by a colony of cooperating agents, IEEE Transactions on Syste, Man, and Cybernetics, Part B: Cybernetics, vol 6 pp 94, 996 [3] M Dorigo, L M Gabardella, Ant colony syste: a cooperative learning approach to the traveling salesan proble, IEEE Transactions on Evolutionary Coputation, vol, pp 5366, 997 [4] A Colorni, M Dorigo, and V Maniezzo, Ant colonies for jobshop scheduling, Belgian Journal of Operations Research, Statistics and Coputer Science (JORBEL), vol 34, pp 3954, 994 [5] D Costa and A Hertz, Ants can color graphs, Journal of the Operational Research Society, vol 48, pp 95305, 997 [6] H Duan and D Wang, A fast global optiization of the iproved ant colony algorith and siulation, Inforation and control vol 33, pp 444, 004 [7] H Duan and G Ma, An iproved ant colony algorith to solve the continuous space optiization proble, Journal of Syste Siulation, vol 9, pp , 007 [8] X Zhang and L Tang, A ACO&SS algorith design to solve TSP proble, Control and Decision, vol 3, pp 76766, 008 [9] L Jiao, H Du, and F Liu, The iune optiization calculation, learning and recognition, Beijing: Science Press, pp 998, 006 [0] T H Guo and Z Michalewicz, Inverover Operator for the TSP, Proceedings of the 5th Parallel Proble Solving Fro Nature Berlin: Springer, pp 8038, 009 [] L Wang, J Pan and L Jiao, Iunization progras, Journal of Coputers, vol 3, pp 8068, 000 Received: Noveber 6, 04 Revised: January 08, 05 Accepted: January 0, 05 Fang Zhao; Licensee Bentha Open This is an open access article licensed under the ters of the Creative Coons Attribution NonCoercial License ( which perits unrestricted, noncoercial use, distribution and reproduction in any ediu, provided the wor is properly cited