A fast TSP solver with Python bindings
Project description
fast-tsp
A library for computing near optimal solution to large instances of the TSP (Travelling Salesman Problem) fast using a local solver. The library is written in C++ and provides Python bindings.
Quickstart
First install the library
$ pip install fast-tsp
Then run the problem on your 2D distance matrix:
import fast_tsp
dists = [
[ 0, 63, 72, 70],
[63, 0, 57, 53],
[72, 57, 0, 4],
[70, 53, 4, 0],
]
tour = fast_tsp.find_tour(dists)
print(tour) # [0, 1, 3, 2]
Documentation
Documentation can be found at https://fast-tsp.readthedocs.io/.
You can build the documentation by cd
ing to docs/
and running make clean && make html
.
License
This library uses pybind11
which is provided under a BSD-style license that can be found in the LICENSE file. By using, distributing, or contributing to this project, you agree to the terms and conditions of this license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file fast_tsp-0.1.2.tar.gz
.
File metadata
- Download URL: fast_tsp-0.1.2.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c470f4e84ba54aef26a878e77c7890bee283c2cfa4730fbcc3a2d1d07db5af |
|
MD5 | d7faaf268e0aa309bf63ad8e7e79fe61 |
|
BLAKE2b-256 | 02fa235691aaf1e178ae1c6bdda6014ff56b7c9ebc3ddc6d1f8e55fdac5e3c95 |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 70.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc03c96be02b27d8c208a0c436fe586d5ad0b0d76499d995610c7e91aaa396a0 |
|
MD5 | 20db922e7b5b6985162bac8aa04b2630 |
|
BLAKE2b-256 | 8b8c16eb53a88dbe0eca1a24de88bcf211340737b643aada245396e7dd770ad1 |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-win32.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-win32.whl
- Upload date:
- Size: 61.2 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2563129dcd2b1a362ea813c8271241bd736a093cdef1c5312912e3fdbe561f7 |
|
MD5 | 803c55969b77d60338979dc68f9685ea |
|
BLAKE2b-256 | ce9341ffa1d6cfd55b517591b3d2faabca27556e3995386ef90ab47f3c0342c4 |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 617.1 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab6cf8e3d57b8c769fa4a3b7a87a349acae1c9b246718b9d322a89b1588edb9d |
|
MD5 | c8a2672f7805919fba13f6a46a460e0d |
|
BLAKE2b-256 | 042260e0f7a603ee06920db5b2f13a19a696633af933abf865e68d80c7a4e141 |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-musllinux_1_1_i686.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-musllinux_1_1_i686.whl
- Upload date:
- Size: 674.6 kB
- Tags: CPython 3.10, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12f0cb1f159257dcaf2d971e59d1bb853c23bea8e408297e68a4519bd74d514d |
|
MD5 | 96af17c315b5ce18c3dc4255316cf4e4 |
|
BLAKE2b-256 | f8818f45a822656d9bd4eefe558d1696d9ff6c2815829f006206cd7d1d81d0ba |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 92.6 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82d163ef244c4635735e362e916afa1345225398c3d91f1ead50148c6e78cd7f |
|
MD5 | 6a376130765421a59d3d2899ec2cb3ba |
|
BLAKE2b-256 | caa07085dec73c604f5597b19ad096c8ba96cc6e16ecb642ecef722d84e1aed4 |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 99.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d77995296003b93419c0fb939441ae723148065f8f28d55b91c1cb93584b2503 |
|
MD5 | 7e0137851f3d883fb158b6930c0bfe45 |
|
BLAKE2b-256 | 69f547317568a67a79f471a5ce94960a58163aaa69451f45c1b6f2cd40eba634 |
File details
Details for the file fast_tsp-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 65.5 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0a87af79f2f56626f12f3ef4c5865a3e007f0cdfa3f8b15def6a9601c331afb |
|
MD5 | 0b716721b305252eca2b883ba4290ee9 |
|
BLAKE2b-256 | 4cbb781d08184381398a962adbe93d9384542bde45a5b181fb087e64aecc8f6f |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 69.9 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68f06ab4a02e663c1fd363fe42978daf29ee1c5201756ab2e9cdfaab8b057f28 |
|
MD5 | 5329f5ab3f4f487c621a23e2d6d53814 |
|
BLAKE2b-256 | b43894a7740c81198193669d61bbb5de64f430467328ff5391dfac5971ad1298 |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-win32.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-win32.whl
- Upload date:
- Size: 61.4 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a3ff84239d1f8bc505c07a6b5d337cb80be3ce7c1b962119939273816f698cd |
|
MD5 | 4a96295cc8a3613629b14649fda7a925 |
|
BLAKE2b-256 | c2b8ecacc18ca53eb6e11709899c3661f9d79c7211eb4fe30bb66e87b75d299e |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 617.3 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7c60a4c50f49e9f03efb014984ececafd57cc5192e28cf19db73973d9f688b5 |
|
MD5 | 4737499f185f1ff9eb8425bf3daf7e7f |
|
BLAKE2b-256 | 36eafa140c182d7627c504ad67de3f7fd0dc094ae1aadee0000bfd29564c5f11 |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-musllinux_1_1_i686.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-musllinux_1_1_i686.whl
- Upload date:
- Size: 674.8 kB
- Tags: CPython 3.9, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98ecd85c4aab3745b47dea4a3b612da2f1d247904b2da685c591909c8a69e4b9 |
|
MD5 | 173af61162e1bb45ef6a118b1846e2b8 |
|
BLAKE2b-256 | 84e64762cdaf52961955cefa3e94c2dd3b3910ffa2de6422692626b57a089d65 |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 92.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9ac84a4061c857099e2ca168183bd2ab6458cce5e5931021ad056fa5c76e4f0 |
|
MD5 | 4a68c34c765f7629b979741132141a6f |
|
BLAKE2b-256 | 824c6c1a7941e2b0ff3a611a44f2146f578a6a4b05253603f2fd763901ec8e27 |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 99.6 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e8fa4b765decb449472b8d62d8c3759c57c1f9332fe0092154abfb98d59cac2 |
|
MD5 | 07dad19229b6e8852f44e22b5bbbc2ad |
|
BLAKE2b-256 | 6366cb3bf868002f25adf19a8fd33ece4bafa6db1c1fde2e6a8c69e14cb61c82 |
File details
Details for the file fast_tsp-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 65.7 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e67c6a24df45fa98c2677035dc7c7c83310a103d9cf016d5b850d702889924c |
|
MD5 | f6c3a18620dd560bfd054ed0f428d9f5 |
|
BLAKE2b-256 | ecc499be6653add7939bc05766df0d500cd356d50cae1ae0f2667cf4eabbb0b9 |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 69.8 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d907ebf714c2b67720069702fc70670daf533d9def39891fc1ed2b55379cbc9 |
|
MD5 | b3b8bab0dc5384de42c97869620a6673 |
|
BLAKE2b-256 | 1566e789f04a62b36b5c6a9cb9428587b43133c68922c11628f2ebe2972ac882 |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-win32.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-win32.whl
- Upload date:
- Size: 61.2 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca036bd389553dbed972d1da18d683300f437b25a47b19bb3a7f135ede9ed75c |
|
MD5 | c1b698f9263bb2ac86dfbb9078340476 |
|
BLAKE2b-256 | 6cccbabfff022deb848a6d17a1962b89a71e2df00999960258074c7e06dfee1b |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-musllinux_1_1_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 617.1 kB
- Tags: CPython 3.8, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc2089238d91a33412cc515987dbed6a95bf36d3ffe237f9b4fc1c0cdbc1650 |
|
MD5 | 7c6004f674cd849c5542edc3e7315dd6 |
|
BLAKE2b-256 | d455c86a960876b3a94fab666da5765bebc09f1b9ce7edd011c201797e6ffc7e |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-musllinux_1_1_i686.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-musllinux_1_1_i686.whl
- Upload date:
- Size: 674.5 kB
- Tags: CPython 3.8, musllinux: musl 1.1+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3065ac3336f496262c1c31125dc92a2366366c6c101bfcd3703d890b9bd28a8 |
|
MD5 | 1bd48755b024615a254beba7e8cddfc1 |
|
BLAKE2b-256 | e4483ecf442f518d36d9021a4194ac32f9a46ed6dbbba837d9eb9a9d0af2549c |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 92.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09406e9fae5e2d7ee710e732f845c75f87f54a43e93b40c25416e25e5dfa67fc |
|
MD5 | 2946fe0879d5a61d23998591dc7ab7fa |
|
BLAKE2b-256 | ade65d07f273422f815dd1409b875eb5bd077cb740eb7780fbf14ea0eb7b250e |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 99.2 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3325330dab0144a6b7ca33e327b3e371c6e32ade3e661373845fcf98ce6ad4b1 |
|
MD5 | 4c83e78cd822669070009859bf3cf6fc |
|
BLAKE2b-256 | 700ba3f037c39d457b1416ed9042973ee21a21c55221d992a1d326ce811ba4bd |
File details
Details for the file fast_tsp-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: fast_tsp-0.1.2-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 65.5 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efa1dc63d4ce966b410486870bbebeb9c1238887cd86e514cadaf2bcd26ff094 |
|
MD5 | 41f10bb21a002ad445f40a62a9066029 |
|
BLAKE2b-256 | 0b2a586b903f8df1cda46e30a225f0d9f7cae133b645e713f10e147d88012542 |