Skip to main content

A pure python bmssp solver for python

Project description

BMSSPy

PyPI version License: MIT

A pure python bmssp implementation.

Setup

Make sure you have Python 3.10.x (or higher) installed on your system. You can download it here.

Installation

pip install bmsspy

Use

from bmsspy.solvers import bmssp, bmssp_star

graph = [
    {1: 1, 2: 1}, 
    {2: 1, 3: 3}, 
    {3: 1, 4: 2}, 
    {4: 2}, 
    {}
]

bmssp(graph, 0) #=>
# {
#     'origin_id': 0,
#     'destination_id': None,
#     'predecessor': [-1, 0, 0, 2, 2],
#     'distance_matrix': [0, 1, 1, 2, 3],
#     'path': None,
#     'length': None
# }

bmssp(graph, 0, 4) #=>
# {
#     'origin_id': 0,
#     'destination_id': 4,
#     'predecessor': [-1, 0, 0, 2, 2],
#     'distance_matrix': [0, 1, 1, 2, 3],
#     'path': [0, 2, 4],
#     'length': 3
# }

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

bmsspy-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bmsspy-1.0.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file bmsspy-1.0.0.tar.gz.

File metadata

  • Download URL: bmsspy-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bmsspy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4baa8c3f1ae1d383b9b1d077067f838377dd736cf5bb8617b080b0ff6079e520
MD5 44a7284a4367fdee6d04edd1e53d3f30
BLAKE2b-256 1e377da12165dcb55285f68ad6a29b4c0950dfc79d7ad787aa087453b9054925

See more details on using hashes here.

File details

Details for the file bmsspy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bmsspy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bmsspy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed893754311b6544fbb46c1fea5105b75f669183d08a8b7a2525da040e48d114
MD5 45b034eab5960fad425bb1dcdc5bce88
BLAKE2b-256 2c8ebd4bb0ee6ce7f7afea0d23c7bf0f28bbe3cecd0ebff3e95cf78d4520c799

See more details on using hashes here.

Supported by

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