A Python package to plot traveling salesman problem with greedy and smallest increase algorithm.
Project description
TRAVELING SALESMAN PROBLEM
Usage
from TSM.TSM import greedy,smallest_increase,read_all,find_closest_path
nodes = read_all('resources/sehir_xy')
smallest_book, distance_result = smallest_increase(nodes, start_index=45, end_index=51, plot=True, plot_annotate=True)
greedy_book, distance_result = greedy(nodes, start_index=45, end_index=51, plot=False)
find_closest_path(greedy_book, 12, 5, plot=True)
# find_closest_path(smallest_book, 12, 5, plot=True, show_route=True, suptitle='Smallest Increase Algorithm Route')
Smallest Increase Algorihm
greedy_book, distance_result = greedy(nodes, start_index=45, end_index=51, plot=False)
Result
Greedy Algorihm
greedy_book, distance_result = greedy(nodes, 45, 51, plot=False)
Result
Find Closest Path
greedy_book, distance_result = greedy(nodes, start_index=45,end_index=51, plot=False)
find_closest_path(greedy_book, 12, 5, plot=True)
Result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file traveling-salesman-1.1.4.tar.gz.
File metadata
- Download URL: traveling-salesman-1.1.4.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32eda54611149ab3396f086e3560386378525d0e830221c65393e5f42f199272
|
|
| MD5 |
c4df408be3cb6039ded10e777b5f2e5d
|
|
| BLAKE2b-256 |
bdb0e2ee7d414ab039cbec084bb9f124eda0fa12ecd67594d0469ad721c7e0c8
|
File details
Details for the file traveling_salesman-1.1.4-py3-none-any.whl.
File metadata
- Download URL: traveling_salesman-1.1.4-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a01e07cdb5dc54a00539af5d08c503e5afa003582233d1c60e781d35b7f56934
|
|
| MD5 |
c1360d173ce9723d4b63ccf210db248a
|
|
| BLAKE2b-256 |
d95a04855351e55f78e19e0771bc2f9c0d73c555d42e8657d4781c23fcd4f8bb
|