Skip to content

Commit 4d866bd

Browse files
committed
Prepare renaming of repository
* Restructured repo
1 parent 438bc16 commit 4d866bd

21 files changed

+175
-217
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ about: Create a report to help us improve
55
---
66

77
<!-- Please fulfill the table below-->
8-
| Python Version | aco4tsp Version |
8+
| Python Version | swarmlib Version |
99
| -------------- | --------------- |
1010
| | |
1111

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ stages:
88
- test
99
- bundle
1010
- name: deploy
11-
if: tag =~ /^v\d+\.\d+\.\d+$/ AND repo = HaaLeo/aco4tsp
11+
if: tag =~ /^v\d+\.\d+\.\d+$/ AND repo = HaaLeo/swarmlib
1212

1313
install:
1414
- pip install -r requirements-dev.txt

.vscode/launch.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "Python: Main",
5+
"name": "Python: aco4tsp",
66
"type": "python",
77
"request": "launch",
8-
"program": "${workspaceFolder}/src/main.py",
8+
"program": "${workspaceFolder}/swarmlib/main.py",
9+
"preLaunchTask": "Bundle and Install",
910
"console": "none",
1011
"args": [
12+
"ants",
1113
"${workspaceFolder}/resources/burma14.tsp",
12-
14
14+
"14"
1315
]
1416
}
1517
]

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"Stuetzle",
1717
"optimisation",
1818
"TSPLIB",
19-
"paypal"
19+
"paypal",
20+
"swarmlib"
2021
],
2122
"files.insertFinalNewline": true,
2223
"files.trimFinalNewlines": true,

.vscode/tasks.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Bundle and Install",
6+
"type": "shell",
7+
"windows": {
8+
"command": "Remove-Item -Recurse -Force dist; py -3 setup.py sdist bdist_wheel; Get-Childitem –Path ./dist/*whl | Select-Object -ExpandProperty Name -outvariable package; pip3 install ./dist/$package --user --upgrade"
9+
},
10+
}
11+
]
12+
}

CHANGELOG.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# Changelog
2-
All notable changes to the "aco4tsp" pypi package will be documented in this file.
2+
All notable changes to the "swarmlib" pypi package will be documented in this file.
33
This project follows [semantic versioning](https://semver.org/).
44

5-
## 2018-11-21 - v0.0.2
6-
* **Fixed** representation on [pypi](https://pypi.org/project/aco4tsp/)
7-
8-
## 2018-11-21 - v0.0.1
5+
## 2018-11-23 - v0.0.1
96
* **Initial Release**
107
* **Added** a feature that enables solving the Traveling Salesman Problem using the Ant Colony Optimization approach and plots the result afterwards

README.md

+29-26
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,59 @@
1-
# aco4tsp &#8212; ant colony optimization
1+
# swarmlib
22

3-
[![Pypi](https://img.shields.io/pypi/v/aco4tsp.svg?style=flat-square)](https://pypi.python.org/pypi/aco4tsp) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aco4tsp.svg?style=flat-square)](https://pypi.python.org/pypi/aco4tsp) [![Stars](https://img.shields.io/github/stars/HaaLeo/aco4tsp.svg?label=Stars&logo=github&style=flat-square)](https://github.com/HaaLeo/aco4tsp/stargazers)
4-
[![PyPI - License](https://img.shields.io/pypi/l/aco4tsp.svg?style=flat-square)](https://pypi.python.org/pypi/aco4tsp)
5-
[![Build Status](https://img.shields.io/travis/HaaLeo/aco4tsp/master.svg?style=flat-square)](https://travis-ci.org/HaaLeo/aco4tsp) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
3+
[![Pypi](https://img.shields.io/pypi/v/swarmlib.svg?style=flat-square)](https://pypi.python.org/pypi/swarmlib) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/swarmlib.svg?style=flat-square)](https://pypi.python.org/pypi/swarmlib) [![Stars](https://img.shields.io/github/stars/HaaLeo/swarmlib.svg?label=Stars&logo=github&style=flat-square)](https://github.com/HaaLeo/swarmlib/stargazers)
4+
[![PyPI - License](https://img.shields.io/pypi/l/swarmlib.svg?style=flat-square)](https://pypi.python.org/pypi/swarmlib)
5+
[![Build Status](https://img.shields.io/travis/HaaLeo/swarmlib/master.svg?style=flat-square)](https://travis-ci.org/HaaLeo/swarmlib) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
66
[![Donate](https://img.shields.io/badge/-Donate-blue.svg?logo=paypal&style=flat-square)](https://www.paypal.me/LeoHanisch)
77

88
## Description
99

10-
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.
1411

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.
16-
17-
![Sample](https://raw.githubusercontent.com/HaaLeo/aco4tsp/master/doc/Sample.png)
18-
19-
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.
2113
2214
## Installation
2315

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):
2517

2618
```
27-
pip3 install aco4tsp
19+
pip3 install swarmlib
2820
29-
aco4tsp --version
21+
swarm --version
3022
```
3123

3224
## Usage
3325

34-
### Client
35-
36-
To print all available options:
26+
To print all available algorithms:
3727

3828
```
39-
aco4tsp --help
29+
swarm --help
4030
```
4131

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.
39+
40+
![Sample](https://raw.githubusercontent.com/HaaLeo/swarmlib/master/doc/ACO_Sample.png)
41+
42+
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:
4346

4447
```
45-
aco4tsp resources/burma14.tsp 14
48+
swarm ants -h
4649
```
4750

4851
### API
4952

5053
In addition to the client you can also use the API:
5154

5255
```python
53-
from aco4tsp.aco_problem import ACOProblem
56+
from swarmlib.aco4tsp.aco_problem import ACOProblem
5457

5558
problem = ACOProblem('/path/to/my/tsp-file.tsp', 10)
5659
if problem.solve():
@@ -59,9 +62,9 @@ if problem.solve():
5962

6063
## Contribution
6164

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).
6366
Pull Requests are welcome!
6467

6568
## 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.
6770
In addition, it is possible to [donate via paypal](https://www.paypal.me/LeoHanisch).

aco4tsp/_version.py

-1
This file was deleted.

aco4tsp/main.py

-112
This file was deleted.
File renamed without changes.

resources/berlin52.tsp

-60
This file was deleted.

setup.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
with open(path.join(path.abspath(path.dirname(__file__)), 'README.md'), 'r') as rf:
88
LONG_DESCRIPTION = rf.read()
99

10-
with open(path.join(path.abspath(path.dirname(__file__)), 'aco4tsp/_version.py'), 'r') as f:
10+
with open(path.join(path.abspath(path.dirname(__file__)), 'swarmlib/_version.py'), 'r') as f:
1111
exec(f.read())
1212

1313
setup(
14-
name='aco4tsp', # PEP8: Packages should also have short, all-lowercase names, the use of underscores is discouraged
14+
name='swarmlib', # PEP8: Packages should also have short, all-lowercase names, the use of underscores is discouraged
1515
version=__version__,
1616
packages=find_packages(exclude=['*test']),
17-
description='Implementation of Ant Colony Optimization for the Traveling Salesman Problem.',
17+
description='Implementation and visualization of different swarm optimization algorithms.',
1818
long_description=LONG_DESCRIPTION,
1919
long_description_content_type='text/markdown',
20-
url='https://github.com/HaaLeo/aco4tsp',
20+
url='https://github.com/HaaLeo/swarmlib',
2121
author='Leo Hanisch',
2222
license='BSD 3-Clause License',
2323
install_requires=[
@@ -26,8 +26,8 @@
2626
'networkx==2.1' # Required by tsplib95 0.3.2
2727
],
2828
project_urls={
29-
'Issue Tracker': 'https://github.com/HaaLeo/aco4tsp/issues',
30-
'Changelog': 'https://github.com/HaaLeo/aco4tsp/blob/master/CHANGELOG.md'
29+
'Issue Tracker': 'https://github.com/HaaLeo/swarmlib/issues',
30+
'Changelog': 'https://github.com/HaaLeo/swarmlib/blob/master/CHANGELOG.md'
3131
},
3232
python_requires='>=3.6',
3333
keywords=[
@@ -62,7 +62,7 @@
6262
],
6363
entry_points={
6464
'console_scripts': [
65-
'aco4tsp=aco4tsp.main:main'
65+
'swarm=swarmlib.main:run_swarm'
6666
]
6767
}
6868
)
File renamed without changes.

swarmlib/_version.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.0.1'

swarmlib/aco4tsp/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)