reinterpretcat / vrp

A Vehicle Routing Problem solver
https://reinterpretcat.github.io/vrp/
Apache License 2.0
348 stars 69 forks source link

Allow duplicated profiles #38

Closed tertsdiepraam closed 3 years ago

tertsdiepraam commented 3 years ago

Thank you very much for this amazing application!

We are modelling a situation where there are multiple depot locations for the same type of vehicles, so we would like to reuse the same profiles (and distance matrices). However, when we give the same profile name multiple times, we get an error:

cannot read pragmatic problem from 'problem.json': 'E1500, cause: 'duplicated profile names', action: 'remove duplicates of profiles with the names: 'truck, car''.

As a workaround, we could of course copy the matrices and fix it that way, but that is not very ergonomic. Is there a reason that duplicated profiles checked?

reinterpretcat commented 3 years ago

Thanks for feedback!

If I understand correctly, you can specify one profile, e.g. with name car and reuse it on different vehicle types. Each profile is simply a reference to routing matrix passed to the solver.

tertsdiepraam commented 3 years ago

Ah, I must just have made a mistake then, because that is exactly what I would like to do. Thanks!