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.