Skip to main content

A command line interface for VRP solver

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

vrp_cli-1.24.0-cp312-none-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12 Windows x86-64

vrp_cli-1.24.0-cp312-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.12 Windows x86

vrp_cli-1.24.0-cp312-cp312-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

vrp_cli-1.24.0-cp312-cp312-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12 macOS 10.12+ x86-64

vrp_cli-1.24.0-cp311-none-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

vrp_cli-1.24.0-cp311-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.11 Windows x86

vrp_cli-1.24.0-cp311-cp311-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

vrp_cli-1.24.0-cp311-cp311-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.11 macOS 10.12+ x86-64

vrp_cli-1.24.0-cp310-none-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

vrp_cli-1.24.0-cp310-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86

vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

vrp_cli-1.24.0-cp310-cp310-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

vrp_cli-1.24.0-cp310-cp310-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10 macOS 10.12+ x86-64

vrp_cli-1.24.0-cp39-none-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

vrp_cli-1.24.0-cp39-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86

vrp_cli-1.24.0-cp39-cp39-macosx_11_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

vrp_cli-1.24.0-cp39-cp39-macosx_10_12_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.9 macOS 10.12+ x86-64

vrp_cli-1.24.0-cp38-none-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

vrp_cli-1.24.0-cp38-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86

vrp_cli-1.24.0-cp37-none-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.7 Windows x86-64

vrp_cli-1.24.0-cp37-none-win32.whl (1.6 MB view details)

Uploaded CPython 3.7 Windows x86

File details

Details for the file vrp_cli-1.24.0-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 582516c9ea98d74579f2c6100f8230af93be3cb84ff0d45b8328ef2ed3c97720
MD5 12a2c5136072844b0784f2b1b43b3dac
BLAKE2b-256 38d3fb5ae97c675b467b78dd7bbb665c8beed52523a591ed20c1de9196133588

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp312-none-win32.whl.

File metadata

  • Download URL: vrp_cli-1.24.0-cp312-none-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for vrp_cli-1.24.0-cp312-none-win32.whl
Algorithm Hash digest
SHA256 829007a0fb85742351bd0970f3ad543242afdbe3317a0762fe9574a09c8ed995
MD5 fad5a1cbac0468cffd9567a0cb940018
BLAKE2b-256 e9ef5defb13e7a531dd82608891fc783716568c43b755b5cb833d884fb37dbdb

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95c3b01c6b0be3bf1cb1cf20d37e88f88244e71e2beab3335ed3a785aa91cf26
MD5 e47acd617c83030274ab60cae36b7c95
BLAKE2b-256 d0aa24c489ef304db74e278207b1ecdf26c1927161d740ab0367c59affe14012

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b591c25ea52c9d3f7b29b618dcade05bdd51ae3ad5a6011984bedf5c392847f8
MD5 f7534baaa8b8d2d5f1ed11b03c2c1c52
BLAKE2b-256 c0b1d0385366059026f5e37b91e347d6420498dbb9777da89672b7f2b082d697

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 d4d58b200354712da6149d523f4e262689872e780afffad9df23bb1bf9b68dd3
MD5 102e4bb4087bf103f4c9e63aaaecd0ed
BLAKE2b-256 645eed6487c638013114d4c73de4bbf0f415405b1028553485575b0d345c725e

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp311-none-win32.whl.

File metadata

  • Download URL: vrp_cli-1.24.0-cp311-none-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for vrp_cli-1.24.0-cp311-none-win32.whl
Algorithm Hash digest
SHA256 3e73f84366983ef3b1303aa05c104f2b9fba01ff9812d953f96b121bc93bf7e6
MD5 b130d526562465baeaa0fda2cfac36cd
BLAKE2b-256 59aa373229469822b76d4f96860acbde6291676e0f5f2d9488ebeb0a6e6f5a6c

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dc3a1de42cb3fd48d71368933168fd23ffb6a7875d373f6ca13f426711bc65be
MD5 e69442923b3241ab85560c256d59e652
BLAKE2b-256 5e2ebc1e4203e0831782a4257150928c7790de6ad1c0195edad4e7f9e39541f8

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7aa8c414a6ade6d101f43f7f8716a09181ba3c5dac27b6ae91bcbd787bddc932
MD5 e124e5dc415ed694aeeb10b812d6aabe
BLAKE2b-256 a5b10ba50538398bfc14c06981bec8b07e02ef283b51fb9616fdf0a95e562eef

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 45796de43b3d6a59535b8a76f9ce4647db28694046d298cb746bb152870d6a57
MD5 5177d803045fbab52fa369d23e54d403
BLAKE2b-256 0e5bcf315ebf957c780a5c0facf3d39d188a3462239f4e5c67780eac8b57070f

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp310-none-win32.whl.

File metadata

  • Download URL: vrp_cli-1.24.0-cp310-none-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for vrp_cli-1.24.0-cp310-none-win32.whl
Algorithm Hash digest
SHA256 f288f9db3494bc40abc53ebc89fc0bd9e63ea2dfc490cc4b212f0a3e3eae20a4
MD5 6e7dd5e730484515bb43665a3121831e
BLAKE2b-256 2fa56143e7cd70db280cb2a2a0aeab8ec2f093f59d68bd8f9ae1f13adca23110

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 829cc17b707f7951adced5baa4918839e496d13b8097585126a2a3feb9d8faa9
MD5 107f17c88db34130d04ac4498d31c636
BLAKE2b-256 629d247b1066145cfd8f6dc000da4a7e180fb90b8349910da167b4a69549c4aa

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 5162e538ec62ab998d9cfb0f1b5d44ca5dfbf34ad7c9782895ad118a6320db63
MD5 3bbfd15f63ab43f731fb64a2075f4871
BLAKE2b-256 2c4eff600fcfae682f5ebc44f74181bf51911673e29cd72f442e1af922b68910

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 99ed48e2c59668f2976acb1ccd448e0c776310959f2e8efd6b7a215842f26c29
MD5 caddf9a3a33eac7293bc9f537de24754
BLAKE2b-256 c69754e836ceb6fdc4232b35bb0a0716b20edd484c17978add5669dbf8b809d4

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6fe0448797926cde9e84a9f36bf394f3e1f046171a64342322767e651db9eebb
MD5 688d26d886d2581271b794c5981e44ba
BLAKE2b-256 b7b241f575e5a9b84bdd1dda00ad86b4536c82c2be9d1eb851c22ce2798879fe

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 6abb671cad601a18c65aa385c5b7ddfb61d35f9afd49cb8c35d1bb492cd3ace3
MD5 636ab57122bc3ba8314d2a5cb4aa01c5
BLAKE2b-256 2979ab2c855de55184400d40b776f8a36a0d23b2397a654bd6c435018969efe5

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp39-none-win32.whl.

File metadata

  • Download URL: vrp_cli-1.24.0-cp39-none-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for vrp_cli-1.24.0-cp39-none-win32.whl
Algorithm Hash digest
SHA256 fe62d129b2db6eb394213e3663d5e1347502bbb37f932404f3b2e285b7442d9d
MD5 358b80f0e58136962ad7e63c2476f3ab
BLAKE2b-256 f068e77ea928cae28520a0f9f669d3a6be2020a59b7794e59c668f8f1fa23a57

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05b099a3bcfd57af84a9b979fa11f82c54c8c3e5be6ecb4f6be44a5e4377fb60
MD5 bf170c333cd5304efeaa15378c7a4b7d
BLAKE2b-256 9be03e09c57fe1a2cbf4ccb8727c597f8f0369baccb149c12b11eb7e9e125e88

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp39-cp39-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 54251024b72525b4cf3dfa270f4636b071cc0516923b10ef1beeb17a23adf482
MD5 7ec20898d7c00e210045d7132b47bccf
BLAKE2b-256 f57e07bb3e204c10558b7dd42908740d3fc3c16ce74b3a7f2cec9101d9d923a3

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 035380a39d841c764841d3a28bbcc990285920c4ac204a804f679bb05798fee1
MD5 ef1d5fdf2f1796beb07342d778e11e20
BLAKE2b-256 cb0ab4066090b6c8450a9dd7f3a5287f703871a87f015aa1f3c142400dc907e2

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp38-none-win32.whl.

File metadata

  • Download URL: vrp_cli-1.24.0-cp38-none-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for vrp_cli-1.24.0-cp38-none-win32.whl
Algorithm Hash digest
SHA256 e047a2e920382b74fca929a8c809ab183e0944789803356b60f42ec7b8afd21b
MD5 6237a4fc26d7df87383de6beabf5f078
BLAKE2b-256 1434d358cf5c4ba3ede4374e55f15406c367af81c384fa42c5e495ff93900583

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for vrp_cli-1.24.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 6606d346dd3f5f2f702288bc3c217a03e475ce119494fb02612439ecd781acd3
MD5 93cb0588473e92f30e647f742e7db006
BLAKE2b-256 616182587fe5286a67eb42b7bfab1447331b5866668391503cd36aa96ec6d363

See more details on using hashes here.

File details

Details for the file vrp_cli-1.24.0-cp37-none-win32.whl.

File metadata

  • Download URL: vrp_cli-1.24.0-cp37-none-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.7.0

File hashes

Hashes for vrp_cli-1.24.0-cp37-none-win32.whl
Algorithm Hash digest
SHA256 adc76c5e2725363bd1fc8e2a17e817b3fe0d1316a3f9fecba396ef14e42a902b
MD5 cb62303ffb6c65957460d08896babf9c
BLAKE2b-256 59a00a811a761fbef7f763519b0720aa431f9bcfe0ff1f7a6fcc67c96f7aae6c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page