Implementing Ant Colony Optimization (ACO) algorithm for a given Symmetric traveling salesman problem (TSP)
Taking as data the The 100-city problem A kroA100.tsp by Krolak/Felts/Nelson and additional results for 52 locations in Berlin berlin52.tsp by Groetschel
It is an optimization algorithm used to find the shortest path between points or nodes. It is developed by observing the behaviour of ants when they follow a path to their food source. Ants are essentially blind so they follow pheromone trails left behind by other ants on the path. This algorithm follows the same approach by using the probability of going to the next node as the distance to the node and the amount of pheromones.
Given a set of n nodes and distances for each pair of nodes, find a roundtrip of minimal total length visiting each node exactly once. The distance from node i to node j is the same as from node j to node i.
Yefferson Marín - (@yammadev)
Check the Jupiter notebook with details.
Generated by testing.py using library.py and stored data/*.tsp files. See results/ folder for details.
Stored in results/kroA100-results.txt
Stored in results/berlin52-results.txt
All notable changes to this project are documented in this part of the file. The format is based on Keep a Changelog.
- x for major release related to major additions or changes.
- y for minor release related to minor additions or changes in current major release.
- z for minor release related to minor additions or changes in current minor release.
- Added for new features.
- Modified for changes in existing functionality.
- Deprecated for soon-to-be removed features.
- Removed for removed features.
- Fixed for any bug fixes.
- Security in case of vulnerabilities.
Readmeedited.
Readmeedited.
aco-tsp.pdfwith paper version ofJupiter Notebook.
Jupiter Notebooklittle improvements.
aco-tsp.pyexecutable script exported fromJupiter Notebook.- Code cleaning.
Jupiter Notebookcompleted.- Generated files.
- Sending algorithm data to generated files, to set different values as desired.
ACO_TSPalgorithm completed.berlin52.tspfile added -52 locations in Berlin(Groetschel).- Testing code that output
x-space.png,x-path-x.pngandx-results.txtfiles, and store them inresults/folder for a given.tspfile stored indata/. - Code optimization.
Jupiter Notebookimplementation added.
- Restructured for better code reading and implementation.
- Plotting features.
- Better code structure.
- Readme edited.
.tspdata is readen and displayed.- Calls from
Jupiter Notebookfile.
- Initial commit with minimal
Jupiter Notebookconfig. kroA100.tspfile added - the100-city problem A(Krolak/Felts/Nelson)







