reinterpretcat / vrp

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

New objective "earliest-end-date" #69

Closed nkl1996 closed 2 years ago

nkl1996 commented 2 years ago

Hey, i want to optimize a job with multiple shifts over a month, teams and tours. When i solve this problem i get a solution thats spreads the tour dates randomly over this time period even so the problem can be done in half the time period. I want the tours to be as early as possible, so the teams are free for the rest of the time.

Is there a possibility to archive this or can you program a new objective for this?

reinterpretcat commented 2 years ago

Yes, it can happen and I think it can be solved by adding a custom objective function which will try to minimize a sum of tour arrival times. At the moment, it is not there in pragmatic format

nkl1996 commented 2 years ago

Can you add such objective function in the near future or is it not planned? I never programmed anything in rust otherwise i would give it a try.

reinterpretcat commented 2 years ago

I can implement such global objective a bit later after my current task, but it might be not enough for some problems as the simple implementation will guide the search only on solution comparison level. This won't be enough for large problems as it might require more time to redistribute jobs. Alternative solution could be pre-processing on client side and splitting problems into multiple according to shift times (of course, can be done internally too with more sophisticated implementation).

reinterpretcat commented 2 years ago

Some functionality is added here: https://github.com/reinterpretcat/vrp/commit/31ac6ad6bcae5afe7069600855d09e928fa13eb5