PyVRP / VRPLIB

Python package to read and write vehicle routing problem instances.
https://github.com/PyVRP/VRPLIB
MIT License
82 stars 8 forks source link

Ragged arrays #108

Closed leonlan closed 3 months ago

leonlan commented 1 year ago

It is currently assumed that all data sections are presented as tabular data, which is then conveniently parsed using np.genfromtxt.

This may be too restrictive for more general VRP variants. For instance, the site-dependent VRP restricts some vehicles from visiting a subset of clients. If we keep the assumption that data sections are tabular, then this would require a $N$ times $K$ matrix with 0 and 1's to denote whether client $i$ can be visited by vehicle $j$ or not.

A more compact option would allow a list of indices. For example, 1 1 2 3 4 could mean that vehicle 1 is not allowed to visit clients 1 2 3 4.