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.1.0.tar.gz (19.1 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.1.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bmsspy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f315dd39996a58efbd9cb0fb6550ea647e97e6b19bbc666d0353fc8fd8b49bb3
MD5 07c04af817539ddbd5a5d4b53214e5d2
BLAKE2b-256 0f01ca078557b8843a0b5bb30c6496bd9123eb2e1f6c0111df4632bdb88d8a5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bmsspy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6c300419329cf22387570769bf9ddbd80625096f791b16f9141aaf327c80426
MD5 5c98004fd082be6365b4c80e1894d11e
BLAKE2b-256 c9c483307e6719a059e0051b1443bb6f6641b841b0103711cd15654b02d3fcde

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