PyVRP logo

PyVRP is an open-source, state-of-the-art vehicle routing problem (VRP) solver. It currently supports VRPs with:

  • Client demands (capacitated VRP);

  • Vehicles of different capacities, costs, and shift durations (heterogeneous fleet VRP);

  • Time windows, client service durations, and release times (VRP with time windows and release times);

  • Multiple depots (multi-depot VRP);

  • Optional clients with prizes for visiting (prize collecting, team orienteering problem).

The implementation builds on HGS-CVRP, but has been completely redesigned to be easy to use as a highly customisable Python package, while maintaining speed and state-of-the-art performance. This allows users to directly solve VRP instances, or implement variants of the HGS algorithm using Python, inspired by the examples in this documentation. Users can customise various aspects of the algorithm using Python, including population management, crossover strategies, granular neighbourhoods and operator selection in the local search.

The PyVRP package comes with pre-compiled binaries for Windows, Mac OS and Linux, and can thus be easily installed without requiring local compilation. It can be installed through pip via

pip install pyvrp

Hint

If you are new to vehicle routing or metaheuristics, you might benefit from first reading the introduction to VRP, introduction to HGS, and tutorial pages. To set up an installation from source, or to run the examples listed below yourself, please have a look at the installation instructions.

Contents