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
Close
Hashes for traveling_salesman-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a01e07cdb5dc54a00539af5d08c503e5afa003582233d1c60e781d35b7f56934 |
|
MD5 | c1360d173ce9723d4b63ccf210db248a |
|
BLAKE2b-256 | d95a04855351e55f78e19e0771bc2f9c0d73c555d42e8657d4781c23fcd4f8bb |