Package: vrp-cli
DescriptionThis project provides the way to solve multiple variations ofVehicle Routing Problemknown as rich VRP. It provides
custom hyper- and meta-heuristic implementations, shortly describedhere.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 goalAlthough 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 startedFor general installation steps and basic usage options, please check next sections. More detailed overview of features
and full description of the usage is presented inA Vehicle Routing Problem Solver Documentation.Probably, the easiest way to learn how to use the solver, would be to play withinteractive tutorial,
written as jupyter notebook.InstallationYou can install vrp solver using four different ways:Install with PythonThe functionality ofvrp-cliis published topypi.org, so you can just install it
using pip and use from python:pipinstallvrp-cli
pythonexamples/python-interop/example.py# run test exampleAlternatively, you can usematurintool to build solver locally. You need to enablepy_bindingsfeature which is not enabled by default.Additionally, to jupyter notebook mentioned above, you can find extra information inpython example sectionof the docs. Thefull source codeof python example is available in the repo which
contains useful model wrappers with help ofpydanticlib (reused by tutorial as well).Install from DockerAnother fast way to try vrp solver on your environment is to usedockerimage (not performance optimized):run public imagefromGithub Container Registry:dockerrun-it-v$(pwd):/repo--namevrp-cli--rmghcr.io/reinterpretcat/vrp/vrp-cli:1.23.0build image locallyusingDockerfileprovided:dockerbuild-tvrp_solver.
dockerrun-it-v$(pwd):/repo--rmvrp_solverPlease note that the docker image is built usingmusl, notglibcstandard library. So there might be some performance
implications.Install from CargoYou can install vrp solverclitool directly withcargo install:cargo install vrp-cliEnsure that your$PATHis properly configured to source the crates binaries, and then run solver using thevrp-clicommand.Install from sourceOnce pulled the source code, you can build it usingcargo:cargo build --releaseBuilt binaries can be found in the./target/releasedirectory.Alternatively, you can try to run the following script from the project root:./solve_problem.sh examples/data/pragmatic/objectives/berlin.default.problem.jsonIt 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.UsageYou can use vrp solver either from command line or from code:Use from command linevrp-clicrate is designed to use on problems defined in scientific or custom json (akapragmatic) format:vrp-cli solve pragmatic problem_definition.json -m routing_matrix.json --max-time=120Please refer togetting startedsection in
the documentation for more details.Use from codeIf you're using rust, then you can simply usevrp-scientific,vrp-pragmaticcrates to solve VRP problem
defined inpragmaticorscientificformat using default metaheuristic. For more complex scenarios, please refer tovrp-coredocumentation.If you're using some other language, e.g. java, kotlin, javascript, python, please checkinteropsection in documentation examples to see how
to call the library from it.Contribution policyopen source, limited contributionThe goal is to reduce burnout by limiting the maintenance overhead of reviewing and validating third-party code.Please submit anissueordiscussionif you have ideas for improvement.StatusExperimental.