Experimental Analysis of Ant System on Travelling Salesman Problem Dataset TSPLIB

INTRODUCTION: Traveling Salesman Problem (TSP) is one of the vast research areas and has been considered as sub problems in many fields apart from computer science and also in the field of computer science. OBJECTIVES: This paper deals with the comparison of Ant System Ant System (AS) which is a variant of Ant Colony Optimization. METHODS: The performance of the Ant System is analysed by applying it on the Travelling Salesman Problem (TSP). The optimal results found on TSP using AS has been analysed with the elapsed time taken to find the optimal results, its mean, median, variance and the standard deviation. RESULTS: And also, the quality of solutions has been made by calculating the percentage of the optimality and the deviation of the solutions from the TSPLIB provides best known solutions. For instances, TSPLIB data sets have been used. CONCLUSION: Totally, 7 instances have been executed with three different set of parameters for AS and the results are analysed in terms of different parameter settings and performance metrics on each of it. The role of parameters has also been discussed along with the experimental results.


Introduction
Traveling Salesman Problem (TSP) is one of the vast research areas and has been considered as sub problems in many fields apart from computer science and also in the field of computer science. It has been given the number of cities that are in need to be travelled by the salesman, and the distance between the cities will also be given. The salespersons are supposed to visit all the cities exactly once and they have to return to the source point or origin. The above is the scenario of the problem, and there al problem exists in this scenario is the salesman are supposed to travel across all the cities exactly once through the paths so that the cost or distance that the person travelled should be minimized.
TSP was been defined by W.R.Hamiltonin 1800. The first mathematical formulation of TSP was been studies in the year 1930 by Karl Menger. Then Hassler Whitney Kalaipriyan Thirugnanasambandam et al.
2 introduced this name TSP in a later period. In 1960's George Dantzig and some other persons at RAND Corporation expressed this problem as integer linear program and devised a solution to solve such problem, and it is called cutting plane method. Using this method to a maximum of 49 cities they have found out the best solution and stated that no other better results can be produced. Later GrotschelPadberg, et al, solved TSP using the same cutting plane method for 2392 cities. Branch and bound method also helped in finding out the optimal result for that big size problem in TSP. Concorde program was been developed in 1990's by Applegate, et al. This program has been used to solve many recent record problems to find better solutions. In the year 1991, Gerhard Reinelt published the TSPLIB which is a collection of benchmark instances of different levels of difficulties of TSP. This data set is used by many researchers nowadays for comparing their algorithm efficiency with the exact best solution. The largest TSPLIB instance that was been solved at last was of 33,810 city instances, which was done by Cook, et al.
On the other hand ACO dominates optimal solution construction of TSP and the results are far superior than the existing approaches when it compared with the computational time taken to solve TSP. The applications of ACO are described which includes Vehicular Routing Problem, Scheduling Problem, Assignment Problem.
Vehicle Routing Problem in one of the combinatorial problems where the search space is large and where we could not search for the entire possible search spaces i.e. exhaustive testing is not possible in those places. On such problems we may not get the best solutions all the time but it is possible to obtain the optimal solution. It may be above the average and mere to the best and may be the best solution. The problem is to deliver the service requested by multiple customers with the help of vehicles. In 1959, Dantzig, et al, introduced the problem in the field of transportation [1]. The service will be provided to the customers using vehicles which can move fast and from a central depot all the service will be provided through these vehicles. And the problem that exists with this Vehicle Routing is the ways that the vehicles choose the next visit customers. It should reach the depot and at the same time the distance travelled need to be optimum. In this problem finding the global best minimum optimum solutions became computationally complex since the possible ways to deliver between multiple customers in a single day may require the time to be delivered for each customer should be minimum [2]. And also if a customer have multiple ways to reach them or if they have multiple ways to reach the next customer which way needs to be chosen so that the distance travel can be reduced.
There are possible numbers of different problem are there inside this Vehicle Routing Problem. The classic Vehicle Routing Problem is as mentioned above i.e. the customers need to be served with the request they need from a central depot using fleet of vehicles and should reach the same depot at the end of the day. Also in this the distance travelled by all the vehicles should be minimised. Some of the classified problems under this VRP are Vehicle Routing Problem with Pickup and Delivery where the needs of the customers will not be served from the depot which means the vehicles are in need to pick up the goods from certain places which are called Pickup locations and it is in need to be delivered to the customers which are called Delivery locations. In this problem also the same aim as like classic VRP i.e. to find the optimum path [3] to carry on all the operations. Next comes Capacitated Vehicle Routing Problem and in this the problem exist is as the same as classic Vehicle Routing Problem and along with additional constraint as the vehicle is capacitated i.e. the vehicle that are used to serve for the customers are limited in terms of capacity (i.e. limit exists that the vehicle can hold only certain amount weight at a time) [4].
Scheduling is the process of allocating or sequencing a set of process to be handover or to be handled by any other resources to do some operations. The scheduling is the another optimization problem [21,22] where the search space is so large and the exhaustive testing to find the best solution is almost not possible or such a testing leads to waste of time as well as energy. The problem that exists in scheduling is the way of sequencing the objects so as to minimize the overall computational process or time or the resources that are used during the operations. There are many Scheduling Problem exists and many of them have been solved using ACO [16,17] [5][6][7][8][9][10][11][12][13][14][15].
Jing Xiao, et al [18] solved project scheduling problem using ACO. They have proposed a new algorithm called Ant Colony System-Software Project Scheduling Problem (ACS-SPSP) algorithm. The software project should be scheduled in terms of duration so that it should be finished in time and it should utilize the employee's skills and the cost associated with it. And also the employees can have more than one skill and their skills also should be utilized properly by considering the working time of the employees. In this paper, Jing Xiao considered all the employee skills and their dedication towards the project and these employees have been appointed to do a project which consists of several tasks. This problem has been solved using ACO by mapping the employee dedication in the form of vertices in a graph and the dedications are kept in column wise. The ants are then allowed to travel and the constraints like required skills for the project and the employee's dedications were been imposed. The ant travel in a path and reach the destination, the travelled path will get laid using pheromone and over a number of iterations some path will get high concentration of pheromone and that will be chosen as the optimum path and the number of employees with their dedication will be chosen according to the acquired path. Experimental Analysis of Ant System on Travelling Salesman Problem Dataset TSPLIB 3 Assignment Problem has also been considered as combinatorial optimization problem where the search space is more and an optimal solution is better than searching for best solution. In general assignment problem is assigning a task to an agent to do with incurring some cost to do the task and assigning the task to the agents may be one to one or many to one and the cost is purely depend on the agent-task assignment. The way of allocating the tasks to the agents can be altered in any ways but the final result of total cost spent on finishing all the tasks needs to be minimized.
One of the problems in Assignment Problem is Quadratic Assignment Problem. This problem is also to be considered as combinatorial optimization problem since the possible solutions for this problem is in very large manner and an exhaustive testing to find the best solution is almost not possible. So it's better to seek for optimal solution and the quadratic Assignment Problem have been solved by using Simulated Annealing, Tabu Search, etc., before it is solved by ACO. This ACO technique gives better solutions often than the previous techniques.
The contributions made in this paper includes: • The well-known Ant Colony Optimization model's variant namely Ant System has been tested on the Travelling Salesman Problem Dataset called TSPLIB. • For a deep analysis on the performance of the Ant System model, 7 different instances with different number of cities are provided. • The analysis has been made through the comparison of convergence towards optimal solution with respect to the number of iterations. The rest of the paper is organized as follows: Section 2 handles the related work corresponding the theme of this analysis work, section 3 discusses the TSP problem. Section 4 deals with the introduction part of ACO and working principle of AS. Section 5 shows the experimentation and analysis procedure. The final section concludes the paper.

Literature Survey
Bin Yu, et al. 2011 [19] proposed Improved Ant Colony Optimization (IACO) for solving the Period Vehicle Routing Problem with Time Windows (PVRPTW). This problem is different from the classic Vehicular Routing Problem in the way that the VRP is the one which is in need to deliver the customer only once in a day and in with the minimum distance travelled and finally it should reach the depot. PVRPTW is an extended version if same classic VRP in days. PVRPTW delivers to the customer request in several days without extending the maximum capacity of the vehicle and also it needs to deliver only once to a customer in a single day and it should return to the depot.
Need of this technique is to deliver the customer the request they need can be fulfilled within the time stamp and the time stamp may be considered of several days and also with a constraint that it should not exceed the maximum capacity of the vehicle and also it should deliver the response only once in a day and it should reach the depot at the end of the day. Without this technique if the customer request exceeds the maximum capacity of the vehicle then in classic VRP that service could not be done. This PVRPTW can solve that problem by delivering the service to the customer in more than one day or may be daily during the time stamp and finally deliver the service to all the customers at the end of the time stamp. This has been done with the Ant Colony Optimization and along with the crossover operation in order to increase the performance of the algorithm. The pheromone for multiple days has been formulated in the form of multi dimension pheromone matrix and thus the pheromone information for several days has been maintained. The parameters that are taken into account to solve this PVRPTW are number of customers that request the service, depot, information of which customer are need to be served daily or only once or to a specified number of days. The selection of customer to be travelled in the tour is based on the probabilistic rule using both visibility and pheromone information. To make a proposal to be solved using Ant Colony Optimization the problem should be represented in the form of graph. The problem is transformed to the proposed system in the way that the vertices of the graph has been placed with the customers who needs to be served and the edges are been filled with the multi dimension pheromone information for updating the pheromone trail for different days in different format.
Christine Solnon in 2008 [20] introduced ACO in car sequencing problem. The car sequencing is the process of sequencing the cars in an assembly line in which the facilitated options can be installed. There are two problems that are associated in this problem and the first one is sequencing the good cars which mean which have a low utilization value which will be discussed later and the constraint is the capacity of the line should not get exceeded more than the capacity of the station that serves the particular option to the car. The second one is finding the critical cars which have high utilization value and sequencing those cars which may have different options and their processing time can be more for each car. So the critical cars are needed to be sequenced in such a manner it should not exceed the capacity of the station as well as it should not consume more time to serve. The critical cars should be sequenced in a manner so that the overall processing time to install the options in minimum time as it is possible. This is also been a benchmark problems for Constrained Solvers [23][24][25][26] ant it is formulated as Constraint Satisfaction Problem. C. Solnon [29] introduced the ACO in solving Constraint Satisfaction Problems. Some of the other optimization solving techniques are local search [30][31][32][33][34][35], large neighbourhood search [27,28,[36][37][38][39], etc. The theme of ACO can be used to solve as the search in a graph for finding minimum cost to travel the path has been found out in [40][41][42]. There was a heuristic method EAI Endorsed Transactions on Pervasive Health and Technology 05 2019 -08 2019 | Volume 5 | Issue 19 | e4 4 [43] which was been devised by the same author to solve the care sequencing problem. That greedy method will be allowing choosing the consecutive cars to fall in a line. This Algorithm was been combined with the ACO in order to choose the next chosen cars that are to be sequenced in an assembly line. The need of this paper is to sequence the cars that are need to be fixed with some options and also finding the critical cars which are need to be sequenced with more care and well in order to minimize the time period.
The car sequencing problem can be solved by taking into account the set of cars that should be produced, the options that are available which are to be fixed to the cars based on the requirements needed by the car or by the order, the capacity of the assembly line. Before applying ACO in car sequencing problem some values are need to be calculated and they are the heuristic value to choose the next car to fall on line and it can be obtained by using the utilization rate of a car. The utilization rate is the value of a car based on its requirements. There are two pheromone structures are available for solving the car sequencing problem. First, sequencing good cars in order i.e. the cars which are in need of requirements to be fixed from similar station and which is having small utilization rate.
Secondly, for identifying the critical cars and to sequence those cars in order so as to reduce the total time. These critical cars identified based on the heuristic function and also with the first pheromone structure. In this the problem is solved after identifying the critical cars is grouping the cars which require similar requirements and defining it as a class. The first set of pheromone structure has been used with the variant of Max-Min ACO. And both the pheromone structures combined to form the optimal solution. First pheromone structure will return the sequence of good cars and the second pheromone structures identifies the critical cars and group it based on the requirement similarity. Not only car sequencing problem, many problems have been solved by hybridizing the ACO with other heuristics or any other techniques. [44][45][46][47][48][49][50][51]. The other recent research articles on TSP can be found in [57][58][59][60][61].

Problem Definition
Optimization task involved in TSP is cumbersome to solve a lot of real-world applications. It is because of the combinatorial options that it naturally has, which is the selection of cities so as to reduce the total cost travelled over to complete a cycle, and each city should be visited only once in a cycle. This computational result will be very effective when compared to the other simulations where a lot of results like runtime analysis, total elapsed time for an optimal result, the deviation percentage from the actual value which was been stated in TSPLIB. Using this, answers will be well analysed compared and the parameter works will be very well explained along with computational results.

Objective Function
Travelling Salesman problem is one of the NP hard problems which can be optimized in polynomial time. Travelling salesman problem exists with it is the salesperson need to travel all the cities that are existing in a network with minimal number of cost to travel. The sequence of cities that the person is going to travel should be in such a way that it should be minimal cost or the distance. This problem was been considered as the NP hard problem since it can be solved in polynomial time (i.e. the time taken to achieve the optimal solution of the problem will get increased as the problem size (i.e. number of cities) gets increased). There are two types of Travelling Salesman Problem [52,53] existing. First, Symmetric Travelling Salesman Problem and in this problem the path between two cities will return same result either the sales person travels forward or backward. That is, if the person needs to travel form node i to node j or node j to node i the traveling distance will be the same and there will be no difference in terms of cost or in terms of distance. Usually the cost is termed as distance in this travelling salesman problem. Second, Asymmetric Travelling Problem and in this problem there will be difference when a salesperson travels from one city to other and when returning back to the same city to through the same path (i.e. travel from node i to node j will not give the same distance while travelling from node j to node i). The difference in terms of distance may exist in the Asymmetric Travelling Salesman Problem.
The main objective function of the Ant System algorithm is to result the TSP problem with a maximum set of optimality over a particular period of time. In our evaluation the objective function is to know about the parameter selections and their working over the algorithm. Almost a mini game have been played using the parameters and the results have been tabulated along 5 with the elapsed time and also the mean, variance, standard time deviation have been tabulated and this will give you the idea of how to choose the parameters in order to complete the optimality as well as the time based execution.
The objective of TSP can be represented mathematically as …….

(Eq. 1)
Such that cost represents the travelling distance between city i and j and x∈0|1.

Objective Function
Problem has been formulated according to the Ant Colony Optimization so that it is in need to get solved using ACO technique. So the problem has been represented in the graph format where the cities are represented in the form of nodes and the link between two cities will be mentioned as the arcs which link the nodes [63]. Now the problem has been formulated. The number of ants that are in need to travel along the path that connects the nodes in order to find the optimal path has been defined. For making the non-optimized path not to get participated in the later iterations, evaporation rate for the pheromone has been devised. It reduces the concentration of pheromone over the path that it has been travelled minimum number of times. Then another value which mentions the concentration of heuristics and the participation of pheromone guidance in order to choose the next visiting node has been formulated along with the system. TSP is an NP hard problem which makes the sense non deterministic polynomial-time hard problem i.e. solving the problem for giving the best path on all times of execution is highly impossible and also solving or execution time for the problem gets increased as the size of the problem gets increased.

Framework of ACO
The ACO algorithm is given in Pseudocode format and the representation of symbols are given here. Solution S with the constraints Ω and an objective function f : S R+ . Working of ACO algorithm is to find out an optimal solution in a search space where finding the best solution is almost not a possible case. In such a space, with an initial solution the process starts and after iteration by iteration due to the heuristics and the pheromone trail concentration over the path to reach from one node to another made the difference in searching the optimal results and finally an optimal solution that was ben reached among the number of iterations that were been made will be presented.
The general flow of algorithm is as follows Input: An Instance P of a CO problem model P = (S, f,

Ant System
In the year 1991, Ant system (AS) was been proposed [54][55][56]. It was first deployed to the travelling salesman problem. The problem of TSP is to let the artificial ants to travel in a graph from one node to the other (i.e. to let the artificial ants to travel from one city to another so that all the cites needs to be visited with minimal cost) to let the ants and the algorithm executed for t times where t has been considered as the iteration number. The iteration number is depends on the user. For each iteration m ants build a complete tour executing n steps in which state transition rule has been applied. AS was been made in 3 versions namely ant-density, ant-quantity and ant-cycle. The difference between all the versions are not remarkable in both the 1st and 2nd version i.e. ant-density and ant-quantity. But on comparing 1st 2 versions with the 3rd version there exists remarkable differences. In the 1st 2 versions the ant laid the pheromone in all the paths they used to cross between nodes i and j where i and j will be considered adjacent nodes to each other. But in 3rd version the laid part of pheromone over the edges of the nodes will be done after all the ants construct the complete tour. Pheromone quantity deposited by each ant is based on the quality of the tour constructed. When comparing the entire 3 version, 3rd version provides best results. The 3rd version gives the better result in AS versions so it was been declared as the usable one and the other two versions were not in use.
There were 2 main steps that are there in Ant System and they are the Tour Construction and Pheromone Update on the nodes that the ant travels.

Tour Construction
Initially, each ant will be put on some random chosen node. In each step of constructing the tour, ant k will be given a probabilistic action to travel from one node to other. The probability of an ant k moves from current node i to the adjacent node j will be of the form, where is the heuristic value that is available, is the kneeboard node of ant k, and when α = 0 then mostly the neighbour cities will be selected. If β = 0 then only the pheromone amplification will be working.

Pheromone Update
After the ants construct path, pheromone update will be made. This will be done after deducing the pheromone strength on the entire arc by a constant factor and then the deposit of pheromone will be made as follows where is the pheromone trail evaporation and it will lie in between 0 and 1, is the amount of pheromone deposited on the arc it travelled and it is defined as .The detailed flow chart is given in Figure 1.

Real Data Example
In this section we demonstrate how the Ant System get works based on the given parameters and the parameter working have also been analysed. The parameters are given in order to know the working of it over the algorithm. Difference between the parameter settings of Ant System were executed and the results have been compared and analysed. In Ant System the nodes used to get into the participation of tour only iterations after iteration and not in the first iteration itself. In order to find the minimum distance travelled by a salesperson the execution has been made under different scenarios. The comparison has been made and the results have been tabulated in the Table 1, 2 and 3 for Ant system. Both the time based as well as the distance-based calculation have been tabulated and compared. The datasets are collected from TSPLIB official site cited in [63].

Sensitivity of Parameters in AS
As it is mentioned above, α and β values plays a major role in the iterations. The α value mentions the weight of the pheromone in the transition rule of the ant colony system (or) the local pheromone (history) coefficient (α) controls the amount of contribution history plays in a components probability of selection. And the β value denotes the weight of the heuristic in the transition rule of the ant colony system (or) the heuristic coefficient (β) controls the amount of contribution problem-specific heuristic information plays in a components probability of selection. So in AS the control over the set of parameters is so essential. In this Ant System, the α and β values controls the direction of which side the ant needs to travel and when the value of α goes 0 then the ants will be directed as per the heuristics and when beta value falls 0 then complete set of direction of ants will be based on the pheromone value of the previously visited ants over the arcs. And r.h.o means the pheromone evaporation rate. The pheromone evaporation rate is the value that the pheromone density gets evaporated over a particular amount of time and the time here will be common in both the cases. Usually the r.h.o values lies in the range of 0 to 1.

Analysis of Parameters
In this section the analysis of parameters i.e. working of α, β, and r.h.o values gets involved in finding the optimal results of a TSP problem. Simulation of TSP with different parameter settings has been done and the results for Ant System have been shown in the given Figure 2.
All the possible ways of how the parameter plays over Ant System algorithm and Max Min Ant System algorithm have been done and the results were listed above.

Effects of Different Parameter Selection
The effect of different parameter selection makes the Ant System to get converged before the maximum iteration time. It shows the simulation of the working of parameters over the algorithm we have used for solving TSP. It was not been made to converge the TSP optimality soon but to show the effects of the parameters on the algorithms. Table 4 shows the parameter settings for Ant System.

Parameter Selection and Optimization Method
For a better understanding here it is mentioned that the parameters selection to play with AS. First, α value will be examined. α value lies between the interval usually or traditionally between 0 to 5. This gives the weight of pheromone density impression to travel tour for each iteration. If the value of α gets 0, the tour will be constructed with the help of heuristics. And if the value of α fixed to 1 then there will be some concentration of pheromone density set will be used to choose the next node to be visited. And the same is for the value β also. The optimization method of TSP via this parameter selection does not ends up with α and β alone. There is another parameter called r.h.o which means the pheromone evaporation rate. This r.h.o gives the rate of at what quantity the pheromone should get evaporated over a particular amount of time. The evaporation of pheromone density which was laid by the previous set of ants is to eliminate the longest path to reach the destination from the consequent iterations. The figure 2 shows the convergence graph of Ant System on all chosen TSPLIB dataset instances.