PyVRP: a high-performance VRP solver package

Niels A. Wouda,Leon Lan,Wouter Kool
DOI: https://doi.org/10.1287/ijoc.2023.0055
2024-03-21
Abstract:We introduce PyVRP, a Python package that implements hybrid genetic search in a state-of-the-art vehicle routing problem (VRP) solver. The package is designed for the VRP with time windows (VRPTW), but can be easily extended to support other VRP variants. PyVRP combines the flexibility of Python with the performance of C++, by implementing (only) performance critical parts of the algorithm in C++, while being fully customisable at the Python level. PyVRP is a polished implementation of the algorithm that ranked 1st in the 2021 DIMACS VRPTW challenge and, after improvements, ranked 1st on the static variant of the EURO meets NeurIPS 2022 vehicle routing competition. The code follows good software engineering practices, and is well-documented and unit tested. PyVRP is freely available under the liberal MIT license. Through numerical experiments we show that PyVRP achieves state-of-the-art results on the VRPTW and capacitated VRP. We hope that PyVRP enables researchers and practitioners to easily and quickly build on a state-of-the-art VRP solver.
Neural and Evolutionary Computing,Machine Learning
What problem does this paper attempt to address?
### Problems Addressed by the Paper This paper introduces PyVRP, a high-performance Python package for solving the Vehicle Routing Problem (VRP). Specifically, PyVRP implements the Hybrid Genetic Search (HGS) algorithm and is optimized for the Vehicle Routing Problem with Time Windows (VRPTW). Additionally, the package can be easily extended to support other VRP variants. #### Main Objectives: 1. **High-Performance Solver**: PyVRP aims to provide a high-performance and user-friendly solver for VRP and its variants, such as VRPTW and Capacity-Constrained VRP. 2. **Flexibility and Customization**: Users can customize different parts of the algorithm at the Python level, including population management, crossover strategies, and local search neighborhoods. 3. **Open Source and Community Contribution**: PyVRP is an open-source project that encourages community contributions to support more VRP variants. 4. **Support for Machine Learning Research**: PyVRP aims to help machine learning researchers make progress in the VRP field, surpassing the currently commonly used benchmark tool LKH-3. ### Summary By combining the flexibility of Python with the performance of C++, PyVRP provides an efficient and customizable VRP solver. The package has not only achieved excellent results in academic competitions but also features good documentation and broad applicability, aiming to advance research and applications in the VRP field.