The 0.9.0 release of PyVRP adds support for mixed distance and duration based objectives, different distance and duration profiles, different start and end depots on each route, and fixes an overflow bug that sometimes materialised when solving VRPs with time windows.
Highlights
- PyVRP now supports **mixed distance and duration** terms in the objective function. This means you are now able to optimise problems with both distance-based and duration-based costs.
- PyVRP now supports different **start and end depots**. This is particularly useful for re-optimisation.
- PyVRP now supports **routing profiles**, a flexible way to specify different distance and duration matrices for groups of vehicles. This can be used to model zone restrictions, but also account for the differences between e.g. cars, trucks, and bicycles.
Breaking changes
- We have removed the `dist()` and `duration()` access methods from the `ProblemData` instance. One should instead directly obtain the distance or duration matrices from `ProblemData`, and index those directly.
- We have removed depot time windows. These are unnecessary since the vehicle types already have time windows, and those generalise time windows on the depots.
- We have separated the start and end depot arguments on the vehicle type. Instead of passing a single `depot` argument when adding a vehicle type, now pass `start_depot` and `end_depot`. Passing the same depot to both `start_depot` and `end_depot` retains the previous behaviour.
Additional
- We have removed a warning about empty solutions being added to the `Population`, which sometimes happens when solving instances with optional clients. This is not problematic, so the warning was not appropriate.
- We have added a warning about penalty values reaching their maximum value. This typically indicates a feasibility problem in the data.
- We have added a devcontainer for PyVRP development. This should make it easier for new contributors to get started with PyVRP.
What's Changed
* Update documentation about discussion feature by N-Wouda in https://github.com/PyVRP/PyVRP/pull/545
* Support vehicle-specific distance and duration objectives by N-Wouda in https://github.com/PyVRP/PyVRP/pull/546
* Randomly select optional clients in Solution random constructor by leonlan in https://github.com/PyVRP/PyVRP/pull/554
* Add profile-guided optimisation option to build script by N-Wouda in https://github.com/PyVRP/PyVRP/pull/559
* Randomly select vehicle types/routes in Solution::makeRandom by N-Wouda in https://github.com/PyVRP/PyVRP/pull/562
* Make repeated builds faster by splitting libcommon by N-Wouda in https://github.com/PyVRP/PyVRP/pull/568
* Remove dist() and duration() accessors on ProblemData by N-Wouda in https://github.com/PyVRP/PyVRP/pull/567
* Routing profiles by N-Wouda in https://github.com/PyVRP/PyVRP/pull/573
* Update OR-Tools benchmark by leonlan in https://github.com/PyVRP/PyVRP/pull/587
* Fix integer overflow issue in DurationSegment by leonlan in https://github.com/PyVRP/PyVRP/pull/590
* Warn when a penalty parameter reaches its maximum value by N-Wouda in https://github.com/PyVRP/PyVRP/pull/598
* Update and add some missing docstrings by N-Wouda in https://github.com/PyVRP/PyVRP/pull/606
* Computed initial penalty values by N-Wouda in https://github.com/PyVRP/PyVRP/pull/607
* Remove EmptySolutionWarning by N-Wouda in https://github.com/PyVRP/PyVRP/pull/611
* Implement route profiles in pyvrp.search by N-Wouda in https://github.com/PyVRP/PyVRP/pull/579
* Remove depot time windows by N-Wouda in https://github.com/PyVRP/PyVRP/pull/616
* Fix duplicate max duration timewarp by wouterkool in https://github.com/PyVRP/PyVRP/pull/613
* Separate start and end depots by N-Wouda in https://github.com/PyVRP/PyVRP/pull/612
* Add summary() method to Result by N-Wouda in https://github.com/PyVRP/PyVRP/pull/619
* Add a new example to the tutorial by N-Wouda in https://github.com/PyVRP/PyVRP/pull/618
* PyVRP devcontainer by leonlan in https://github.com/PyVRP/PyVRP/pull/580
* Read SDVRP instances by leonlan in https://github.com/PyVRP/PyVRP/pull/617
**Zenodo**: https://doi.org/10.5281/zenodo.12568807
**Full Changelog**: https://github.com/PyVRP/PyVRP/compare/v0.8.2...v0.9.0