Актуальные проблемы авиации и космонавтики - 2021. Том 2
УДК 519.7
THE COMPARISON OF METHODS FOR TRAVELLING SALESMAN PROBLEM
SOLVING
Ma Xuechun, S.S. Bezhitskiy*
Reshetnev Siberian State University of Science and Technology 31, Krasnoyarskii rabochii prospekt, Krasnoyarsk, 660037, Russian Federation
*E-mail: [email protected]
The Traveling Salesman Problem is considered in this paper. Three methods are used for problem solving. The efficiency of used methods are compared.
Keywords: Traveling salesman problem, algorithm, efficiency
СРАВНЕНИЕ МЕТОДОВ РЕШЕНИЯ ЗАДАЧИ КОММИВОЯЖЕРА
*
Ма Сюэчунь, С. С. Бежитский
Сибирский государственный университет науки и технологий имени академика М. Ф. Решетнева Российская Федерация, 660037, г. Красноярск, просп. им. газ. «Красноярский рабочий», 31
*E-mail: [email protected]
Рассмотрено решение задачи коммивояжера. Использовано три метода для решения задачи. Проведено сравнение эффективности методов.
Ключевые слова: задача коммивояжера, алгоритм, эффективность.
Introduction. Many problems in practice and science can be transformed into Traveling salesman problem (TSP) [1]. For example, the goal of the problem of rocket trajectory arranging is to save fuel. The scale expansion of this problem becomes a thorny problem to find optimal solution. The continuous development of artificial intelligence gives us highly promising intelligent optimization algorithms to solve such problems as TSP. The most popular optimization algorithms of intelligent optimization are simulated annealing algorithm, particle swarm optimization algorithm, genetic algorithm, ant colony algorithm, etc.. The comparing of efficiency of these algorithms are quite important goal. In this paper, simulated annealing algorithm, ant colony algorithm and particle swarm algorithm are compared to solve TSP.
TSP is a combinatorial optimization problem. The problem can be proved to have NPC computational complexity. Therefore, any method that can simplify the solution of the problem will be highly valued and concerned.
TSP is one of the most famous problems in graph theory, that is, "given a complete graph with n vertices, each edge has a length, find the shortest total length of the closed circuit which passes through each vertex exactly once" [2,3].
1. Applying some algorithm to solve TSP
TSP problem description. Suppose a person travels to 52 cities, requires each city to go once and cannot be repeated, and finally returns to the original city of departure, try to find the shortest distance to the original city after traversing these 52 cities.
Let the path to 52 locations be represented by vector U, their coordinates exist, then the distance between is calculated as Euclidean distance. Data is located on web cite [4].
1.1. Use ant colony algorithm to solve problem
Секция «Математические методы моделирования, управления и анализа данных»
Ant colony optimization (ACO), also known as ant algorithm, is a probabilistic algorithm used to find the optimal path in the graph. It was proposed by Marco Dorigo in his doctoral dissertation in 1992, and its inspiration comes from the behavior of ants finding paths in the process of searching for food. Ant colony algorithm is a kind of simulated evolutionary algorithm.
Parameter settings and results of ant colony algorithm. Number of iterations: 500. Number of ants: 80. Pheromone importance factor = 1
Heuristic function importance factor = 5
Pheromone volatilization factor = 0.2
Fitness function is calculated as Euclidean distance.
Result: shortest distance: 7698.88. Execution time: 27.079s
1.2. Applying particle swarm optimization algorithm to solve TSP problem
In 1995, James Kennedy, an American social psychologist, and Russell Eberhart, an electrical engineer, jointly proposed particle swarm optimization. The basic idea of PSO is inspired by the research results of modeling and Simulation of bird group behavior [5]. Their model and simulation algorithm mainly modified Frank Heppner's model to make particles fly to the solution space and land at the best solution. Parameter settings and results of PSO. Number of iterations: 500. Number of particles: 1000. Fitness function is 3.
Result: shortest distance: 8219.3097. Execution time: 34.752s
1.3. Applying Simulated Annealing algorithm to solve TSP problem
Simulated annealing (SA) was first applied to combinatorial optimization by Kirkpatrick et al. Its starting point is based on the similarity between the annealing process of solid matter in physics and general combinatorial optimization problems. The simulated annealing algorithm starts from a higher initial temperature, with the continuous decline of temperature parameters. The final algorithm tends to the global optimal solution when the temperature tends to the lowest critical value [1].
Parameter settings and results of SA. Maximum iterations of outer loop = 500. The maximum number of iterations of the inner loop is 15. Initial temperature = 0.025. Cooling factor = 0.99. Probability of choosing switch fabric = 0.2. The probability of choosing reversal structure is 0.5.
Probability of selecting insertion structure = 0.3. Fitness function is presented as 3.
Result: shortest distance = 8070.28. Execution time: 27.69s
2. Conclusion
We use matlab to make images of fitness value of each algorithm in fig. 1.
j u la
3.5
3
2.5
(B
1.5
0.5
0 50 100 1 50 200 250 300 350 400 450 500 number of iterations
Fig.1. Fitness value comparison of PSO, SA, ACO
Актуальные проблемы авиации и космонавтики - 2021. Тома 2
By comparing the results of the above algorithms, we find that ant colony algorithm can get better results in dealing with TSP problem, the convergence speed is faster than particle swarm optimization and simulated annealing algorithm, and the shortest distance is shorter than particle swarm optimization and simulated annealing algorithm. The simulated annealing algorithm also takes a short time to deal with the problem, but its convergence speed is too slow. Particle swarm optimization algorithm for the other two algorithms, the convergence speed is relatively fast, but the processing time is the longest and can not get a better shortest distance. So when dealing with TSP, we should choose better ant colony algorithm and simulated annealing algorithm.
Bibliographic references
1. Zhang H, Bai G, Liu C. A broadcast path choice algorithm based on simulated annealing for wireless sensor network[C]. IEEE Int Conf on Automation and Logistics. Zhengzhou: IEEE, 2012: 310-314
2. Dantzig G, Johnson S. Solution of a large-scale traveling-salesman problem. Operations Research,2010, 2(4): 393-410.
3. Tsai C F, Tsai C W, Tseng C C. A new hybrid heuristic approach for solving large traveling salesman problem. Information Sciences, 2004, 166(1/2/3/4): 67-81.
4. Data source. [Электронный ресурс]. URL:http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95
5. Poli, R., Kennedy, J. & Blackwell, T. Particle swarm optimization. Swarm Intell 1, 33-57 (2007).
© Xuechun M., Bezhitskiy S.S., 2021