Drivers' working hours (Break and Rest rules)

The drivers' working hours are a set of regulations that define break times and driving/travel time limits for vehicle drivers. The purpose of drivers' working hours regulations is to improve road safety and ensure good working conditions of drivers.

To restrict the drivers' working hours via the API, you must specify the rules for every driver. Currently, each driver must have the same value specified, setting them differently will be available in a later release. If no driver object with a working hours relevant field is passed with the request, working hours will be unlimited.

Which restrictions apply

There may not be just a single regulation but many regulations that the driver has to abide by. For instance, one regulation may deal with working hours for all workers, and another regulation may deal with working hours for drivers of heavy vehicles only. Since drivers of heavy vehicles are also workers, both regulations apply to them.

We distinguish three types of time span to which a restriction may apply.

  • Driving time: includes the time behind the wheel.
  • Working time: includes driving time, service time at depot and customers, and idle time if lower than working time threshold.
  • Travel time: the entire time also including, break, idle time, and the daily rest.

What are Break and Rest rules

Working hours provisions impose limits on driving, working and travel times and enforce breaks after a certain time of each type is accumulated. But there is not just one type of break. The longer the time horizon of a route is, the more provisions must be respected and the more types of break need to be distinguished. For a time horizon of a week, also daily rests need to be scheduled.

  • For a time horizon of a day, the relevant rules are firstly a mandatory break, typically of 30-45 minutes, after certain driving and/or working time. And secondly, total allowed driving and/or working time.
  • For a time horizon of more than a day, in addition to the breaks, daily rests, typically of 9-11 hours, must also be scheduled. The maximum driving and/or travel time between two daily rests are limited.

In both cases, the allowed driving/working time between two breaks, or driving/travel time between two daily rests can be configured, as well as the minimum duration that would qualify as a break/daily rest. The API also offers preset values for all relevant fields based on European and American official regulations. Only one preset value is allowed, but the values given by a preset can be overwritten by providing more restrictive values in the corresponding fields.

Example of rules for a route with single day horizon:

"breakRule": {
    "breakTime": 2700,
    "maximumDrivingTimeBetweenBreaks": 16200
},
"dailyRestRule":{
    "dailyRestTime": 39600,
}
"maximumDrivingTime": 32400,
"maximumTravelTime": 46800

Which is equivalent to using the preset value EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY:

"workingHoursPreset": "EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY"

In case that both driving time and working time regulation must be considered, the preset field can be used in addition to custom fields to specify both rules. Mind that if the two rules have for example different break times specified only the most restrictive, in this case the longer break time, will be considered and the other value would be ignored. The following example of overwriting a preset shows how to set both driving and working time rules for a single day plan based on EU regulations.

"breakRule": {
    "breakTime": 1800,
    "maximumWorkingTimeBetweenBreaks": 21600,
    "workingTimeThreshold": 900
},
"dailyRestRule": {
    "dailyRestTime": 39600,
}
"maximumTravelTime": 32400,
"workingHoursPreset": "EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY"

In this example, break time and maximum travel time are given both by the preset and the custom fields, which represent the working hours regulation. The break time value would then be taken from the preset to be 2700 (45 minutes), and the maximum travel time would be taken from EU working time regulation specified in field "maximumTravelTime" which is 32400 (9.5 hours).

When is a Daily Rest possible in multi-day planning

If the time horizon of every route may span multiple days, it is necessary to understand what we call rest positions. This type offers two options to choose from:

  • BETWEEN_TRIPS: A daily rest is scheduled only between consecutive trips. Choose this option if a driver may take more than one trip per day and daily rests should only take place at depots.
  • ANYWHERE: A daily rest is scheduled anytime and anywhere necessary, even within a trip and even en route between two stops. Choose this option if there are trips that span more than a day.

Good to know

  • When using BETWEEN_TRIPS option while specifying an input route where the drivers' working hours cannot be respected given only between trip positions, daily rests will also be planned at other positions (during a trip) and marked with a REST_POSITION violation.
  • Weekly EU and US rest rules are currently not considered by the optimization therefore the total allowed driving and travel time is not limited by the presets. Please specify the total allowed driving and travel time in the request if the maximum travel/driving time between weekly rests should not be exceeded.

Example of rules for a route with multi-day horizon:

"breakRule": {
    "breakTime": 2700,
    "maximumDrivingTimeBetweenBreaks": 16200
},
"dailyRestRule": {
    "dailyRestTime": 39600,
    "maximumTravelTimeBetweenDailyRests": 46800,
    "maximumDrivingTimeBetweenDailyRests": 32400,
    "dailyRestPosition": "BETWEEN_TRIPS"
}

Already conducted work of the driver

A driver might already have some accumulated driving/working hours before the start of the route. In this case, the information on already conducted work is provided by the Work Logbook for each driver. These values will be taken into account when scheduling breaks and daily rests according to the break and daily rest rules. The conducted work of the driver might be reset if driver had time to rest before start of the route. In other words, if the difference of the start time of the route and the lastTimeTheDriverWorked is more than the given daily rest time.

Naturally, accumulated working and travel time are greater than or equal to the corresponding accumulated driving time. In the same way, the driving time since the last daily rest is always greater than or equal to the corresponding accumulated time since the last break. Therefore for example, if accumulatedDrivingTimeSinceLastBreak is given but not the accumulatedDrivingTimeSinceLastDailyRest the latter is assumed to be equal to the former.

"workLogbook":{
    "lastTimeTheDriverWorked": "2020-01-31T20:00:00",
    "accumulatedDrivingTimeSinceLastBreak": 14400,
    "accumulatedDrivingTimeSinceLastDailyRest": 27000
}

Scheduled Breaks and Daily Rests in the response

Breaks and daily rests are represented by route events that have the event type BREAK and DAILY_REST respectively.

Example of a scheduled break:

"routes":[
    {
        "vehicleId": "Vehicle0",
        "stops":[
            {
            "locationId": "Customer2",
            "tripId": "96bff14b-bd06-4ca2-940c-bbf566f930ff",
            "reportForWayToStop": {
                "distance": 2205,
                "drivingTime": 300,
                "waitingTime": 0,
                "breakTime": 2700,
                "restTime": 0
            },
            "eventsOnWayToStop": [
                {
                    "type": "DRIVING",
                    "startTime": "2016-12-06T10:12:20.0000000+00:00",
                    "duration": 280
                },
                {
                    "type": "BREAK",
                    "startTime": "2016-12-06T10:17:00.0000000+00:00",
                    "duration": 2700
                },
                {
                    "type": "DRIVING",
                    "startTime": "2016-12-06T11:02:00.0000000+00:00",
                    "duration": 20
                }
            ]
            }
        ]
    }
]


Available presets

Preset: Description
EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY:
  • Based on Regulation (EC) 561/2006 of the European Parliament and of the Council.
  • Break time: 45 minutes
  • Maximum driving time between breaks: 4.5 hours
  • Maximum driving time: 9 hours
  • Maximum travel time: 13 hours
  • Daily rest time: 11 hours
EU_DRIVING_TIME_REGULATION_FOR_LONG_SINGLE_DAY:
  • As an exception to EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY, "Maximum driving time" may be extended to 10 hours twice a week, and "Daily rest time" reduced to 9 hours.
  • Break time: 45 minutes
  • Maximum driving time between breaks: 4.5 hours
  • Maximum driving time: 10 hours
  • Maximum travel time: 15 hours
  • Daily rest time: 9 hours
EU_WORKING_TIME_DIRECTIVE_FOR_SINGLE_DAY:
  • Based on Directive 2002/15/EC of the European Parliament and of the Council "on the organization of the working time of persons performing mobile road transport activities".
  • Break time: 30 minutes
  • Maximum working time between breaks: 6 hours
  • Working time threshold: 15 minutes
  • Maximum travel time: 9.5 hours
  • Daily rest time: 11 hours
EU_WORKING_TIME_DIRECTIVES_FOR_LONG_SINGLE_DAY:
  • Based on Directive 2003/88/EC and 2002/15/EC if total working hours is more than 9 hours, a break must be at least 45 minutes long.
  • Break time: 45 minutes
  • Maximum working time between breaks: 6 hours
  • Working time threshold: 15 minutes
  • Maximum travel time: 10.75 hours
  • Daily rest time: 11 hours
EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_DAYS:
  • Based on Regulation (EC) 561/2006 of the European Parliament and of the Council.
  • Break time: 45 minutes
  • Maximum driving time between breaks: 4.5 hours
  • Daily rest time: 11 hours
  • Maximum driving time between daily rests: 9 hours
  • Maximum travel time between daily rests: 13 hours
  • Daily rest position: anywhere
EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_SINGLE_DAYS:
  • In contrast to EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_DAYS, daily rests may not be scheduled within trips.
  • All restrictions of EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_DAYS
  • Daily rest position: between trips
EU_DRIVING_TIME_REGULATION_FOR_TEAM_AND_MULTIPLE_DAYS:
  • When two drivers form a team, they can take turns. In contrast to EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_DAYS, no breaks are scheduled and the daily rest time limits are raised.
  • Daily rest time: 9 hours
  • Maximum driving time between daily rests: 18 hours
  • Maximum travel time between daily rests: 21 hours
  • Daily rest position: anywhere
US_HOURS_OF_SERVICE_REGULATIONS_FOR_SINGLE_DAY:
  • Based on Hours of Service (HOS) of Drivers as issued by the Federal Motor Carrier Safety Administration (FMCSA).
  • Break time: 30 minutes
  • Maximum driving time between breaks: 8 hours
  • Maximum driving time: 11 hours
  • Maximum travel time: 14 hours
  • Daily rest time: 10 hours
US_HOURS_OF_SERVICE_REGULATIONS_FOR_SHORT_HAUL_AND_SINGLE_DAY:
  • Based on Hours of Service (HOS) of Drivers as issued by the Federal Motor Carrier Safety Administration (FMCSA). It is assumed that the short-haul exception does apply so breaks are not scheduled.
  • Maximum driving time: 11 hours
  • Maximum travel time: 14 hours
  • Daily rest time: 10 hours
US_HOURS_OF_SERVICE_REGULATIONS_FOR_MULTIPLE_DAYS:
  • Based on Hours of Service (HOS) of Drivers as issued by the Federal Motor Carrier Safety Administration (FMCSA).
  • Break time: 30 minutes
  • Maximum driving time between breaks: 8 hours
  • Daily rest time: 10 hours
  • Maximum driving time between daily rests: 11 hours
  • Maximum travel time between daily rests: 14 hours
  • Daily rest position: anywhere
US_HOURS_OF_SERVICE_REGULATIONS_FOR_MULTIPLE_SINGLE_DAYS:
  • In contrast to US_HOURS_OF_SERVICE_REGULATIONS_FOR_MULTIPLE_DAYS, daily rests may not be scheduled within trips.
  • All restrictions of US_HOURS_OF_SERVICE_REGULATIONS_FOR_MULTIPLE_DAYS
  • Daily rest position: between trips
US_HOURS_OF_SERVICE_REGULATIONS_FOR_SHORT_HAUL_AND_MULTIPLE_SINGLE_DAYS:
  • Based on Hours of Service (HOS) of Drivers as issued by the Federal Motor Carrier Safety Administration (FMCSA).
  • Daily rest time: 10 hours
  • Maximum driving time between daily rests: 11 hours
  • Maximum travel time between daily rests: 14 hours
  • Daily rest position: between trips