reinterpretcat / vrp

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

Define break interval #24

Closed dooley closed 3 years ago

dooley commented 3 years ago

time window or interval after which a break should happen (e.g. between 3 or 4 hours after start)

Can you please explain, how to define break intervals? I.e. every 4 hours? Documentation is not clear and i can't find any example.

BTW, great tool.

reinterpretcat commented 3 years ago

Hi, thanks for feedback!

Interval break is defined similar to normal:

"breaks": [{
      "time": [12600, 14400],
      "duration": 3600
}]

You specify time interval in seconds since departure, the solver will try to schedule break in this interval. However, break is soft constrain and can be skipped (then it goes to violations property in solution). To make it more desirable, you can override default objective function and set breaks property on minimize-unassigned objective (see https://reinterpretcat.github.io/vrp/concepts/pragmatic/problem/objectives.html).

Please note that interval break is experimental feature: requires more testing.

dooley commented 3 years ago

Thank you. Yes, i'm aware breaks are experimental.