140 likes | 383 Views
An Application of Particle Swarm Optimization: The Traveling Salesman Problem. Russ Eberhart John Douglas. Traveling Salesman Problem. The Traveling Salesman Problem (TSP) is a combinatorial optimization problem
E N D
An Application of Particle Swarm Optimization: The Traveling Salesman Problem Russ Eberhart John Douglas
Traveling Salesman Problem • The Traveling Salesman Problem (TSP) is a combinatorial optimization problem • Given a list of cities and their relative distances from each other, the task is to find a shortest possible tour that visits each city exactly once • It is a common benchmark for optimization methods • Worst-case running time increases exponentially with the number of cities
Traveling Salesman Problem • The demo creates a set of points • Each point is randomly located within a fixed environment Cities
Traveling Salesman Problem • The demo runs in one of two modes: • Brute Force • PSO
Traveling Salesman Problem: Brute Force Absolute Best Path (1.8 sec) 8 Cities
Traveling Salesman Problem • In “Brute Force” mode, the demo searches through every permutation of cities traveled. • Time to solve depends on the number of permutations. • This time increases exponentially with the number of cities, as the sums of every possible permutation of paths is calculated. • If run in its entirety, Brute Force guarantees the shortest path because all possibilities are explored.
Traveling Salesman Problem • In “PSO” mode, the demo uses PSO to determine the shortest route. • Time to solve depends on the parameters of the Swarm (# of iterations, population size) as well as the number of cities. • Time to solve with PSO increases linearly with the number of cities, corresponding to the time it takes to sum the distances among the pairs of cities in the sequence.
Traveling Salesman Problem • As the number of cities are increased, the Brute Force approach becomes less practical:
Traveling Salesman Problem • With PSO, a short path, not necessarily the shortest, can be found much quicker
Traveling Salesman Problem • PSO solution depends on the number of paths evaluated • Searching more of the problem space allows the system to present better results • Increase the number of particles and/or the number of iterations • Allow the PSO to run until certain criteria are met • Optimum path length ≤ some maximum length • Run time ≤ some maximum time
Traveling Salesman Problem: PSO Demo 40 Particles 100 Iterations (0.4 sec) 60 Particles 1,000 Iterations (5.8 sec) 100 Particles 1,000 Iterations (9.4 sec) 30 Cities
Traveling Salesman Problem • Summary • Particle Swarm Optimization can find an optimal or near-optimal solution to a complex problem in a very short amount of time • The time required to find a useful solution for the Traveling Salesman Problem can be on 18 orders of magnitude less for a 30-city scenario using PSO than Brute Force • A lifetime of searching can be reduced to a few seconds with PSO