Periodic visits to the same customer with buffer #118
-
I was just wondering about a complex scenario and the best/most convenient way to model it (theoretically) in VRP. Jobs: many shops all over Germany; all shops require periodic service visits, some 1x/year, some 2x, 4x, 6x, 12x etc. which translates approximately to:
additional constraint: one shop must always be visited from the same person (easy with VRP's Fleet: many service providers with different starting points; e.g. each 220 actual working days per year In the past I was modeling it with a simple Python script more or less like this:
This was working ok-ish but it's a lot of trial and error work to play with parameters, such as offsets, different buffer values etc. to figure out a solution without peaks. I was searching through the VRP docs and found the Periodic VRP (PVRP) which is sort of what I'd need. The compatibility param is already great for assigning the jobs to different days but afaik there is no way to avoid all let's say 12 yearly jobs being served consecutively in 12 working days. Do you have better idea how to model this? P.S. We're in the phase of testing VRP for different complex scenarios and will share our results (probably after the summer). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The current implementation focuses on multiple vehicle shifts, not recurrent jobs. At the moment, the only one way to model such time buffer between serving logically recurrent jobs is their time windows. To satisfy your requirement natively, it would require to write a new constraint which should consider this minimal buffer. I think it is possible, but would require some careful implementation of time buffer handling, e.g. pushing already assigned jobs to later time when a new job is inserted (+ adding extra parameter to model it in pragmatic format) |
Beta Was this translation helpful? Give feedback.
The current implementation focuses on multiple vehicle shifts, not recurrent jobs. At the moment, the only one way to model such time buffer between serving logically recurrent jobs is their time windows. To satisfy your requirement natively, it would require to write a new constraint which should consider this minimal buffer. I think it is possible, but would require some careful implementation of time buffer handling, e.g. pushing already assigned jobs to later time when a new job is inserted (+ adding extra parameter to model it in pragmatic format)