Skip to main content

A collection of algorithms for the (Resource) Constrained Shortest Path Problem

Project description

A collection of algorithms for the (resource) Constrained Shortest Path (CSP) problem.

The CSP problem was popularised by Inrich 2005. It was initially introduced as a subproblem for the bus driver scheduling problem, and has since then widely studied in a variety of different settings including: the vehicle routing problem with time windows (VRPTW), the technician routing and scheduling problem, the capacitated arc-routing problem, on-demand transportation systems, and, airport ground movement; among others.

More generally, in the applied column generation framework, particularly in the scheduling related literature, the CSP problem is commonly employed to generate columns.

Therefore, this library is of interest to the operational research community, students and academics alike, that wish to solve an instance of the CSP problem.

Algorithms

Currently, the algorithms implemented include:

  • Monodirectional forward labeling algorithm;

  • Monodirectional backward labeling algorithm;

  • Bidirectional labeling algorithm with static halfway point;

  • Bidirectional labeling algorithm with dynamic halfway point Tilk et al 2017;

  • Heuristic Tabu search;

  • Greedy elimination procedure;

  • Greedy Randomised Adaptive Search Procedure (GRASP). Adapted from Ferone et al 2019;

  • Particle Swarm Optimization with combined Local and Global Expanding Neighborhood Topology (PSOLGET) (Marinakis et al 2017).

The first algorithm BiDirectional, is the only exact algorithm in the library. This means that it provides an exact (optimal) solution to the resource CSP problem. For this reason, it sometimes takes longer than the others. The remaining algorithms are metaheuristics, i.e. they provide fast and approximate solutions to the CSP problem.

Features

  • Generic resource extension functions (Inrich 2005) (not restricted to additive resources);

  • Generic resource consumptions (not restricted to non-negative values).

Prerequisites

Conceptual background and input formatting is discussed in the docs.

Examples

For complex examples see:

vrpy: (under development) external vehicle routing framework which uses cspy to solve different variants of the vehicle routing problem using column generation.

jpath : Simple example showing the necessary graph adptations and the use of custom resource extension functions. Also discussed below.

cgar: Complex example using cspy for column generation applied to the aircraft recovery problem.

All of can be found under examples.

Contributing

Feel free to contribute to this project either by either working trough some of issues flagged as help wanted, or raise a new issue with any bugs/improvements.

If you have a question or need help, feel free to raise an issue explaining it.

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

cspy-0.1.2.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

cspy-0.1.2-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file cspy-0.1.2.tar.gz.

File metadata

  • Download URL: cspy-0.1.2.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for cspy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9c4b1b43369754b5069e41087b4badb52d6a2b1814d90f198d815f4c9f776d73
MD5 c792d493288d410bcae6c91cfde00b2f
BLAKE2b-256 df3510824a0c5fb592785fa4f0663de4c8a32795c48ee4c26dc9e39a532e07c8

See more details on using hashes here.

File details

Details for the file cspy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cspy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for cspy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b1225d718e7d74017cbbec3b4f4020b2d247561f802238657c87ffd9a387166
MD5 5cd6b53338db2531f5139585aaac028e
BLAKE2b-256 6266bf466d9d9d88b35fbe27666b777bfee16c703f99d9301d0f9a2359b24941

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