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

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.2.0.tar.gz (19.9 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.2.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bmsspy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 831bdb7f87db0fba245fd7e47998711c3ecc78f4a6fb87e2bea67ba0f4ca7a93
MD5 848049011e9befce6533134355d759a5
BLAKE2b-256 bd8045701b409d1534f6414d566792d5a9cb2723137389b1adb289bce3e5d4af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bmsspy-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97cf64e699ddf7297bc4d3253080d1335740eb29c578ae4ec7824d04a604ec48
MD5 4d58723f2b5b298091e3b0d0c0d7f9f6
BLAKE2b-256 ada904287ae045bd8e6a4ad7b3f737a72f3f83140a2c0164c4fb6ef0dc426826

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