RCSPP (Resource Constrained Shortest Path Problem) is a C++ library (built as a shared library: DLL on Windows, .so on Linux, .dylib on macOS) for solving resource-constrained shortest path problems, with optional Python bindings (via pybind11). Moreover, the project includes an optional VRP column generation example (using Gurobi) to illustrate how to use the library.
- CMake >= 3.26
- C++ compiler with C++23 support (e.g., Clang 21.1.0, or a compatible compiler)
- Python >= 3.11 (for Python bindings and pre-commit hooks)
- Git (to have pybind11 as a submodule)
- pybind11 (as a submodule – auto-included when you follow instructions below)
- Gurobi >= 12.03
For the C++ library and the VRP example, clone the RCSPP repository as follows:
git clone https://github.com/lab-core/rcspp.git
cd rcsppIf you plan to use the optional Python bindings, you must also clone the
repository with submodules to ensure pybind11 is present (as a submodule
under extern/pybind11):
git clone --recursive https://github.com/lab-core/rcspp.git
cd rcsppIf you already cloned without --recursive and now want to enable Python
bindings, run:
git submodule update --init --recursiveTo download the instances that can be used with the VRP example, use the following command:
git lfs pullTo compile the library only:
mkdir build
cd build
cmake ..
cmake --build .To compile the Python bindings, use the CMake option USE_PYTHON=ON (set to OFF
by default):
cmake -DUSE_PYTHON=ON ..
cmake --build .To compile the VRP example, use the CMake option USE_VRP=ON (set to OFF
by default):
cmake -DUSE_VRP=ON ..
cmake --build .Note that these options can be combined:
cmake -DUSE_PYTHON=ON -DUSE_VRP=ON ..
cmake --build .- Git
- Python >= 3.11
- Node.js (Required for
markdownlint-cli(Markdown formatting)) - C++ tools
- clang-format (for formatting C/C++ code)
- clang-tidy (for C++ linting)
- cppcheck (for static analysis)
- cpplint (for C++ style checks)
On many systems, these can be installed via your package manager:
- Ubuntu:
sudo apt-get install clang-format clang-tidy cppcheck cpplint - macOS (with Homebrew):
brew install clang-format clang-tidy cppcheck cpplint - Windows:
Provided via LLVM releases or via Chocolatey.
-
Install pre-commit (ensure you have Python >= 3.11):
pip install pre-commit
-
Install all hooks from [.pre-commit-config.yaml] (to ensure hooks run on every commit):
pre-commit install --hook-type pre-commit
-
[Optional] Update hooks (to keep hooks up to date):
pre-commit autoupdate
-
[Optional] Run all hooks manually on all files:
pre-commit run --all-files