reinterpretcat / vrp

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

fleet.vehicles.limits.maxDuration is driving duration or total? #135

Closed ilibar-zpt closed 11 months ago

ilibar-zpt commented 11 months ago

Hi, just a question on whether maxDuration accounts driving duration or total?

Also I wasn't able to find any mentions of "maxDuration" in code neither through github search nor via grep:

$ grep maxDuration -r .
./CHANGELOG.md:* rename `shiftTime` limit to `maxDuration`
./docs/src/concepts/pragmatic/problem/vehicles.md:    - **maxDuration** (optional): max tour duration

Is it implemented (and other limits)? Could you please link to the code?

reinterpretcat commented 11 months ago

Hi, maxDuration considers the whole duration.

It is mapped to the following property in the code: https://github.com/reinterpretcat/vrp/blob/master/vrp-pragmatic/src/format/problem/model.rs#L384

You cannot find it via grep as it is named using snake_case notation according to the rust code style. CamelCase is handled automatically by deserializer thanks annotation directive:

https://github.com/reinterpretcat/vrp/blob/master/vrp-pragmatic/src/format/problem/model.rs#L373

ilibar-zpt commented 11 months ago

thanks