The Travelling Salesman Problem - Ant Colony Optimisation Emma Stubington Ivar Struijker Boudier STOR-i, Lancaster University; The Problem: Optimal Tour through America The travelling salesman problem (TSP) aims to find the shortest route through n cities, visiting each city (vertex, V) only once and returning to the start vertex. In this study we refer to the well known 48 States of America problem where we are looking to find the shortest tour round America (excluding Alaska and Hawaii). To do this we explore Ant Optimisation. 1 Each kth ant is put on a randomly chosen city to start and chooses the next city by the random proportional rule given by: α pijk =P β [τij ] [ηij ] α if j ∈ Nik β [τil ] [ηil ] where τij is the pheromone level, initially this is proportional to of ants ( number upperbound ) (upperbound from the nearest neighbour algorithm) and ηij is the heuristic desirability (inverse of the route length.) Update Mk, the ant memory to include the city just visited Repeat steps 1-3 until (n-1) arcs have been added Update pheromone trails: l ∈Nik The Nearest Neighbour Algorithm- An Upper Bound For Ant Optimisation we require a good upper bound to the problem. We use the Nearest Neighbour algorithm: 1 Starting at a random city look for the closest city to travel to without considering the consequences later on in the process. 2 Repeat until all cities have been visited. 3 Add an edge from the final city back to the start city. This gave the lowest upper bound starting at city 10, with a tour length of 37928. (figure1a) Results Ant Systems (AS) 2 3 4 τij ← (1 − p) τij ∀ (i, j) ∈ L and p = 0.5 Deposit pheromone on the arcs used in all the tours: τij ← τij + m X ∆τkij k=1 1 if Ck Update best tour so far; repeat from step 1. Figure 2a shows the tour found using this method with length 35507. 5 Elitist Ant System (EAS) Figure 1: Bounds for the 48 states of America TSP Cutting Planes - A Lower Bound The Cutting Plane method gives a lower bound to the optimal solution. For a large TSP it is infeasible to solve min cTx subject to x ∈ S. cT is the cost vector of moving between cities S denotes the set of incidence vectors corresponding to all tours. We solve the linear relaxation min cTx subject to Ax ≤ b. Ax ≤ b is a system of linear inequalities that are valid for all tours. This is then solved using the simplex method which results in the lower bound 33476. (figure1b) Ant Optimisation Ant Optimisation is based on the natrual behaviour of ant colonies. Ants always try and find the shortest route to a food source They leave a trail of pheromone for other members of the colony to follow. Over time the pheromone evaporates so longer paths fall into disuse. Each ant builds a complete tour before the next one starts. (c) Best AS−rank tour, length=33551 ∀ (i, j) ∈ L k (i, j) belongs toT arc ∆τkij = 0 otherwise Ck is the length of the tour of ant k, Tk is the tour route of ant k. (b) Lower bound (b) Best EAS tour, length=34598 Lower pheromone on all the arcs by a constant factor given by: Upper and Lower Bounds (a) Upper bound (a) Best AS tour, length=35507 This method adds a strong additional reinforcement of pheromone to the arcs on the best tour found so far, Tbs. Pheromone evaporation occurs as before and the pheromone is now deposited with the additional term: 1 bs bs if arc (i, j) belongs toT bs C e∆τij = 0 otherwise e = n, Cbs=length of the best tour found so far. Figure 2b shows the tour found using this method with length 34598. Figure 2: Tours found for the Ant Optimisation, each after 1000 iterations Analysis & Results AS and EAS explore more than ASrank ASrank gives the best tour, and settles at it quickly but provides the worst initial solution. ASrank took the longest time to run, taking 502 seconds to run 1000 iterations, however it did converge earlier. The difference between my lower bound and best tour length is 0.224% of the lower bound. However 2c could be the optimal tour. Rank Based Ant System (ASrank ) Pheromone is deposited according to the rank-(r) of the ant’s tour. Sort ants into increasing tour lengths. At each iteration only the (w − 1) best ranked ants deposit pheromone and the best so far ant deposits pheromone (as in EAS). w −1 X r bs τij ← τij + (w − r )∆τij + w ∆τij ∀ (i, j) ∈ L r =1 1 1 r bs τij = r τij = bs w =6 C C Figure 2c shows the tour found using this method with length 33551. Figure 3: Graph to show the change in tour length as the iteration number increases for Ant Optimisation Methods. The Red lines represent Upper and Lower Bounds from tours in figure 1 References Marco Dorigo and Thomas Stützle, (2004). Ant Colony Optimization Values of constants taken from here. Willian J. Cook (2012). In Pursuit of the Travelling Salesman Book introducing the TSP America problem with a history of TSP solving methods [email protected]
© Copyright 2026 Paperzz