Driving time dependent break scheduling - beta release

We are happy to announce that we recently released a new feature you can use to schedule driving time dependent breaks. For example, if you want your drivers to adhere to EU driving time law, you would specify it like this:

{
      "vehicle_id": "my_vehicle",
      "start_address": {
         "location_id": "1",
         "lat": 50.123,
         "lon": -4.0123
      },
      "return_to_depot": true,
      "earliest_start": 25200,
      "break": {
         "max_driving_time": 16200,
         "duration": 2700,
         "possible_split": [900, 1800]
      }
}

This means that your driver needs to have a break after 4.5 hours driving time at latest. Break duration must be 45min. However, the driver is allowed to split the break into two smaller ones of 15min and 30min.
If your problem is of dynamic nature then you can also specify an initial driving time for your driver like this

{
      "vehicle_id": "my_vehicle",
      "start_address": {
         "location_id": "1",
         "lat": 50.123,
         "lon": -4.0123
      },
      "return_to_depot": true,
      "earliest_start": 25200,
      "break": {
         "initial_driving_time": 10800,
         "max_driving_time": 16200,
         "duration": 1800,
      }
}

which means that your driver has already been 3h on the way and has already taken a rest of 15min so he is only allowed to drive 1.5h before he needs to have a rest of 30min.

Please note that this feature is still beta.

1 Like

@stefan are there any plans to offer this feature in jsprit as well?

This may also relate to: Driver Break After Certain Amount of Driving Time and https://github.com/graphhopper/jsprit/issues/211

Hello Harry, no, there are no plans yet. We are about to improve activity scheduling a lot. It will be available soon. Let us do this first, and then we can think about scheduling arbitrary activities such as drive time dependent breaks.

Currently only the following is documented:

"break" : {
        "earliest" : 10000,
        "latest" : 13600,
        "duration" : 1800
    }

Should we declare this new feature as public and document it too?

1 Like

Hi all,

I would like to know why this ‘break’ property can only use in ‘completion_time’ objective.
Why cannot use in other objectives?

We only made it availble for “completion_time” since other obj. functions like min “transport_time” ignore waiting times at customer locations. Therefore, breaks can be scheduled such that drivers need to wait ages to make their rest. “completion_time” avoids this. However, we are working at making this accessible for all types of obj. functions equally.

Best,
Stefan

1 Like

Thanks @stefan
Hope it is available for all objectives soon.

Hi Stefan

Is there any further thought providing this in jsprit. It is a major feature and benefit.

regards
Grant

1 Like

hey @stefan

Any chance of this in jsprit. It really has become critical to so many routing problems with the increased focus on chain of responsibility and duty of care.

kind regards
Grant

@stefan is this feature working correctly on graphopper