9
An interactive simulation and analysis software for solving TSP using Ant Colony Optimization algorithms Aybars Ug ˘ur * , Dog ˘an Aydin Department of Computer Engineering, University of Ege, 35100 Bornova-Izmir, Turkey article info Article history: Received 24 March 2008 Received in revised form 30 April 2008 Accepted 12 May 2008 Available online 30 June 2008 Keywords: Simulation software Traveling salesman problem Ant Colony Optimization Local search heuristics Combinatorial optimization, visualization abstract Traveling salesman problem (TSP) is one of the extensively studied combinatorial optimization problems and tries to find the shortest route for salesperson which visits each given city precisely once. Ant colony optimization (ACO) algorithms have been used to solve many optimization problems in various fields of engineering. In this paper, a web-based simulation and analysis software (TSPAntSim) is developed for solving TSP using ACO algorithms with local search heuristics. Algorithms are tested on benchmark prob- lems from TSPLIB and test results are presented. Importance of TSPAntSim providing also interactive visualization with real-time analysis support for researchers studying on optimization and people who have problems in form of TSP is discussed. Ó 2008 Elsevier Ltd. All rights reserved. 1. Introduction Traveling salesman problem (TSP) is the one of the well-known and extensively studied problems in discrete or combinatorial optimization and asks for the shortest roundtrip of minimal total cost visiting each given city (node) exactly once. Cost can be dis- tance, time, money, energy, etc. TSP is an NP-hard problem and researchers especially mathematicians and scientists have been studying to develop efficient solving methods since 1950’s. Be- cause, it is so easy to describe and so difficult to solve. Graph the- ory defines the problem as finding the Hamiltonian cycle with the least weight for a given complete weighted graph. The traveling salesman problem is widespread in engineering applications. It has been employed in designing hardware devices and radio electronic devices, in communications, in the architec- ture of computational networks, etc. [1]. In addition, some indus- trial problems such as machine scheduling, cellular manufacturing and frequency assignment problems can be formu- lated as a TSP. One direct solving method is to select the route which has min- imum total cost of all possible permutations of N cities. The num- ber of permutations can be very large for even 40 cities. Every tour is represented in 2n different ways (for symmetrical TSP). Since there are n! possible ways to permute n numbers, the size of the search space is then jSn!=ð2nÞ¼ðn 1Þ!=2. Rather than enu- merating all possibilities, many approximation algorithms based on genetic algorithms (GA) [2], simulated annealing [3], tabu search [4], ant colony optimization [5–8] and neural networks [9] have been developed to yield good solutions within a reasonable time. Also, some exact algorithms based on the branch-and-cut method [10–12] have been proposed that enable even large TSP in- stances to be solved. Ant Colony Optimization (ACO) is a population-based approach which has been successfully applied to several NP-hard combina- torial optimization problems, firstly to traveling salesman prob- lem. ACO algorithms have been applied to various fields of engineering problems as a general optimization tool. Some pub- lished studies about using ACO algorithms to solve engineering problems can be found in [13–17]. ACO algorithms have virtual ants as agents that communicate indirect way and uses randomly propagation rules that make difficult to understand algorithms and agents behavior. ACO algorithms have many critical parameters that influence the performance dramatically and whose values are hard to estimate by researchers before. Many simulation and analysis tools have been developed for ge- netic algorithms [18–20], neural networks [21,22] and other meta- heuristics [23–25] or artificial intelligence methods [26,27] in the literature. But, there was not a comprehensive simulation and analysis software that has animation and tracing capabilities espe- cially for researchers in the area of ACO. In this paper, an interactive simulation and analysis software is developed for solving TSP using Ant Colony Optimization algo- rithms. This web-based tool employing virtual ants and 2D interac- tive graphics is used to produce near-optimal solutions to the TSP 0965-9978/$ - see front matter Ó 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.advengsoft.2008.05.004 * Corresponding author. E-mail addresses: [email protected] (A. Ug ˘ur), [email protected] (D. Aydin). Advances in Engineering Software 40 (2009) 341–349 Contents lists available at ScienceDirect Advances in Engineering Software journal homepage: www.elsevier.com/locate/advengsoft

An interactive simulation and analysis software for solving TSP using Ant Colony Optimization algorithms

  • Upload
    ege

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Advances in Engineering Software 40 (2009) 341–349

Contents lists available at ScienceDirect

Advances in Engineering Software

journal homepage: www.elsevier .com/locate /advengsoft

An interactive simulation and analysis software for solving TSP using AntColony Optimization algorithms

Aybars Ugur *, Dogan AydinDepartment of Computer Engineering, University of Ege, 35100 Bornova-Izmir, Turkey

a r t i c l e i n f o a b s t r a c t

Article history:Received 24 March 2008Received in revised form 30 April 2008Accepted 12 May 2008Available online 30 June 2008

Keywords:Simulation softwareTraveling salesman problemAnt Colony OptimizationLocal search heuristicsCombinatorial optimization, visualization

0965-9978/$ - see front matter � 2008 Elsevier Ltd. Adoi:10.1016/j.advengsoft.2008.05.004

* Corresponding author.E-mail addresses: [email protected] (A. Ug

(D. Aydin).

Traveling salesman problem (TSP) is one of the extensively studied combinatorial optimization problemsand tries to find the shortest route for salesperson which visits each given city precisely once. Ant colonyoptimization (ACO) algorithms have been used to solve many optimization problems in various fields ofengineering. In this paper, a web-based simulation and analysis software (TSPAntSim) is developed forsolving TSP using ACO algorithms with local search heuristics. Algorithms are tested on benchmark prob-lems from TSPLIB and test results are presented. Importance of TSPAntSim providing also interactivevisualization with real-time analysis support for researchers studying on optimization and people whohave problems in form of TSP is discussed.

� 2008 Elsevier Ltd. All rights reserved.

1. Introduction

Traveling salesman problem (TSP) is the one of the well-knownand extensively studied problems in discrete or combinatorialoptimization and asks for the shortest roundtrip of minimal totalcost visiting each given city (node) exactly once. Cost can be dis-tance, time, money, energy, etc. TSP is an NP-hard problem andresearchers especially mathematicians and scientists have beenstudying to develop efficient solving methods since 1950’s. Be-cause, it is so easy to describe and so difficult to solve. Graph the-ory defines the problem as finding the Hamiltonian cycle with theleast weight for a given complete weighted graph.

The traveling salesman problem is widespread in engineeringapplications. It has been employed in designing hardware devicesand radio electronic devices, in communications, in the architec-ture of computational networks, etc. [1]. In addition, some indus-trial problems such as machine scheduling, cellularmanufacturing and frequency assignment problems can be formu-lated as a TSP.

One direct solving method is to select the route which has min-imum total cost of all possible permutations of N cities. The num-ber of permutations can be very large for even 40 cities. Every touris represented in 2n different ways (for symmetrical TSP). Sincethere are n! possible ways to permute n numbers, the size of thesearch space is then jSj ¼ n!=ð2nÞ ¼ ðn� 1Þ!=2. Rather than enu-

ll rights reserved.

ur), [email protected]

merating all possibilities, many approximation algorithms basedon genetic algorithms (GA) [2], simulated annealing [3], tabusearch [4], ant colony optimization [5–8] and neural networks [9]have been developed to yield good solutions within a reasonabletime. Also, some exact algorithms based on the branch-and-cutmethod [10–12] have been proposed that enable even large TSP in-stances to be solved.

Ant Colony Optimization (ACO) is a population-based approachwhich has been successfully applied to several NP-hard combina-torial optimization problems, firstly to traveling salesman prob-lem. ACO algorithms have been applied to various fields ofengineering problems as a general optimization tool. Some pub-lished studies about using ACO algorithms to solve engineeringproblems can be found in [13–17]. ACO algorithms have virtualants as agents that communicate indirect way and uses randomlypropagation rules that make difficult to understand algorithms andagents behavior. ACO algorithms have many critical parametersthat influence the performance dramatically and whose valuesare hard to estimate by researchers before.

Many simulation and analysis tools have been developed for ge-netic algorithms [18–20], neural networks [21,22] and other meta-heuristics [23–25] or artificial intelligence methods [26,27] in theliterature. But, there was not a comprehensive simulation andanalysis software that has animation and tracing capabilities espe-cially for researchers in the area of ACO.

In this paper, an interactive simulation and analysis software isdeveloped for solving TSP using Ant Colony Optimization algo-rithms. This web-based tool employing virtual ants and 2D interac-tive graphics is used to produce near-optimal solutions to the TSP

342 A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349

and supports analysis and educational training with visualizationof algorithms. Section 2 describes Ant Colony Optimization andits variants. Section 3 provides detailed information on TSPAntSimsimulation tool, Section 4 illustrates some experimental results ob-tained by TSPAntSim and Section 5 concludes the article.

2. Ant Colony Optimization

Ant Colony Optimization algorithms based on the foragingbehavior of ants have first been introduced by Dorigo et al. in[5,28,6] and were formalized as a new meta-heuristic in [29] byDorigo and Di Caro. A meta-heuristic is a general purpose algorith-mic framework that can be applied to different optimization prob-lems with relatively few modifications [30]. Several ACOimplementations in theoretical (i.e. [7,31–37]) and practical indus-trial and engineering applications like networking (i.e. studies inBritish Telecommunications PLC), transportation, manufacturing(i.e. AntOptima software) have been introduced in recent years.

In ACO, a number of artificial ants build solutions to the consid-ered optimization problem at hand and exchange information onthe quality of these solutions via a communication scheme thatis reminiscent of the one adapted by real ants [30]. Skeleton ofthe ACO algorithm is as follows:

procedure ACO algorithm meta-heuristic

Set parameters, initialize pheromone trails

while (termination condition not met) do

ConstructSolutions

ApplyLocalSearch % optional

UpdateTrails

end

end ACO algorithm meta-heuristic

As algorithm indicates that after the parameter and pheromone(a chemical substance that real ants deposit for local and indirectcommunication termed as stigmergy by Grassé [38]) trail initiali-zation on the problem search space, each ant constructs its solu-tion with the probabilistic selection policy and updatespheromone level on the graph according to their solutions. Addi-tionally, local search methods can be applied on the each solutionof ants for performance improvement. Detailed description ofthese three steps of algorithm is:

ConstructSolutions: For the given problem instance, each antstarts a state, then traverses the states one by one. At each step,each ant computes a probability distribution function to chooseone of states in this probability. This random selection is calledas random proportional transition rule [30] (also called as pseudo-random proportional rule) and depends on the combination oftwo values:

� Attractiveness of the move, that is a heuristic function (dependson the problem) indicating the priory desirability of that move.

� The trail level of artificial pheromone, that indicates posteriori ofthe desirability of the move because it represents the learneddesirability of the choosing the next possible states when in cur-rent state.

Thanks to that, each ant incrementally constructs a solution forthe instance to solve.

ApplyLocalSearch: Before updating trail level, local searchmethods such as 2-opt, 3-opt [39] and Lin–Kernighan [40] can beapplied on each solution constructed in current iteration. Althoughthis process is optional and problem specific, it improves the solu-tions obtained by the ants and has been used by state of art ACOalgorithms.

UpdateTrails: After the solutions constructed and calculated,pheromone level increases (called as pheromone depositing) anddecreases (called as pheromone evaporation) on paths related tothe good and bad solutions, respectively.

The ACO algorithms that applied to TSP are: ant system (AS),elitist ant system (ASe) [6], ant colony system (ACS) [41], rank-based ant system (RBAS) [42], best–worst ant system (BWAS)[43] and max–min ant system (MMAS) [44]. ACO algorithms de-part from each other because of their different implementationof pheromone updating and random proportional transition rule.So, pheromone updating and random proportional transition ruleare one of the critical mechanisms in ACO.

2.1. Random proportional transition rule (RPT rule)

According to the first ACO algorithm, ant system for TSP, theprobability that city j is selected to be visited next after city i canbe written in a formula as follows:

pij ¼½sij �a ½gij �

bPh2X½sih �a ½gih �

b if j 2 X

0 otherwise

8<: ð1Þ

where sij is intensity of trail between cities i and j, gij is visibility ofcity j from city iðgij ¼ 1=dijÞ, X is the set of unvisited cities, dij is thedistance between cities i and j. The intensity of the trail can beinterpreted as an adaptive memory and is regulated by a constantparameter a. The latter criteria can be interpreted as a measure ofdesirability and is called visibility. It represents the heuristic func-tion mentioned above and is regulated by a constant parameter b.It is important to note that the constant adjustable parameters, aand b, change the algorithm performance dramatically. ‘‘If a ¼ 0the closest cities are more likely to be selected: this correspondsto a classical stochastic greedy algorithm. If, on the contrary,b ¼ 0 only pheromone amplification at work: this method will leadto the rapid selection of tours that may not be optimal” [30]. So, atradeoff between tour length and trail intensity is necessary, butit is really hard to set the efficient values of that parameters withoutexperiments. The best values of the parameters are commonly ini-tialized by priory knowledge gathered from these empiricalobservations.

All algorithms except ant colony system (ACS) use the same RPTrule. They vary from each others due to the different implementa-tion of pheromone updating strategies. RPT rule is modified to al-low explicitly for exploration in ACS as follows:

j ¼ arg maxj2X sði; jÞ½ � � gði; jÞ½ �bn o

if q 6 q0

J otherwise

(ð2Þ

where q is a random number, q0 is a parameter ð0 6 q0 6 1Þ and J israndom variable selecting according to the previous probability dis-tribution function given in Eq. (1). At each step, an ant in city i hasto choose a city j to visit, it generates a uniformly distributed ran-dom value for q. if q 6 q0 then the best edge is chosen (exploitation),otherwise an edge is chosen according to Eq. (1) (Biased explora-tion) [41].

2.2. Pheromone updating

Pheromone updating provides the positive and negative feed-back in indirect multiple communication in colony. Positive feed-back is implemented by pheromone laying on the good solutionsfor reinforcement. But increasing pheromone level without evapo-ration leads algorithm to stop the stagnation state. To avoid this,negative feedback mechanism is introduced through the phero-mone evaporation on the all and sometimes bad paths. In AS,end of the each iteration t, each ant k deposits 1=LkðLk is the length

A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349 343

of its tour) amount of pheromone independently and evaporatessome value of pheromone from all edges by sijðt þ 1Þ ¼ð1� qÞsijðtÞ equation where q ð0 6 q 6 1Þ is the coefficient of de-cay. The pheromone laying by all ants yields performance decreas-ing and thus leading to AS worse than the state of art TSP solver,that encourages the researchers to make new variants of AS forperformance improvement.

Elitist strategy is the first modified version of AS algorithm inwhich at every cycle the trail laid on the edges belonging to thebest tour is reinforced more than in AS by the elitist ants [36].After each cycle, extra e=L� pheromone is added to the trail ofeach arc of the best so far tour T�, where e is the number of elit-ist ants and L� is the length of the best tour found from thebeginning of the trail. In another modified algorithm RBAS, pher-omone deposits of ants are weighted according to their ranks.The weight of the best-so-far tour is w and generally set as quar-ter of colony size. RBAS allows only ðw� 1Þ ranked best ants and

Fig. 1. A screenshot of TSPAntSim. (a) General GUI

best-so-far ant to deposit pheromone. Formally, best-so-far antdeposits w=L� amount of pheromone on its path and otherranked ants increase the pheromone level by the following for-mula where Dsij;rðtÞ(Dsij;rðtÞ ¼ 1=Lrif ði; jÞ 2 TrðtÞ where TrðtÞ isthe tour of the ant with rank r at iteration t) are pheromonesof ant with rank r.Xr¼1;...;w�1

ðw� rÞDsij;rðtÞ ð3Þ

These two algorithms supply reinforcement with searching goodsolution near best tour by other ants.

ACS uses two types of pheromone updating strategies: local andglobal. In global updating, after each iteration, only pheromones onbest so far tour are updated by increasing pheromone level withq=L� where q is the decay parameter mentioned above. Local pher-omone update is performed after each step of tour construction byall ants with the following formula:

, (b) analysis panel, and (c) reporting panel.

344 A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349

sij ¼ ð1�uÞ � sij þu � s0 ð4Þ

where 0 < u 6 1 is the local pheromone decay coefficient, s0 is theinitial value of the pheromone especially set as a nearest neighbortour length.

In MMAS, pheromone is deposited only on the best-so-far tourlike ACS and reinitialized the pheromone level when a new besttour has been found. But additionally, it uses two new rules toavoid stagnation.

� Restrict the value of pheromone level on edges to range½smin; smax�.

� Initialize the value of pheromone as smax.

All algorithms except BWAS, uses same evaporation rule. But inBWAS, pheromones on the worst tour T� are evaporated by the for-mulasijðt þ 1Þ ¼ ð1� qÞsijðtÞ where ði; jÞ 2 T� and ði; jÞ R T�. Fur-thermore, the pheromone trail on an edge ði� jÞ is subjected tomutation as in genetic algorithms with a probability pmut:

sijðt þ 1Þ ¼sijðtÞ þ Dsmut if a ¼ 0sijðtÞ � Dsmut if a–0;

�ð5Þ

where i; j ¼ 1, . . . ,n, i–j, Dsmut is a random number from a rangedepending on the iteration number and average pheromone valueon the edge of the route T�, and a 2 f0;1g is a random number [45].

3. An interactive ACO simulation and analysis software forsolving TSP

TSPAntSim, which is implemented as a standalone Java appletuses Java2D technology, is an interactive simulation environment

Fig. 2. Step by step execution for 100 cities problem: (a) Screenshot of solution after 10 it

to solve TSP by ants. TSPAntSim is available at <http://yzgr-afik.ege.edu.tr/projects/TSPAntSim/>. It has ability to illustrate allthe ACO algorithms and supports analysis of algorithms for differ-ent parameter values and ant behaviors. Fig. 1 has the snapshots ofTSPAntSim while an algorithm runs. As shown in Fig. 1, simulationsettings are entered from the right panel. TSP instances can be de-fined by using top panel and tabbed panel in the center illustratessimulation and analysis. Simulation speed can be controlled bybottom panel and also includes a progress bar. Cities with numbersdefined in current instance are represented as circles on simulationpanel. Bold polyline traveling all cities represent the best tourfound so far and pheromone levels are shown as lines betweencities.

3.1. Capabilities of TSPAntSim

To emphasize the capability of the environment, the systemcharacteristics are listed below:

1. Web reachable: User can access the software through the inter-net with a Java-enabled browser. No installation is required.

2. ACO and local search algorithms support: TSPAntSim supports antsystem, elitist ant system, rank-based ant system, best–worstant system, ant colony system and max–min ant system algo-rithms and they can be combined with local search algorithmseasily.TSPAntSim uses 2-opt and 2.5-opt [46] local search heu-ristics for tour improvement. In 2-opt heuristic, a pair of edgesin each ant tour are removed at the each iteration and their end-points are reconnected in the only other way which gives a con-nected tour. This is done as long as the length of the ant tourdecreases. The 2.5 opt algorithm similarly cuts and reconnects

erations, (b) after 100 iterations, (c) after 500 iterations, and (d) after 1000 iterations.

Fig. 3. Indexed (as ‘‘3”) ant trail visualization with city probabilities.

A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349 345

edges but the number of cut edges are three. It looks like simple3-opt move but in a 2.5-Opt move one relocates a single cityfrom its current location to a position between two current tourneighbors elsewhere in the tour [47].

3. Easily setting of TSP instances: Users can select one of the TSPinstance generation methods which they prefer. TSPLIBinstances provided by TSPAntSim can be loaded or user candefine a set of cities by adding points anywhere using mouse.A set of points can also be generated in random locations. It isimportant to test ACO on different types of TSP instancesbecause these classes of problems have structural differencesthat make them difficult for a particular algorithm and at thesame time easy for another one [41].

4. Flexible parameter settings: All parameters about the algorithmscan be set by using panels and parameters windows easily.

5. Interactive and animated simulation: Test instances can be cre-ated and execution of algorithm can be observed interactivelyby mouse and the environment animates steps and iterationsof algorithms during execution.

6. Different types of execution: Thanks to advantages of multi-threading, TSPAntSim presents four types of execution: ‘‘nor-mal”, ‘‘step by step”, ‘‘with ants” and ‘‘zoom to ant”.

Fig. 4. (a) Analysis selection window, and (b) a scre

� In ‘‘normal” execution, selected algorithm runs faster butsimulation of algorithm is poor too and only progress barshows progress of the algorithm. It facilitates solving TSPinstances and analyzing of parameters setting and algorithmcomparisons quickly as possible.

� As the name indicates, ‘‘step by step” execution visually rep-resents the changes of solution and pheromone level afterthe each iteration step by step. It is useful to analyze thesolution, best tours, and pheromone level chances at theeach iteration. Some Critical screenshots taken from the pro-gram during step by step execution of finding optimum tourof 100 cities are shown in Fig. 2.

� How the colony solves the problem is illustrated in ‘‘withants” execution. All ants’ trail and pheromone levels are ani-mated by virtual ants as shown in Fig. 1a thus yieldingslower execution. It makes simpler to figure out both trail-laying trail-following behavior of real and virtual ants. Spe-cially, both global and local pheromone updating on edgesand changes of the pheromone levels can be seen visuallyat each ants move from one city to another. Simulationspeed can be controlled with the slider component atbottom.

� In ‘‘zoom to ant” method (shown in Fig. 3), ants are indexedand ask to user for selecting one indexed ant before execu-tion. The selection probabilities and available/unavailablecities are shown. By the way, city selection and tour con-struction policies of a virtual ant, and the effects of RPT rulecomponents could definitely be traced in real-time.

7. Real-time analysis support: TSPAntSim provides analysis of algo-rithms textually (Fig. 1c) and graphically (Fig. 1b). According tothe user choice (the selection window shown in Fig. 4a), the fol-lowing analysis that are commonly used (can be found in liter-ature such as [48,6]) can be shown graphically;� Best tour-so-far represents the found best tour so far (solu-

tion) after the each iteration.� Tour best represents the best ant tour length after the each

iteration.� Standard deviation illustrates the evolution of the standard

deviation of populations’ tour length.� Node branching is analysis of evolution of the average node

branching number. (The branching number of a node is thenumber of edges that exit from the node, the pheromoneconcentration of which exceeds a small threshold [48]).

enshot of analysis panel after BWAS execution.

346 A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349

TSPAntSim supports different types of chart representation(shown in Fig. 1b and Fig. 4b) by taking advantage of usingfree Java charting library jFreeChart (<http://www.jfree.org/jfreechart/>). Additionally, another panel documents thealgorithmic sequences during execution.

8. Analysis document exporting: After the execution complete, a pdftype analysis document with charts and textual reports can becreated if the user needs.

3.2. Architecture overview

TSPAntSim basically consists of three modules (Fig. 5): optimi-zation, visualization and analysis. Optimization module includesACO and local search algorithms (2-opt and 2.5-opt) and findsthe optimum route for the current TSP instance. TSP instance canbe constructed from ready TSPLIB instances and using add/deleteand dragging operations from the GUI. The algorithms are imple-mented as threads that lead to availability to use pause/resume ac-tions and change simulation speed. Additionally, this modulestores the pheromone levels, city probabilities and ant positionsfor the simulation.

Visualization module takes the responsibility of visualization ofalgorithms, TSP instances, ants, pheromones, optimum route, andetc. It takes the data from the outputs of optimization module dur-ing the execution of algorithms. This module supports animation ofoptimum route, virtual ants, pheromone levels and tracing theoptimization step by step. The analysis module generates analysisinformation by manipulating the outputs of optimization algo-rithm iterations. This module contains analysis algorithms (suchas standard deviation and node branching) about ACO and detaileddocumenting components. Documenting components consist ofonline chart and document generation classes. Specifically, withspecial libraries; iText (<http://www.lowagie.com/iText/>) andjFreeChart, this core documenting components can output Acrobat

APPLICATION

ACO AND LOCAL SE

VISUALIZATION MODULE

GRAPHICAL U

PDF

TSPL

Parameter Values

TSP IN

OPTIMU

OPTIMIZAT

Fig. 5. Architecture

PDF file analysis documents. An output document of the applica-tion has both generated charts and detailed online report of theexecution.

The GUI components are at the top level. GUI is implemented asa Java applet for web access. The application is user friendly andsupports interactive simulation and training. TSP instances areconstructed by using main panel on the left and top panel ofTSPAntSim. Mouse events are used to add/delete operations on cit-ies and change locations of them in TSP instances. Bottom panelcontrols the simulation speed and shows progression of algorithmas a part of GUI. The main tabbed panel shows the simulation andits results by using middle layer components.

Languages likes Java are object oriented. The total softwaredevelopment time is greatly reduced and the code quality is greatlyenhanced by using object oriented approach for our softwaredevelopment process. Object orientation makes the software moreflexible and reusable. So, it is easy to maintain and modify existingcode. For example, new optimization algorithms that can be devel-oped in the future can be added to the system easily. Other localsearch heuristics can be integrated with the system. Architecturethat we proposed can also be changed easily by this way.

4. Experiments with TSPAntSim

4.1. Comparison of algorithms

We compared the algorithm implementations for finding theiraccuracies on small size of TSPLIB instances. Tests are executedover 5 trials with the following parameters: a ¼ 1, b ¼ 5, m ¼ 20(population size), tMAX ¼ 10;000, q ¼ 0:5. Specifically, for MMASq ¼ 0:9 and b ¼ 10, e (number of elitist ant) is set as 10 for ElitistAS, rank limit is set as 7 for RBAS and q0 is set as 0.9 for ACS. Table 1shows the results obtained from the experiment. The computa-tional results in Table 1 show that generally MMAS and BWASachieve best performance. Regarding the performance of AS itcan be seen that AS performs so poorly compared to other algo-

ARCH ALGORITHMS

SER INTERFACE

ANALYSIS MODULE

FILE

IB

STANCETSP City (point)

operations (add, delete, drag)

M ROUTE

ION MODULE

TopLayer

of TSPAntSim.

Table 1Computational results of TSPAntSim over small size of TSPLIB instances

TSP instance Opt. MMAS ACS ASE AS RBAS BWAS

Eil51 426 427.6 428.1 428.3 437.3 428.1 427.9Berlin52 7542 7542 7542 7542 7554.6 7542 7542St70 675 676.6 678.9 696.4 702.1 686.4 676.2Eil76 538 538.0 542.3 545.9 548.6 545.5 538.0Rat99 1211 1211.2 1215.4 1251.5 1255.8 1221.3 1213.8

‘‘Opt.” indicates the known optimum solution value of instances.

A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349 347

rithms. Additionally, we can say that additional reinforcementtechniques (EAS, RBAS and MMAS) implemented over the AS reallyincrease the AS performance.

Fig. 6. Evolution of the standard deviation of the p

4.2. Evolutions of standard deviation

Another experiment is generated to figure out tour constructionbehavior of ACO algorithms. In this experiment, each algorithm isrun for the evolution of population standard deviation on Eil51 in-stance with same parameters. The obtained graphics are shown inFig. 6.

The graphics belong to the AS, EAS and RBAS indicate that theirbranching factors have greater values that tend to avoid algorithmgetting trapped in local optima. On the contrary, high standarddeviation values show tour construction divergence toward theoptimal solution leading performance decreasing. To prove thisidea, we run AS algorithm again to observe changes of iterationbest tour and constructed solution after each iteration. The result-

opulation’s tour lengths on Eil51 TSP instance.

Fig. 7. Evolution of best tour and iteration best tour lengths for ant system.

Fig. 8. Evolution of best tour and iteration best tour lengths for ant colony system.

348 A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349

ing graphic is shown in Fig. 7 that shows clearly best tours’ diver-gence to the solution.

The rest of the standard deviation’s graphics implicitly illus-trates why ACS, BWAS and MMAS show the better performancethan others. Because averagely low standard deviation values indi-cate that ants try to find new good solution around best-so-far tour(solution) without bigger branching factors. Therefore, acceptableresults can be achieved quickly. This tour generation behavior ofACS algorithm is shown in Fig. 8. Fig. 8 clearly shows that at almostall iteration, at least one ant traverses on the current best tour ornewer best tour. It causes to find optimal solution of Eil51 instancein early iterations (around after 100 iterations).

5. Conclusion

Main contribution of this paper is to develop a web-based inter-active simulation and analysis software for solving TSP using antcolony optimization algorithms. There is no other interactive sim-ulation environment including all ACO algorithms (AS, ASe, ACS,RBAS, BWAS and MMAS) applied to TSP by combining local searchheuristics with analysis support in the literature.

Researchers can prefer to compare results obtained from theirown algorithms with Ant Colony Optimization algorithms whichare supported by TSPAntSim. They can also observe the effects ofparameters of ACO algorithms by changing and simulating easily.

A. Ugur, D. Aydin / Advances in Engineering Software 40 (2009) 341–349 349

TSPAntSim includes predefined TSPLIB instances and also providescapabilities about interactive city (point) operations (add, delete,drag, etc.) for users. Setting up ACO experiments only takes a fewseconds.

Also, people who have TSP instances to be solved can preferTSPAntSim because of interaction capabilities of the program.Many practical applications can be modeled as a TSP or as variantsof it. Transportation or route planning (of airlines, buses, deliverytrucks and postal carriers, computer networks) is the most naturalone of TSP applications. Some other fields that TSP can be directlyapplied are: minimum job scheduling, PCB drilling, cryptography,etc.

References

[1] Kureichik VV, Kureichik VM. A genetic algorithm for finding a salesman’s route.J Comput Syst Sci Int 2006;45(1):89–95.

[2] Goldberg DE. Genetic algorithms in search, optimization and machinelearning. MA: Addison-Wesley, Reading; 1989.

[3] Laarhoven PV, Aarts EHL. Simulated annealing: theory andapplications. Kluwer Academic Publishers; 1987.

[4] Fiechter L. A parallel tabu search algorithm for large traveling salesmanproblems. Dis Appl Math Combinat Operat Res Comput Sci 1994;51:243–67.

[5] Dorigo M, Maniezzo V, Colorni A. Positive feedback as a search strategy.Technical report, Dipartimento di Elettronica, Politecnico di Milano; 1991.

[6] Dorigo M, Maniezzo V, Colorni A. The ant system: optimization by a colony ofcooperating agents. IEEE Trans Syst Man Cyber Part-B 1996;26:29–41.

[7] Dorigo M, Gambardella LM. Ant colony system: a cooperative learningapproach to the traveling salesman problem. IEEE Trans Evol Comput1997;1:53–66.

[8] Stützle T, Dorigo M. A short convergence proof for a class of ant colonyoptimization algorithms. IEEE Trans Evol Comput 2002;6(4):358–65.

[9] Jin HD, Leung KS, Wong ML, Xu ZB. An efficient self-organizing map designedby genetic algorithms for the traveling salesman problem. IEEE Trans Syst ManCyber Part-B 2003;33(6):877–87.

[10] Applegate D, Bixby R, Chvátal V, Cook W. On the solution of traveling salesmanproblems. Documenta Math Proc Int Cogr Math 1998;3:645–56.

[11] Baraglia R, Hidalgo JI, Perego R. A hybrid heuristic for the traveling salesmanproblem. IEEE Trans Evol Comput 2001;5:613–22.

[12] Padberg M, Rinaldi G. Optimization of a 532-city symmetric genetic travelingsalesman problem by branch and cut. Oper Res Lett 1987;6(1):1–7.

[13] Kuan SN, Ong HL, Ng KM. Solving the feeder bus network design problem bygenetic algorithms and ant colony optimization. Adv Eng Software2006;37(6):351–9.

[14] Coelho LDS, Mariani VC. Use of chaotic sequences in a biologically inspiredalgorithm for engineering design optimization. Expert Syst Appl2008;34(3):1905–13.

[15] Foong WK, Simpson AR, Maier HR, et al. Ant colony optimization for powerplant maintenance scheduling optimization – a five-station hydropowersystem. Ann Oper Res 2008;159(1):433–50.

[16] Shelokar PS, Jayaraman VK, Kulkarni BD. An ant colony classifier system:application to some process engineering problems. Comput Chem Eng2004;28(9):1577–84.

[17] Samrout M, Kouta R, Yalaoui F, et al. Parameter’s setting of the ant colonyalgorithm applied in preventive maintenance optimization. J Int Manuf2007;18(6):663–77.

[18] Liao YH, Sun CT. An educational genetic algorithms learning tool. IEEE TransEducation 2001;44:20.

[19] Collins TD. Applying software visualization technology to support the use ofevolutionary algorithms. J Visual Languages Comput 2003;14:123–50.

[20] Kollat JB, Reed P. A framework for visually interactive decision-making anddesign using evolutionary multi-objective optimization (VIDEO). EnvironModell Software 2007;22:1691–704.

[21] Ringwood JV, Galvin G. Computer-aided learning in artificial neural networks.IEEE Trans Education 2002;45:380–7.

[22] Manic M, Wilamowsky B, Malinowsky A. Internet based neural networksimulation tool. In: Proceeding of the IECON’02, vol. 4; 2002. p. 2870–4.

[23] Ramı´ rez JA, Guimaraes FG, Campelo F, Pereira EC, Barros PHL, Takahashi RHC,et al. Optimise: a computational environment for teaching optimization inelectrical engineering. IEEE Trans Magn 2004;40:695–8.

[24] Reiners T, Vob T. Teaching meta-heuristics within virtual learningenvironments. Int Trans Oper Res 2004;11:225–38.

[25] Foulloy L, Boukezzoula R, Galichet S. An educational tool for fuzzy control. IEEETrans Fuzzy Syst 2006;14:217–21.

[26] Effective Interactive AI Resources Workshop. IJCAI; 2001.[27] Symposium on Improving Instruction of Introductory AI. AAAI; 1994.[28] Dorigo M. Ottimizzazione, Apprendimento Automatico, ed Algoritmi Basati su

Metafora Naturale. Ph.D. thesis, Politecnico di Milano; 1992.[29] Dorigo M, Di Caro G. Ant colony optimization: a new meta-heuristic. In:

Angeline Peter J, Michalewicz Zbyszek, Schoenauer Marc, Yao Xin, Zalzala Ali,editors. Proceedings of the congress on evolutionary computation, vol. 2. IEEEPress; 1999. p. 1470–7.

[30] Dorigo M, Birattari M, Stützle T. Ant colony optimization: artificial ants as acomputational intelligence technique. IEEE Comput Intell Mag; 2006. p. 28–38.

[31] Costa Hertz A. Ants can colour graphs. J Oper Res Soc 1997;48:295–305.[32] Leguizamón G, Michalewicz Z. A new version of ant system for subset

problems. In: Proceeding of the CEC’99; 1999. p. 1459–64.[33] Solnon. Ant can solve constraint satisfaction problems. IEEE Trans Evol

Comput 2002;6:347–57.[34] Campos LMD, Fernández-Luna JM, Gámez JA, Puetra JM. Ant colony

optimization for learning bayesian network. Int J Approx Reasoning2002;31:291–311.

[35] Lessing L, Dumitrescu I, Stützle T. A comparison between ACO algorithms forthe set covering problem. In: Proceeding of the ANTS’2004, ser. LNCS 3172;2004. p. 1–12.

[36] Reimann M, Doerner K, Hartl RF. D-ants: saving based ants divide and conquerthe vehicle routing problem. Comput Oper Res 2004;31:237–55.

[37] Korb O, Stützle T, Exner TE. Application of ant colony optimization tostructure-based drug design. In: Proceeding of the ANTS 2006, ser. LNCS4150; 2006. p. 247–58.

[38] Grassé PP. La reconstruction dun id et les coordinations interindividuelles chezbellicosimetes natalensis et cubitemes sp. la théorie de la stigmerie: essaid’Inrprétation du comportement des termites constructeurs. Insectes Sociaux1959;6:41–81.

[39] Lin S. Computer solutions for the traveling salesman problem. Bell Syst J1965;44:2245–69.

[40] Lin S, Kernighan BW. An effective heuristic algorithm for the travellingsalesman problem. Oper Res 1973;21:498–516.

[41] Dorigo M, Gambardella LM. Ant colonies for the traveling salesman problem.Bio Syst 1997;43:73–81.

[42] Bullnheimer, Hartl RF, Strauss C. A new ranked-based version of the antsystem: a computational study. Central Eur J Oper Res 1999;7:25–38.

[43] Cordon O, Viana IF, Moreno L. New ACO model integrating evolutionarycomputation concepts: the best-worst ant system. In: Proceeding of the ANTS2000, Brussels; 2000. p. 22–9.

[44] Stützle T, Hoos HH. Max–min ant system. Future Generation Comput Syst2000;16:889–914.

[45] Shtovba SD. Ant algorithms: theory and applications. Program ComputSoftware 2005;31:167–78.

[46] Bentley JL. Fast algorithms for geometric traveling salesman problems. ORSA JComput 1992;4:387–411.

[47] Johnson DS, McGeoch LA. The traveling salesman problem: a case study inlocal optimization. In: Aarts EHL, Lenstra JK, editors. Local search incombinatorial optimization. Wiley and Sons; 1995.

[48] Bonabeau E, Dorigo M, Theraulaz G. Swarm intelligence from natural toartificial systems. New York: Oxford University Press; 1999.