GraphHopper.com | Forum | GitHub | Maps | Blog

Ban on driving on sundays


#1

Hi,
I am planning routes for trucks with various shipments. Is there a simple way to implement a driving ban on Sundays? For example:
A delivery of a shipment is scheduled on Monday, 1 am. The drive from the depot takes 3h. As the truck is not allowed to drive on Sundays, the desired solution is, that the truck starts on Saturday, 10pm, drives for 2h, rests for 24h, and starts again on Monday to complete the drive and then deliver the shipment.

One solution I have thought up, is to create a service with high priority that lasts the whole Sunday to model the driving ban as a rest-service. The problem is the unknown location for this. As the starting time is also unknown (depends on the duration of the drive), i cannot simply use breaks.

Do you have any suggestions how to model this?
Thanks in advance

Greetings
Rebekka


#2

We currently suggest to model different days with different vehicles:

And then you can restrict certain days with allowed_vehicles and disallowed_vehicles


#3

Thanks for your answer. But I don’t think that a solution of my problem is possible with your suggestion. I want to be able to plan a route such that the vehicle starts on saturday evening, pauses the whole sunday and continues on monday. I don’t understand how that should be possible with different vehicles, as there is only one route, that is supposed to last from saturday to sunday.
Could you go more into detail, how to model this problem?
Thanks