You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository implements an ant colony optimization algorithm for the traveling salesman problem (TSP) like Marco Dorigo, Mauro Birattari, and Thomas Stuetzle introduced in the [IEEE Computational Intelligence Magazine](https://ieeexplore.ieee.org/document/4129846) in November 2006 (DOI: 10.1109/MCI.2006.329691).
11
-
The implementation was part of the course [Natural computing for learning and optimisation](https://is.cuni.cz/studium/eng/predmety/index.php?do=predmet&kod=NPFL107) at Charles University Prague in winter 2018/2019.
12
-
13
-
## Features
10
+
This repository implements several optimization algorithms.
14
11
15
-
Enables to apply the ant colony optimization algorithm to a TSP using a [TSPLIB95](https://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/index.html) file and plots the result.
The algorithm solves the TSP and plots the result all _n_ iterations.
20
-
The nodes are plot according to their coordinates read from the TSPLIB95 file. The _widths_ of the edges indicate the _amount of pheromone_ that is associated with this edge. If an edge is _blue_, it is part of the _best found path_.
12
+
>Currently only the ant colony optimization is included.
21
13
22
14
## Installation
23
15
24
-
You can install the package with `pip` from [pypi](https://pypi.org/project/aco4tsp):
16
+
You can install the package with `pip` from [pypi](https://pypi.org/project/swarmlib):
25
17
26
18
```
27
-
pip3 install aco4tsp
19
+
pip3 install swarmlib
28
20
29
-
aco4tsp --version
21
+
swarm --version
30
22
```
31
23
32
24
## Usage
33
25
34
-
### Client
35
-
36
-
To print all available options:
26
+
To print all available algorithms:
37
27
38
28
```
39
-
aco4tsp --help
29
+
swarm --help
40
30
```
41
31
42
-
Example:
32
+
## Ant Colony Optimization
33
+
This repository includes an ant colony optimization algorithm for the traveling salesman problem (TSP) like Marco Dorigo, Mauro Birattari, and Thomas Stuetzle introduced in the [IEEE Computational Intelligence Magazine](https://ieeexplore.ieee.org/document/4129846) in November 2006 (DOI: 10.1109/MCI.2006.329691).
34
+
The implementation was part of the course [Natural computing for learning and optimisation](https://is.cuni.cz/studium/eng/predmety/index.php?do=predmet&kod=NPFL107) at Charles University Prague in winter 2018/2019.
35
+
36
+
### Features
37
+
38
+
Enables to apply the ant colony optimization algorithm to a TSP using a [TSPLIB95](https://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/index.html) file and plots the result.
The algorithm solves the TSP and plots the result all _n_ iterations.
43
+
The nodes are plot according to their coordinates read from the TSPLIB95 file. The _widths_ of the edges indicate the _amount of pheromone_ that is associated with this edge. If an edge is _blue_, it is part of the _best found path_.
44
+
45
+
To print all available options execute:
43
46
44
47
```
45
-
aco4tsp resources/burma14.tsp 14
48
+
swarm ants -h
46
49
```
47
50
48
51
### API
49
52
50
53
In addition to the client you can also use the API:
problem = ACOProblem('/path/to/my/tsp-file.tsp', 10)
56
59
if problem.solve():
@@ -59,9 +62,9 @@ if problem.solve():
59
62
60
63
## Contribution
61
64
62
-
If you found a bug or are missing a feature do not hesitate to [file an issue](https://github.com/HaaLeo/aco4tsp/issues/new/choose).
65
+
If you found a bug or are missing a feature do not hesitate to [file an issue](https://github.com/HaaLeo/swarmlib/issues/new/choose).
63
66
Pull Requests are welcome!
64
67
65
68
## Support
66
-
When you like this package make sure to [star the repository](https://github.com/HaaLeo/aco4tsp/stargazers). I am always looking for new ideas and feedback.
69
+
When you like this package make sure to [star the repository](https://github.com/HaaLeo/swarmlib/stargazers). I am always looking for new ideas and feedback.
67
70
In addition, it is possible to [donate via paypal](https://www.paypal.me/LeoHanisch).
0 commit comments