Skip to main content

A fast TSP solver with Python bindings

Project description

fast-tsp

Documentation Status Pip Actions Status PyPI - Version GitHub issues GitHub license

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 cding 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

fast_tsp-0.1.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distributions

fast_tsp-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl (615.8 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

fast_tsp-0.1.0-cp310-cp310-musllinux_1_1_i686.whl (674.0 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

fast_tsp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (91.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

fast_tsp-0.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (98.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686

fast_tsp-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl (63.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

fast_tsp-0.1.0-cp39-cp39-musllinux_1_1_x86_64.whl (616.6 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

fast_tsp-0.1.0-cp39-cp39-musllinux_1_1_i686.whl (674.1 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

fast_tsp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (91.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

fast_tsp-0.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (98.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

fast_tsp-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl (64.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

fast_tsp-0.1.0-cp38-cp38-musllinux_1_1_x86_64.whl (615.7 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

fast_tsp-0.1.0-cp38-cp38-musllinux_1_1_i686.whl (673.8 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

fast_tsp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (91.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

fast_tsp-0.1.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (98.1 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

fast_tsp-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl (64.0 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

fast_tsp-0.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl (618.0 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

fast_tsp-0.1.0-cp37-cp37m-musllinux_1_1_i686.whl (675.8 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

fast_tsp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (92.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

fast_tsp-0.1.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (100.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686

fast_tsp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.whl (63.9 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

fast_tsp-0.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl (618.0 kB view details)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

fast_tsp-0.1.0-cp36-cp36m-musllinux_1_1_i686.whl (675.8 kB view details)

Uploaded CPython 3.6m musllinux: musl 1.1+ i686

fast_tsp-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (92.4 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

fast_tsp-0.1.0-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl (100.7 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ i686

fast_tsp-0.1.0-cp36-cp36m-macosx_10_9_x86_64.whl (63.9 kB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

Details for the file fast_tsp-0.1.0.tar.gz.

File metadata

  • Download URL: fast_tsp-0.1.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for fast_tsp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dd299fc0b1ba715de795a6598dec6aaf5524f246018cda10adcafc72b47edbeb
MD5 4dc2c74777f9505f748a2ec9a9024bb7
BLAKE2b-256 2c52d0c6202ddf892037a39134d3e4baab8f3e338e5583bd4acea130014891d0

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 da11a2ce82ba4cd02ef34a67dac4f869e7bfe530a5f9132a9341e2fd6f9e3dd8
MD5 3f6a6438cf745e1970c2d0b3931be0c9
BLAKE2b-256 53acbf896f9da1fa281714330ce941f8510ba06abc9d131edeb11afc384d26a7

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp310-cp310-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp310-cp310-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 9056d54a104b2f35d7a2619430f74adaa07e23d1242815c493d773ce13a91ae3
MD5 1eb57d90389c44c4b0f84a86facb1104
BLAKE2b-256 00317c0089946e0f059e1711c03bc3674b2448450bd750787b50823b87a94910

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26719a2cc15e3dfefdb83a7666680fed9e2bc1427bd0504762c0502c8e67fe15
MD5 dc20675c4b76b261b320ef289b8aded2
BLAKE2b-256 1e25a51295c88a99dd74838c8fa18674c10162bc7bd92126decfd9cce66b5b46

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c42e1f046dd2bac9dff569aa2a9b4328235ad7d334226c81630eba9babbf1ed2
MD5 81547bce40a0518744d13cf11f11682d
BLAKE2b-256 3ed486ffbb4567f594addbc46dbad92da7f18e56714ecd318150ed63e91ab1cf

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 606fa07d9d700e3af1e004dbe8abab96bb9a1e9fd4a8bf0411013140aa7d6498
MD5 892b301c7c8fc8b70fd9264715e4ba0a
BLAKE2b-256 724dd6d34c6bbea32edda8a0d71079a5e06170f1b47bdf5dcf791e1053131472

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 118477a21ba6132206864401792693c6ea190c4024a7125b06929645ccda1c4b
MD5 49803ec745267aeef4e4a533e5c2f24f
BLAKE2b-256 4741f105948446a3aeabe37a444115c829b44252b1026ae432468678c16e0596

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 122fab4e90c2a882d36e9012e8949354e7c7309ba90c0273b506e5aa7475cfc9
MD5 6cc45ef458f2e26d05c7fc910a422e84
BLAKE2b-256 4eb7ec8ce3911c506408226ccfbf27fe26bba9a81b66bf545e1274a11d840b3c

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1c1f5cd0d6f006e9fa20c90b62201a4a4c9c0bc43d65e8f033205df20eea0375
MD5 e9ee4e7caf5c522352e8f7b16c067eca
BLAKE2b-256 e83d3fbca888c1bc202c911e78c6f2164096f445b752a10af8d2068da2c28bda

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 cb64c0bbb31e09980239a6c1f80ae809efee649c3a86b6b1874fb95b857ecb32
MD5 796c5a3641545f013a28913d11848d7f
BLAKE2b-256 4e7f0ab42d215c0d0ca4d8ff120189ebdc149a57e4ad138ae9531fd890998f86

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b3a06c1ab7bab8e2258768ce066b0aae46924c804fa1348fe0f530d7beb3856b
MD5 d959de2f78d87da96b362814601460ff
BLAKE2b-256 ce5215f14d0b1771b5f1821104f9a4555d35807432c09c84176ff1faf59bd299

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c0111fb34f080391dce60cba414675828049d35d621c4b77aea39b9fa43f4c95
MD5 95b143ab3d9f3b6814893f13e3f3a9bf
BLAKE2b-256 b3bb621bd5073b071a3e8b69f10a7c6444e6ce8abe3411099a64c43983f08fe9

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp38-cp38-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 230a2f119f22cc71ef9fb2fea108a14f18726d403b3c49e3e6dfb786be39ca12
MD5 4a7f9a5b978b3488b0acd8b25be510de
BLAKE2b-256 793d7ec166f73d751c414713059d404e6d623ac3c4a55c8bf78f216e320c892b

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5a209fb304dc7504a2cc571ad7d88acd5a44b05298f8c89f5b18bbc29946027e
MD5 b422bd1b76e141978fe268463c4c28c1
BLAKE2b-256 272f14c054780c1a57efde17c47a0976620cdd07f5c2be61641ae9097eeb9f61

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0a9370a54e94fc1a51efcbbab6f14bb1748ec545bd1c1970cadb93f505a00214
MD5 045adb12b08bb4daf8fe243458b9aa6d
BLAKE2b-256 1391fb75bcece944c7ac7b6cab49ee3c4bf1a57e6285e8f64da926944be7b4b5

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 87f061a2e4f9c4800f8c3f43c292418873264583cab679e58daff5cf8b91809c
MD5 a64db8493d60b0c39c24b5daa2057698
BLAKE2b-256 e66b7171f1f7635cc97c34717ec3bb5e2685554a140c4d9419e4cabf7a4ab7cf

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 266e4eaf109a502a18f79913e6d6aaaf026119c708d6d996d8c5a0da74bba0d4
MD5 440e537e78c8f4657844bdd53cc67a7c
BLAKE2b-256 1fdd2efd62d05e8dcad19c81b720a09be4754bb2002f41e4c77cf691429a8f36

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp37-cp37m-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 c23e114887dc9944fcc40007343f7e652118d584fc66cb404d4b9c0106d2e56d
MD5 f2b04304a8414ab2a8380f3c970663f3
BLAKE2b-256 9621fa69acad2d220ccbbb5d6aa8caee6c1aeb237607b12c64e089348941c413

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 50bfc95169cd39af9dd6c6257d6613ad1595563b361a8149f774417a5df95841
MD5 65a5f4247865d26870194d35426ce93e
BLAKE2b-256 d86b9c782c4199653b41d86f990108226d8f30a8b2c80168ab711037fbca3ca1

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c32ac9a438bd8ea9b3e1f0a52d191e99df3647e3923838d26e69c820a7e30a92
MD5 f693f9fb438e68d6fee440a1b15f00af
BLAKE2b-256 a5dbc287ae55389ec5571b3d5911ed9afe8acc9ffaf820248837179d63a672f5

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ec456ad2a33710a86c72f916c8d7071cac54bd32743221f2aa9ab53ab39b8cae
MD5 0b1497bd1bb492b93450569d0752b86a
BLAKE2b-256 dbc5c03d7a5a170b5999654aa88420dd62204a650a3f98d9f2fd4fd82d266d58

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c5a7960190d738c295d1afe85f7bf2b2adfdec928528338a27b8a430df3356f5
MD5 9355b6d82f80f285208df2c56e97a052
BLAKE2b-256 57d02d08b1d882d4d4bcec9d92b38de8217271642fe65b11819e52698d9c42a7

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp36-cp36m-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 6176f92bf1a00be3f75cb2cac56532cc30fc448a105db74f9a00ac41296bb2ff
MD5 e56dda060a5db11df94da85bd2ed04a3
BLAKE2b-256 8a9bbcef4d0f4749ec14acab5ea62cad4bace72f5adaca5a31d12fe886633093

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3f51f818724124d95eef502a3d59cf4ba0fcea988b56b411935f0c1c57b5dd40
MD5 1cd1d5b665eb0d1cea0e04115c5fcaca
BLAKE2b-256 773e4e06d04db8dbb44ea5159a0f894bc852790153ccd715b9e06c86da140332

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8dd90602ab57f8d54f9fc47f9465132c25974af1ffab804fd7e4ae38f459985b
MD5 11b83824f38569ab5eb1648e8c296c45
BLAKE2b-256 36d9acdfacc7d0bf3d4d934ef74824681e3dfa2714169a405972e116b3c85c10

See more details on using hashes here.

File details

Details for the file fast_tsp-0.1.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for fast_tsp-0.1.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bca99e0f6d983b0060f322ab05204ada8eea7e778538dac9810cee29a4f321ee
MD5 3341971bd16d63e0f52a91829583cb8c
BLAKE2b-256 a37682a15956cf9421a776a9379e6606161ddea53b3518d76209e55006a353e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page