Skip to main content

crates.io build downloads codecov CodeScene Code Health dependency status DOI

VRP example

Description

This project provides a way to solve multiple variations of Vehicle Routing Problem known as rich VRP. It provides custom hyper- and meta-heuristic implementations, shortly described here.

If you use the project in academic work, please consider citing:

@misc{builuk_rosomaxa_2023,
    author       = {Ilya Builuk},
    title        = {{A new solver for rich Vehicle Routing Problem}},
    year         = 2023,
    doi          = {10.5281/zenodo.4624037},
    publisher    = {Zenodo},
    url          = {https://doi.org/10.5281/zenodo.4624037}
}

Design goal

Although performance is constantly in focus, the main idea behind design is extensibility: the project aims to support a wide range of VRP variations known as Rich VRP. This is achieved through various extension points: custom constraints, objective functions, acceptance criteria, etc.

Getting started

For general installation steps and basic usage options, please check the next sections. More detailed overview of the features and full description of the usage is presented in A Vehicle Routing Problem Solver Documentation.

Probably, the easiest way to learn how to use the solver as is, would be to play with interactive tutorial, written as jupyter notebook.

Additionally, you can check vrp-core/examples to see how to use the library and extend it within a new functionality.

Installation

You can install the latest release of the vrp solver using four different ways:

Install with Python

The functionality of vrp-cli is published to pypi.org, so you can just install it using pip and use from python:

pip install vrp-cli
python examples/python-interop/example.py # run test example

Alternatively, you can use maturin tool to build solver locally. You need to enable py_bindings feature which is not enabled by default.

Additionally, to jupyter notebook mentioned above, you can find extra information in python example section of the docs. The full source code of python example is available in the repo which contains useful model wrappers with help of pydantic lib (reused by tutorial as well).

Install from Docker

Another fast way to try vrp solver on your environment is to use docker image (not performance optimized):

  • run public image from Github Container Registry:
    docker run -it -v $(pwd):/repo --name vrp-cli --rm ghcr.io/reinterpretcat/vrp/vrp-cli:1.24.0
  • build image locally using Dockerfile provided:
docker build -t vrp_solver .
docker run -it -v $(pwd):/repo --rm vrp_solver

Please note that the docker image is built using musl, not glibc standard library. So there might be some performance implications.

Install from Cargo

You can install vrp solver cli tool directly with cargo install:

cargo install vrp-cli

Ensure that your $PATH is properly configured to source the crates binaries, and then run solver using the vrp-cli command.

Install from source

Once pulled the source code, you can build it using cargo:

cargo build --release

Built binaries can be found in the ./target/release directory and can be run using vrp-cli executable, e.g.:

./target/release/vrp-cli solve solomon examples/data/scientific/solomon/C101.100.txt --log

Alternatively, you can try to run the following script from the project root (with pragmatic format only):

./solve_problem.sh examples/data/pragmatic/objectives/berlin.default.problem.json

It will build the executable and automatically launch the solver with the specified VRP definition. Results are stored in the folder where a problem definition is located.

Please note, that master branch normally contains not yet released changes.

Usage

Using from code

If you're using rust, you have multiple options for how the project can be used:

Use customization capabilities

The vrp-core provides API to compose a VRP formulation from various building blocks and even add your own. Start with basic vrp-core/examples, then check the user documentation and code for more details.

Use built-in formats

You can use vrp-scientific, vrp-pragmatic crates to solve a VRP problem defined in pragmatic or scientific format using default metaheuristic. Or you can use CLI interface for that (see below).

If you're using some other language, e.g. java, kotlin, javascript, python, please check interop section in documentation examples to see how to call the library from it (currently, limited to pragmatic format).

Using from command line

vrp-cli crate is designed to use on problems defined in scientific or custom json (aka pragmatic) format:

vrp-cli solve pragmatic problem_definition.json -m routing_matrix.json --max-time=120

Please refer to getting started section in the documentation for more details.

Contribution policy

open source, limited contribution

The goal is to reduce burnout by limiting the maintenance overhead of reviewing and validating third-party code.

Please submit an issue or discussion if you have ideas for improvement.

Status

Permanently experimental. This is my pet project, and I'm not paid for it, so expect a very limited support.

Release files for vrp-cli 1.24.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for vrp-cli 1.24.0
File
vrp_cli-1.24.0-cp312-none-win_amd64.whl CPython 3.12 none Windows x86-64 Details
vrp_cli-1.24.0-cp312-none-win32.whl CPython 3.12 none Windows x86-32 Details
vrp_cli-1.24.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
vrp_cli-1.24.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
vrp_cli-1.24.0-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details
vrp_cli-1.24.0-cp311-none-win32.whl CPython 3.11 none Windows x86-32 Details
vrp_cli-1.24.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
vrp_cli-1.24.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
vrp_cli-1.24.0-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
vrp_cli-1.24.0-cp310-none-win32.whl CPython 3.10 none Windows x86-32 Details
vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARMv7l Details
vrp_cli-1.24.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
vrp_cli-1.24.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details
vrp_cli-1.24.0-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
vrp_cli-1.24.0-cp39-none-win32.whl CPython 3.9 none Windows x86-32 Details
vrp_cli-1.24.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
vrp_cli-1.24.0-cp39-cp39-macosx_10_12_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.12+ x86-64 Details
vrp_cli-1.24.0-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
vrp_cli-1.24.0-cp38-none-win32.whl CPython 3.8 none Windows x86-32 Details
vrp_cli-1.24.0-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details
vrp_cli-1.24.0-cp37-none-win32.whl CPython 3.7 none Windows x86-32 Details

Total release size: 37.1 MB

Release files / vrp_cli-1.24.0-cp312-none-win_amd64.whl

Download URL vrp_cli-1.24.0-cp312-none-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
582516c9ea98d74579f2c6100f8230af93be3cb84ff0d45b8328ef2ed3c97720
BLAKE2b-256 checksum
How to use checksums
38d3fb5ae97c675b467b78dd7bbb665c8beed52523a591ed20c1de9196133588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp312-none-win32.whl

Download URL vrp_cli-1.24.0-cp312-none-win32.whl
Size 1.6 MB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
829007a0fb85742351bd0970f3ad543242afdbe3317a0762fe9574a09c8ed995
BLAKE2b-256 checksum
How to use checksums
e9ef5defb13e7a531dd82608891fc783716568c43b755b5cb833d884fb37dbdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL vrp_cli-1.24.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
95c3b01c6b0be3bf1cb1cf20d37e88f88244e71e2beab3335ed3a785aa91cf26
BLAKE2b-256 checksum
How to use checksums
d0aa24c489ef304db74e278207b1ecdf26c1927161d740ab0367c59affe14012
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL vrp_cli-1.24.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b591c25ea52c9d3f7b29b618dcade05bdd51ae3ad5a6011984bedf5c392847f8
BLAKE2b-256 checksum
How to use checksums
c0b1d0385366059026f5e37b91e347d6420498dbb9777da89672b7f2b082d697
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp311-none-win_amd64.whl

Download URL vrp_cli-1.24.0-cp311-none-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
d4d58b200354712da6149d523f4e262689872e780afffad9df23bb1bf9b68dd3
BLAKE2b-256 checksum
How to use checksums
645eed6487c638013114d4c73de4bbf0f415405b1028553485575b0d345c725e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp311-none-win32.whl

Download URL vrp_cli-1.24.0-cp311-none-win32.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
3e73f84366983ef3b1303aa05c104f2b9fba01ff9812d953f96b121bc93bf7e6
BLAKE2b-256 checksum
How to use checksums
59aa373229469822b76d4f96860acbde6291676e0f5f2d9488ebeb0a6e6f5a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL vrp_cli-1.24.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dc3a1de42cb3fd48d71368933168fd23ffb6a7875d373f6ca13f426711bc65be
BLAKE2b-256 checksum
How to use checksums
5e2ebc1e4203e0831782a4257150928c7790de6ad1c0195edad4e7f9e39541f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL vrp_cli-1.24.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7aa8c414a6ade6d101f43f7f8716a09181ba3c5dac27b6ae91bcbd787bddc932
BLAKE2b-256 checksum
How to use checksums
a5b10ba50538398bfc14c06981bec8b07e02ef283b51fb9616fdf0a95e562eef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp310-none-win_amd64.whl

Download URL vrp_cli-1.24.0-cp310-none-win_amd64.whl
Size 1.8 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
45796de43b3d6a59535b8a76f9ce4647db28694046d298cb746bb152870d6a57
BLAKE2b-256 checksum
How to use checksums
0e5bcf315ebf957c780a5c0facf3d39d188a3462239f4e5c67780eac8b57070f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp310-none-win32.whl

Download URL vrp_cli-1.24.0-cp310-none-win32.whl
Size 1.6 MB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
f288f9db3494bc40abc53ebc89fc0bd9e63ea2dfc490cc4b212f0a3e3eae20a4
BLAKE2b-256 checksum
How to use checksums
2fa56143e7cd70db280cb2a2a0aeab8ec2f093f59d68bd8f9ae1f13adca23110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
829cc17b707f7951adced5baa4918839e496d13b8097585126a2a3feb9d8faa9
BLAKE2b-256 checksum
How to use checksums
629d247b1066145cfd8f6dc000da4a7e180fb90b8349910da167b4a69549c4aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.17+ ARMv7l
SHA-256 checksum
How to use checksums
5162e538ec62ab998d9cfb0f1b5d44ca5dfbf34ad7c9782895ad118a6320db63
BLAKE2b-256 checksum
How to use checksums
2c4eff600fcfae682f5ebc44f74181bf51911673e29cd72f442e1af922b68910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL vrp_cli-1.24.0-cp310-cp310-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
99ed48e2c59668f2976acb1ccd448e0c776310959f2e8efd6b7a215842f26c29
BLAKE2b-256 checksum
How to use checksums
c69754e836ceb6fdc4232b35bb0a0716b20edd484c17978add5669dbf8b809d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp310-cp310-macosx_10_12_x86_64.whl

Download URL vrp_cli-1.24.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6fe0448797926cde9e84a9f36bf394f3e1f046171a64342322767e651db9eebb
BLAKE2b-256 checksum
How to use checksums
b7b241f575e5a9b84bdd1dda00ad86b4536c82c2be9d1eb851c22ce2798879fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp39-none-win_amd64.whl

Download URL vrp_cli-1.24.0-cp39-none-win_amd64.whl
Size 1.8 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
6abb671cad601a18c65aa385c5b7ddfb61d35f9afd49cb8c35d1bb492cd3ace3
BLAKE2b-256 checksum
How to use checksums
2979ab2c855de55184400d40b776f8a36a0d23b2397a654bd6c435018969efe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp39-none-win32.whl

Download URL vrp_cli-1.24.0-cp39-none-win32.whl
Size 1.6 MB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
fe62d129b2db6eb394213e3663d5e1347502bbb37f932404f3b2e285b7442d9d
BLAKE2b-256 checksum
How to use checksums
f068e77ea928cae28520a0f9f669d3a6be2020a59b7794e59c668f8f1fa23a57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL vrp_cli-1.24.0-cp39-cp39-macosx_11_0_arm64.whl
Size 1.5 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
05b099a3bcfd57af84a9b979fa11f82c54c8c3e5be6ecb4f6be44a5e4377fb60
BLAKE2b-256 checksum
How to use checksums
9be03e09c57fe1a2cbf4ccb8727c597f8f0369baccb149c12b11eb7e9e125e88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp39-cp39-macosx_10_12_x86_64.whl

Download URL vrp_cli-1.24.0-cp39-cp39-macosx_10_12_x86_64.whl
Size 1.7 MB
Tags CPython 3.9 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
54251024b72525b4cf3dfa270f4636b071cc0516923b10ef1beeb17a23adf482
BLAKE2b-256 checksum
How to use checksums
f57e07bb3e204c10558b7dd42908740d3fc3c16ce74b3a7f2cec9101d9d923a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp38-none-win_amd64.whl

Download URL vrp_cli-1.24.0-cp38-none-win_amd64.whl
Size 1.8 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
035380a39d841c764841d3a28bbcc990285920c4ac204a804f679bb05798fee1
BLAKE2b-256 checksum
How to use checksums
cb0ab4066090b6c8450a9dd7f3a5287f703871a87f015aa1f3c142400dc907e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp38-none-win32.whl

Download URL vrp_cli-1.24.0-cp38-none-win32.whl
Size 1.6 MB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
e047a2e920382b74fca929a8c809ab183e0944789803356b60f42ec7b8afd21b
BLAKE2b-256 checksum
How to use checksums
1434d358cf5c4ba3ede4374e55f15406c367af81c384fa42c5e495ff93900583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp37-none-win_amd64.whl

Download URL vrp_cli-1.24.0-cp37-none-win_amd64.whl
Size 1.8 MB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
6606d346dd3f5f2f702288bc3c217a03e475ce119494fb02612439ecd781acd3
BLAKE2b-256 checksum
How to use checksums
616182587fe5286a67eb42b7bfab1447331b5866668391503cd36aa96ec6d363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release files / vrp_cli-1.24.0-cp37-none-win32.whl

Download URL vrp_cli-1.24.0-cp37-none-win32.whl
Size 1.6 MB
Tags CPython 3.7 Windows x86-32
SHA-256 checksum
How to use checksums
adc76c5e2725363bd1fc8e2a17e817b3fe0d1316a3f9fecba396ef14e42a902b
BLAKE2b-256 checksum
How to use checksums
59a00a811a761fbef7f763519b0720aa431f9bcfe0ff1f7a6fcc67c96f7aae6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.0

Release history Release notifications | RSS feed

This release

1.24.0 This release

22 release files

1.23.0

6 release files

1.21.0

1 release file

1.19.2

1 release file

1.19.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page