Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madvas/travelling-salesman-problem
Multithreaded Clojure solution to Travelling Salesman Problem
https://github.com/madvas/travelling-salesman-problem
Last synced: 3 months ago
JSON representation
Multithreaded Clojure solution to Travelling Salesman Problem
- Host: GitHub
- URL: https://github.com/madvas/travelling-salesman-problem
- Owner: madvas
- License: gpl-2.0
- Created: 2016-02-12T10:42:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-12T10:56:12.000Z (almost 9 years ago)
- Last Synced: 2023-02-26T04:52:06.781Z (almost 2 years ago)
- Language: Clojure
- Size: 16.6 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Travelling Salesman Problem
### Multithreaded Clojure solutionThis is small clojure application for solving [Travelling salesman problem](https://en.wikipedia.org/wiki/Travelling_salesman_problem) via [Ant colony optimization algorithm](https://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms). As a base for my app I used [ RT-Anderson/ant-colony-optimizer](https://github.com/RT-Anderson/ant-colony-optimizer), to which I added concurrency, feature to choose arbitrary waypoints, simple UI.
![App demo](https://cloud.githubusercontent.com/assets/3857155/13004806/33a00086-d1b0-11e5-89ea-16c181779bfb.gif "App demo")
#### How it works?
In the app, you specify number of "tours" and number of "ants" (besides other configs). Number of tours is how many times all ants will go to search for shortest route between waypoints. Each ant in a single tour is executed in a separate thread via [Clojure agents](http://clojure.org/reference/agents). Each tour is executed sequentialy, because it has to pass pheromones to another. After all tours are completed, you should see shortest route between waypoints you've chosen.This is as far as I understand it, I'm no expert on Ant Colony Algorithms, if you know better, please let me know ;)
#### How to run?
`lein run`or
`lein uberjar`
`java -jar target/travelling-salesman-problem-0.1.0-standalone.jar`
Feel free to use this code anyhow you want ;)