Python interface to PathWyse: a C++ library for Resource Constrained Shortest Path Problems (RCSPP)
Project description
PathWyse
A C++ and Python framework to model and solve Resource Constrained Shortest Path Problems.
PathWyse is a project designed to address Resource Constrained Shortest Path Problems (RCSPP), combining state-of-the-art exact algorithms with a modular architecture for rapid experimentation and integration. It is particularly suited for problems arising as pricing subproblems in column generation, as well as routing and scheduling applications with multiple constraints.
The library can be used both as a high-performance C++ solver for real-world applications and as a research platform for developing and testing new algorithmic ideas.
Pathwyse provides an interactive mode in Python, along with Python interfaces for flexible usage.
The library is described in the paper: https://doi.org/10.1080/10556788.2023.2296978
An earlier version is available as a technical report: https://doi.org/10.48550/arXiv.2306.08622
PathWyse is distributed under a dual licensing scheme: this repository contains the open-source version.
A quick look
Once compiled, PathWyse can be used immediately as a standalone solver:
./bin/pathwyse instances/toy.txt
Example output:
[ Solution ]
Solution Status : Optimal
Obj : -10435
Tour Length : 4
Tour : 0 2 1 4
Consumption : 9
For industries
PathWyse can be used as a high-performance solver for constrained shortest path problems. It can be executed from the command line, embedded in C++ applications, or accessed through a Python interface.
PathWyse provides practitioners with fast, reliable exact solutions to complex constrained shortest path problems, helping to reduce planning time, resource utilization, and, in general, support decision-making in real-world transportation, logistic and scheduling tasks. Typical applications also include solving pricing subproblems in column generation for vehicle routing, crew rostering, path-based scheduling and many other problems.
The library includes configuration files for controlling algorithmic behavior and collecting performance data, so it can be integrated into larger pipelines without modifying the source code.
For academia
PathWyse is also designed as a research-oriented framework where algorithmic components are explicit and configurable. The goal is to allow experimentation without reimplementing the full machinery behind labeling algorithms.
The library provides implementations of bidirectional dynamic programming, DSSR and NG-path relaxations, and their hybridizations, together with mechanisms for label candidate selection, dominance, and join procedures.
Its internal structure is modular: resources, labels, and extension functions can be customized, and new algorithmic variants can be introduced without modifying the entire codebase. This makes the library suitable for studying new problems, designing dominance rules and relaxation schemes, or formulating pricing subproblems in column generation.
Supported problems
PathWyse focuses on resource constrained shortest path problems with one or more monotone resources. It supports acyclic networks and includes specialized techniques for elementary variants on cyclic networks through relaxation schemes.
The current version includes support for common resources such as capacity, time, node limits, and time windows. These can be combined to model a variety of problems, including routing and scheduling with cumulative constraints, and pricing subproblems in column generation.
The framework is fully extensible: new types of resources can be implemented by extending the Resource class, making it possible to model custom constraints for a wide range of practical and research problems.
Main techniques
PathWyse includes the following techniques and features:
- Bi-directional search: Dynamic programming labeling algorithms are implemented in both mono-directional and bi-directional [Righini and Salani, 2006] fashion;
- Relaxation schemes: Decremental State Space Relaxation (DSSR) [Righini and Salani, 2008], NG-path relaxations (NG) [Baldacci et al., 2011] and hybridizations [Martinelli et al., 2014] are included to tackle the Elementary RCSPP;
- Dynamic half-way point: The budget of the critical resource is automatically adjusted in bidirectional algorithms, similarly to [Sadykov et al., 2020]
- Candidate and join strategies: multiple methods for selecting candidates and performing join operations in labeling algorithms.
- A*-based algorithm: a custom implementation of the A* algorithm proposed by [Ahmadi et al. 2021] is provided for single resource acyclic problems;
PathWyse also supports simple heuristics, bucket-based label organization (PWBucket), and features data collection tools.
Getting started
To compile the project, follow the instructions in: Installation
After compilation, instances can be solved from the command line:
./bin/pathwyse path-to-instance
The instance format is described in: Instance Format
We provide a toy instance under instances/toy.txt to verify the installation. Additional benchmark instances from the literature are available under instances/:
instances/spprclib/— SPPRCLIB [Jepsen et al., 2008]instances/dimacs/— DIMACS 9th Challengeinstances/longestpath/— LongestPath [Salani et al., 2024]
The file pathwyse.set contains the main configuration parameters.
A complete description of the available options is provided in: Parameters
Command-line keywords for overriding instance data at runtime are described in: Extras.
Instructions for using PathWyse from Python are available in: Python
Documentation
The full documentation, including installation guides, API references, and tutorials, is available at: https://pathwyse.github.io/pathwyse/
The Solver class provides the main interface for interacting with the library programmatically.
License
PathWyse is distributed under a dual licensing scheme.
This repository is open source and released under the GNU General Public License v3.0.
The Enterprise version includes additional and experimental features, as well as extended support. It is available for academic collaborations and under a commercial license for non-open source projects.
For further information, contact: pathwyse@supsi.ch
How to cite
Salani, M., Basso, S., & Giuffrida, V. (2024).
PathWyse: a flexible, open-source library for the resource constrained shortest path problem.
Optimization Methods and Software. https://doi.org/10.1080/10556788.2023.2296978
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file routepricer-1.0.0.tar.gz.
File metadata
- Download URL: routepricer-1.0.0.tar.gz
- Upload date:
- Size: 194.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa4fe8e7c308dca356484b6ee7efef81a4cf00e879f111fbe3cc8003b0579f6d
|
|
| MD5 |
bf6db0c2aa5c775aefc5ad527a8ba3d5
|
|
| BLAKE2b-256 |
a18155d9e62b922e52adbdf42d4f26faa85fad4141f8c6f39ce1cf732d07c32c
|
File details
Details for the file routepricer-1.0.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 360.0 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6c50e441b6afe98c6177e83aa797b69c13cd14de42873cf58a9603e838fe837
|
|
| MD5 |
463c052df3bedbe90e05787ffb7f881a
|
|
| BLAKE2b-256 |
acc016a6dfa9cdbfddd607825e6424686bf4e4611a2c6c782e36386fcab205b7
|
File details
Details for the file routepricer-1.0.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.14, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957b71782ac71bbb46d7c359d1bd9d516e0940e26e4fd5e1d45ab7338b11eb6c
|
|
| MD5 |
dec10aea6553e771ec34c4f6842bac12
|
|
| BLAKE2b-256 |
3391057592a671c4ab488da0f77a778fed047ec33a209c1999124bc6b1496ed9
|
File details
Details for the file routepricer-1.0.0-cp314-cp314-macosx_26_0_arm64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp314-cp314-macosx_26_0_arm64.whl
- Upload date:
- Size: 400.0 kB
- Tags: CPython 3.14, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
440333ce6324b2ff7e51c0ef2daeaf7c05ab0b6bab7f949bf9d027081ba44b2b
|
|
| MD5 |
027fea29c73e3df644474f241eaacd14
|
|
| BLAKE2b-256 |
ee3ed9930874c989fa8bab5eb8a9f500e19d79060bc2e4fb98107c4691253185
|
File details
Details for the file routepricer-1.0.0-cp314-cp314-macosx_11_0_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp314-cp314-macosx_11_0_x86_64.whl
- Upload date:
- Size: 420.2 kB
- Tags: CPython 3.14, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43f361d56c802542089c76765a20048bfe1ae83bb549e5de150944fcd8ff63de
|
|
| MD5 |
7012f6b1179221f2c5b9ff01c54a300f
|
|
| BLAKE2b-256 |
a33661a975178c4b75df0cdcc8b13ae0b96f4aee5da85bf7954ff695d2a34426
|
File details
Details for the file routepricer-1.0.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 407.6 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dbc2af1ee9215fcf18adf555f9404a79acdb67443fb4bd4c602e571202cc061
|
|
| MD5 |
15765f5f6ac2ac049c177991e8cb43be
|
|
| BLAKE2b-256 |
0768e804a9ac63ca64046842a510e45e165f15a074cc7e6d42ed60b1719e7bb0
|
File details
Details for the file routepricer-1.0.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 351.5 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0aeddc9b9833542e1fffe63ce233aca44ed50116f9903d90d67f13b0e5b4e97
|
|
| MD5 |
22985afbbfc0a1a90bc412e7f73ef198
|
|
| BLAKE2b-256 |
76564be62893123a7c463c402f090e7648c02d2de9d7ca8dd6385e44944a1ea8
|
File details
Details for the file routepricer-1.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03607bc668efccc06f72e1faaf7b4b045b6f6a798a90d0421a2ed173ebaadd23
|
|
| MD5 |
74724775ca121be9def70311f4dd412f
|
|
| BLAKE2b-256 |
80674f181e0694165e98e9c096b735c2b3e73de326785a922401c49f6caa6724
|
File details
Details for the file routepricer-1.0.0-cp313-cp313-macosx_11_0_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp313-cp313-macosx_11_0_x86_64.whl
- Upload date:
- Size: 417.5 kB
- Tags: CPython 3.13, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e9268bbf447589a5d9b32a3cc8523ae2d664051f2eff808faae4bfb5521bbf3
|
|
| MD5 |
6f35596eddf49e547deb93e40ad47c22
|
|
| BLAKE2b-256 |
7b7dda97483f5b6bbc0341ce8f96e3a0971ba018a9a0be0c14987ac8cf4939a6
|
File details
Details for the file routepricer-1.0.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 404.6 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0250eaf6ad636b80754766ba0e206bb087a2cbc97cefe3e043e43466f9ccf2d
|
|
| MD5 |
aa968f29729eb464bffbff7570bdd162
|
|
| BLAKE2b-256 |
a7cd50edcc27454d652e2ee8ffe74820181ae4436bd556ffece258d1c2f322f2
|
File details
Details for the file routepricer-1.0.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 351.9 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6cddc7a9162a998ff1eef5d340cbd0946695fefb77c03a9418d74dc758dee57
|
|
| MD5 |
298ce475541bc60b31de6e11c5a30816
|
|
| BLAKE2b-256 |
d241cb75e227df439e0576f9ef1be68ea5ad5d6d08148478ce585d3dce3e1c28
|
File details
Details for the file routepricer-1.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89a5573d817d6ed125c3f64e05982700510c1001e6d6a5f21f69c237ce597189
|
|
| MD5 |
a12867580c3e42ecbde4877056258b39
|
|
| BLAKE2b-256 |
2f8884f3ac9bfd4f69221204acf50f632cce153dd99c4b6e8e66945618cd552a
|
File details
Details for the file routepricer-1.0.0-cp312-cp312-macosx_11_0_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp312-cp312-macosx_11_0_x86_64.whl
- Upload date:
- Size: 418.0 kB
- Tags: CPython 3.12, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0c881ff0c6dcd682febd98613cc175f9131e6026835e475ae4383374292d56b
|
|
| MD5 |
44282616b26766fd92683ee5ced3eb44
|
|
| BLAKE2b-256 |
1217688d808e4c5c6d375869504ddbb56b9bca46f9018c76483723aa5fb07452
|
File details
Details for the file routepricer-1.0.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 405.2 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dfaf0e74981318d3eac2e83eba84f99c011bef13146d06a7a0bb20ff412237d
|
|
| MD5 |
c9ff29cd1a610abcef917e78da8f2962
|
|
| BLAKE2b-256 |
74481437130bf26b7181530be39d69672281babe43916e2b4ecdb3af0fc90f50
|
File details
Details for the file routepricer-1.0.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 351.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50f7ac3125f6c17ccb32a776586fc84c35e4db57eee4dd59464258889a812ed5
|
|
| MD5 |
bf103b64cd5dc2fda4490acc3741a5cc
|
|
| BLAKE2b-256 |
fd43edd709fcdded76d1cc77dc474bed03c65245825ffa3891bb7449c70c7266
|
File details
Details for the file routepricer-1.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb21ba439a71fb7d70dfba8c423cfdebac110ea85f8b2364fab14713b653730
|
|
| MD5 |
f7e8f2b126ab840e9beafb1ef5daaee0
|
|
| BLAKE2b-256 |
5844cf31a7b6043fac01cdeee86eb9f6f87671a9ab5af5755a3aaef0e6f06460
|
File details
Details for the file routepricer-1.0.0-cp311-cp311-macosx_11_0_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp311-cp311-macosx_11_0_x86_64.whl
- Upload date:
- Size: 417.3 kB
- Tags: CPython 3.11, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc8366b014ced7f79b43dd4cf2429547d89e307cf7cf94d951f60cccf56fae33
|
|
| MD5 |
3b3c77caeca53e23537f409ca50518f5
|
|
| BLAKE2b-256 |
f6eae8648c4c8b6ff500f1be21fd68f602369bbf69b01005b356907571433f72
|
File details
Details for the file routepricer-1.0.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 404.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ce9664b59afc18d002f095119f29c91a17086d89bdf5b7228f94661b25d135f
|
|
| MD5 |
71368a104e11bd1c20ed2f0325d896ac
|
|
| BLAKE2b-256 |
31b0008f3c5da76f6ea8622b5491fbf954644ff78c752c2f417b3dd270ae29bf
|
File details
Details for the file routepricer-1.0.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 351.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b5a8c3dd8f386ceb069ae936caae5b8047b4b6a2881f369f694438f0ed1b2c
|
|
| MD5 |
1ce78034c826651ae6f2c616f3174220
|
|
| BLAKE2b-256 |
dc9f292ddb2fc292bce6a9a0c83ab3c1673185dc011856ef20ff20d54d2ecb4e
|
File details
Details for the file routepricer-1.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aba5f44ed450bc328bddada70c232559bf99a242ce3f83c36b0546300c6c98c
|
|
| MD5 |
9a104a1d95ccc54eba3f4ee5acb2f98f
|
|
| BLAKE2b-256 |
aafa9b52f7492b2dc34c9179e620a9eb93e4edf6a4d606501ff6d3b31f3d38db
|
File details
Details for the file routepricer-1.0.0-cp310-cp310-macosx_11_0_x86_64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp310-cp310-macosx_11_0_x86_64.whl
- Upload date:
- Size: 417.3 kB
- Tags: CPython 3.10, macOS 11.0+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
109dcb6063b9f586d104bfa25a2af27b708a9bc3d46db146830e91a43b809eef
|
|
| MD5 |
fdd806f156d0f88ab05ced63db25240c
|
|
| BLAKE2b-256 |
e227a7d8f47670ba6213784c6c5f5aa7f73c07876de72a146f67dbcf1de97951
|
File details
Details for the file routepricer-1.0.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: routepricer-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 404.8 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebfc66bbb18e9738865dc0ec9be0de3ce7726a2554f8842e40e4cc9702d9eba7
|
|
| MD5 |
1335050b838b87ce205ad058a9e19733
|
|
| BLAKE2b-256 |
b7969a4713a188ecc811f145bad7c80379e85792c01aba0c54bd4eb4c342e06f
|