Documentation
¶
Overview ¶
* Author: Taha Shaikh * === Ant Colony Optimization for the Traveling Salesman Problem === * * === Usage === * Comment out whichever file/data not needed and uncomment file/data at * line numbers 60 and 90 to execute ACO on * * === Implementation === * - Reads the DIMENSION field in the file provided for the total number of cities * - Reads the coordinates of each city in the NODE_COORD_SECTION and saves them in * a list of cities * - Creates an adjacency matrix for the cities, computing edge weights by the * calculating the euclidean distance between every two cities * - Initialize the tau matrix (pheromone levels) for each edge * - initialize each ant and provide them a random city to start * - Each ant traveses the path and chooses each city using a probability which * is computed using a formula * - Update the tau matrix (pheromone levels) after one tour has end * - Run 500 tours 10 times to obtain average and best tour length values