Skip to main content

TSPLIB95 works with TSPLIB95 files.

Project description

TSPLIB 95

https://img.shields.io/pypi/v/tsplib95.svg https://img.shields.io/travis/rhgrant10/tsplib95.svg Documentation Status

TSPLIB 95 is a library for working with TSPLIB 95 files.

For now…

  • the documentation is not complete

  • only 3.6+ is supported

Features

  • read and use the TSPLIB95 file format like a boss

  • easily convert problems into networkx.Graph instances

  • supports and implements the following EDGE_WEIGHT_TYPE s

    • EXPLICIT

    • EUC_2D

    • EUC_3D

    • MAX_2D

    • MAX_3D

    • MAN_2D

    • MAN_3D

    • CEIL_2D

    • GEO

    • ATT

    • XRAY1

    • XRAY2

  • supports the following EDGE_WEIGHT_FORMAT s

    • FULL_MATRIX

    • UPPER_ROW

    • LOWER_ROW

    • UPPER_DIAG_ROW

    • LOWER_DIAG_ROW

    • UPPER_COL

    • LOWER_COL

    • UPPER_DIAG_COL

    • LOWER_DIAG_COL

  • supports SPECIAL FUNCTION edge weights too

It also has a CLI program to print a tabular summary of one or more TSPLIB95 files. No idea why anyone would want that, but there you have it.

Credits

See TSPLIB for original details, including file format specification, C++ code, and sample problems.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.5.0 (2019-10-02)

  • New loaders that take just the text - no file necessary!

  • Invalid keywords now result in a ParsingError

  • Update the CLI to catch and gracefully handle ParsingError

  • Fixed a bug when trying to amend an exception with line information

0.4.0 (2019-09-21)

  • All expected parsing errors are now raised as ParsingError rather than the base Exception type.

  • Fix name of distance paramter to distances.geographical. Previously it was “diameter” but was used as a radius. It is now “radius”.

  • Relax restriction on networkx version (now ~=2.1)

  • Add documentation for each problem field

  • Other minor documentation changes

  • Add offical 3.7 support

  • Add missing history entry for v0.3.3

  • Remove some dead code

0.3.3 (2019-03-24)

  • Fix parsing bug for key-value lines whose value itself contains colons

0.3.2 (2018-10-07)

  • Fix bug in Problem.is_complete that produced a TypeError when run

  • Fix bug in Problem.is_depictable that produced a TypeError when run

  • Fix bug in Problem.get_display that produced an AttributeError when run

  • Added some unit tests for the Problem class

  • Added some unit tests for the parser module

0.3.1 (2018-10-03)

  • Fix bug in Problem.is_weighted that caused problems with defined nodes coords to use the unit distance function

0.3.0 (2018-08-12)

  • Added XRAY1 and XRAY2 implementations

  • Simplified some of the matrix code

0.2.0 (2018-08-12)

  • Implement column-wise matrices

  • Add a utiltiy for loading an unknown file

  • Fix bug in the ATT distance function

  • Update the CLI to use the models

  • Document a bunch-o-stuff

  • Switch to RTD sphinx theme

  • Move most utilties into utils

0.1.0 (2018-08-12)

  • First release on PyPI.

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

tsplib95-0.5.0.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

tsplib95-0.5.0-py2.py3-none-any.whl (15.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file tsplib95-0.5.0.tar.gz.

File metadata

  • Download URL: tsplib95-0.5.0.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for tsplib95-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6ae18b9afe2e7e74532fffc571b6f614d75eb0aa24c237e0310989b44640827b
MD5 b6eb6523402001f0be037373366d56e8
BLAKE2b-256 1f52e5fb1aff27e6ba6ac6feafd44288d85ad3fce8917a832307b1149af0273d

See more details on using hashes here.

File details

Details for the file tsplib95-0.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: tsplib95-0.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for tsplib95-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6fbcd604ab40cfc3601c646950a600cbb610ba1983b9cb07fcf1c4ff3fb566ae
MD5 15d125fc61339b57846d60c0927babce
BLAKE2b-256 aa143586c7451228f1145fa7de783297b07376a1a1af388ca69df7952eba6bd9

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