Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max route time for vehicle which factors in Job service time #1070

Open
answerquest opened this issue Feb 14, 2024 · 3 comments
Open

Max route time for vehicle which factors in Job service time #1070

answerquest opened this issue Feb 14, 2024 · 3 comments

Comments

@answerquest
Copy link

Hi, thank you for this amazing tool.
I've been using max_travel_time constraint in vehicles as the "duty hours" for the vehicle, but today in one edge case realised that this constraint doesn't take into account the service time of the Job.

As a result, I'm ending up with routes whose complete job duration surpasses the supplied max_travel_time value.

I understand now that max_travel_time applies specifically to the time spent on the road, and there's a valid use case for keeping it that way: service times don't affect fuel / battery. So, this is not a bug.

But that leaves out a desired feature. Could there be a way to specify maximum full-route time inclusive of wait times when VRP'ing ?

This edge case is only coming up when I don't have any pre-defined time_window for each vehicle. If I apply a time_window, then the VRP solution factors in the service / setup time of each Job and ensures that the planned routes don't exceed the vehicle's time_window.

@jcoupey
Copy link
Collaborator

jcoupey commented Feb 15, 2024

Yeah historically we never bothered to track service times as they were always constant for a given assigned subset of jobs, so they had no contribution to the overall cost. Task times are not exactly really constant anymore since we introduced the notion of setup (the route ordering can reduce or increase the overall setup time).

Now in term of restriction, it could indeed make sense to have something like a max_task_time vehicle constraint (that would limit the total setup + service time) and a max_work_time that would be basically a limit on travel time + tasks time.

Note that the work time as mentioned above would not include waiting time, which we do not track internally as explained in other tickets.

@and7000
Copy link

and7000 commented Apr 26, 2024

Thats sounds great! I just came across the same issue @answerquest
@jcoupey May I suggest it would also be nice to control journey time of the vehicle as a constraint? Since it almost always relates to the drivers journey time (max_journey_time) which would includes all the time the driver worked in that route from start point to end point (which will include waiting time as well).
We normally have a limit on this driver’s working hours.

@jcoupey
Copy link
Collaborator

jcoupey commented Apr 29, 2024

The best way to monitor total journey time is to use a TW. As noted above, max_task_time and max_work_time would be straightforward additions, while max_journey_time would not.

Note that the work time as mentioned above would not include waiting time, which we do not track internally as explained in other tickets.

See for example #596 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants