Drivers' Working Hours
Characteristic
Short description
The PTV xTour and the PTV xRoute service are able to respect provisions on working hours when planning tours or calculating routes. If this feature is used, the PTV service considers these provisions by scheduling break and rest periods and by respecting limits on driving times and travel times.
Use
The following technical concept explains how to make the PTV xTour/xRoute service regard the working hours. It describes which regulations are supported to which degree, and how to interpret the response.
Detailed Consideration
There are currently three different ways of specifying drivers' working hours. Before we go into the details of these approaches, we give a brief general introduction into this topic.
Regulations on Drivers' Working Hours
Regulations on drivers' working hours regulate the driving and/or working times of the drivers, that is, they tell when drivers are allowed to be at the wheel and when not. They may also have an impact on other working times such as time for loading and unloading. The motivation behind these regulations is to help prevent drivers' fatigue and thus foster road safety.
There may be not 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 vehiclesThe term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition. only. Since drivers of heavy vehicles The term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition. are also workers, both regulations apply to them. We call a regulation that only affects drivers of heavy vehicles a driving time regulation because its primary goal is to limit the driving time of the driver. We call a directive that affects all mobile workers working time directive because its primary goal is to limit the working time of workers.
Drivers of heavy vehicles must comply with different regulations depending on their operating area:
- In the European Union, they operate under the Regulation (EC) No. 561/2006.
- In the United States of America, they operate under the Hours of Service Regulations stated in 49 CFR 395.
Working hours provisions impose limits on driving times and travel times and enforce breaks after a certain driving time and/or after a certain travel time. But there is not just one type of break. The longer the time horizon of a tour is, the more provisions must be respected and the more different types of break need to be distinguished.
- For a time horizon of a day, the only relevant break is the "lunch break".
- For a time horizon of a week, also daily rests need to be scheduled.
- For a time horizon of several weeks, also weekly rests need to be scheduled.
Rest Positions: When not to Schedule a Daily Rest in Multi Day Planning
If the time horizon of every tour may span multiple days, it is necessary to understand what we call rest positions. This type offers three options to choose from:
- BETWEEN_ALL_TRIPS: A daily rest is scheduled between all consecutive trips. Choose this option if you want a daily rest to be scheduled after each trip (except for the last).
- BETWEEN_TRIPS: A daily rest is scheduled between consecutive trips only if necessary. Choose this option if a driver may take more than one trip per day and you want the algorithm to minimize the number of daily rests.
- 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.
Alternative Approaches: Fixed-setting or Configurable Working Hours
There are three ways of specifying drivers' working hours:
- Using the type WorkingHours: It is a fixed-setting approach in the sense that a pre-configured set of rules can be switched on or off. The configurations themselves cannot be changed. Although still a valid approach, we consider it as deprecated.
- Using the type ConfigurableWorkingHours: Here, the users can configure the rules themselves. Use this approach if the third approach does not suffice.
- Using the type ConfigurableWorkingHoursPreset: This is the recommended approach. It is again a fixed-setting approach.
Working hours are tour restrictions. They can be set globally but not individually for every driver or vehicle.
The abstract type WorkingHours has two extensions, SingleDayWorkingHours and MultiDayWorkingHours. If the time horizon of every tour is supposed to be one day, choose SingleDayWorkingHours. This will limit the maximum driving time per driver and the maximum travel time per driver appropriately in order to respect the maximum allowed travel and driving time between daily rests. Your planning horizon may be longer than a day, and tours may be planned on different days, but no individual tour will span more than a day.
If you choose SingleDayWorkingHours, no daily rests will be enforced, however violations will be reported if the maximum driving time per driver, or the maximum travel time per driver, is exceeded. If provided, the WorkLogbookSummary will be considered.
In addition, lunch breaks will be scheduled optimally, either en route between two stops or at a site. A break may be scheduled before it becomes due if it is beneficial. This may be the case if the driver would have to wait for an opening interval to open otherwise.
If the time horizon of every tour may span multiple days, choose MultiDayWorkingHours. Lunch breaks and daily rests will be scheduled if necessary. However this will not limit the maximum driving time per driver or the maximum travel time per driver. If you want your tours not to span more than 6 days for instance (see weekly rest rules of the EU regulation), please set the TourRestrictions (maximumDrivingTimePerTour and maximumTravelTimePerTour) accordingly.
Weekly rests are not scheduled and weekly or even bi-weekly rules are not considered.
Daily rests may be prolonged if beneficial. Just like breaks, daily rests are scheduled optimally.
The field dailyRestPositions offers three options to choose from (see above). For various reasons, the planner (and the driver) may not want a daily rest to be scheduled within a trip.
For xTour, BETWEEN_ALL_TRIPS and BETWEEN_TRIPS options ensure that daily rests are only scheduled between trips and at a depot.
For xRoute, these options are not relevant as the PTV xRoute module only considers a single trip.
As mentioned above, we distinguish a driving time regulation from a working time directive. Those driving time regulations are detailled in the Driving Time Regulation technical concept page. In addition to this regulation, mobile workers should comply with the working time directive. For now, only working time directive EU_2002_15_EC is supported. Working time directive are detailled in the Working Time Directive technical concept page. The combination of both regulations is not supported.
The driving time regulation can only be used with non multiple travel times distance matrices and the working time directive can only be used with multiple travel times distance matrices!
Only use a multiple travel times distance matrix if needed. The results differ significantly to the ones calculated with a normal distance matrix as the optimization problem gets much more difficult to solve!
Configurable working hours can be set per driver (in case of xTour) or as tour restriction (in case of xRoute). Two rules and two limits can be configured:
-
A break rule means a rule when a break has to be scheduled. A break takes a rather short period of time. It can be configured to be between 15 and 90 minutes.
A break can become due in two ways:
- When the driver is at the wheel, he/she accumulates driving time. This time is reset after a break. When a certain limiting driving time has been accumulated by the driver, he/she is no longer allowed to drive unless he/she takes a break.
- When the driver is at the wheel or performs service (think of loading/unloading), he/she accumulates working time. This time is reset after a break. When a certain limiting working time has been accumulated by the driver, he/she is no longer allowed to work unless he/she takes a break. Waiting time may count as working time, too, if it is short, that is, shorter than a certain threshold.
-
A daily rest rule means a rule when a rest break has to be scheduled. A daily rest takes a longer period of time. It can be configured to be between 3 and 22 hours.
A daily rest can become due in two ways:
- When the driver is at the wheel, he/she accumulates driving time. This time is reset after a daily rest. When a certain limiting driving time has been accumulated by the driver, he/she is no longer allowed to drive unless he/she takes a daily rest.
- When the driver is at the wheel, performs service (think of loading/unloading) or simply waits, he/she accumulates travel time. This time is reset after a daly rest. When a certain limiting travel time has been accumulated by the driver, he/she is no longer allowed to work unless he/she takes a daily rest.
- Maximum driving time means the total allowed driving time for the driver (currently, xTour only).
- Maximum travel time means the total allowed travel time for the driver (currently, xTour only).
xTour:
- Currently, the configurable working hours need to be the same for all drivers. Setting them differently will be available in a later release.
- Currently, the configurable working hours are not supported in connection with a multiple travel times dima (time-dependent driving times).
If a driver has already accumulated relevant times, specify these times in the driver's configurable working hours logbook summary.
xTour: There is a subtle difference between the maximum driving/travel time of the driver's configurable working hours and the maximum driving/travel time of the vehicle. The difference is that the accumulated driving/travel time since last daily rest stated in the configurable working hours logbook summary counts towards the maximum driving/travel time of the driver's configurable working hours if the time between the last time that the driver worked and the tour start is shorter than the daily rest time. It never counts towards the maximum driving time of the vehicle.
xRoute: Currently, the fields maximum driving time and maximum travel time are not supported by xRoute and must not be used. Please use maximum driving time per tour and maximum travel time per tour instead.
There are a dozen pre-configured presets like EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY or EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_SINGLE_DAYS to help set the configurable working hours in a way that they are in line with the official regulations.
There is a dedicated technical concept page that explains every preset in more detail.
Either choose a preset or configure the configurable working hours on your own. You cannot do both.
xTour:
- Currently, the configurable working hours preset needs to be the same for all drivers. Setting them differently will be available in a later release.
- Currently, a configurable working hours preset is not supported in connection with a multiple travel times dima (time-dependent driving times).
Response and Violation
All tours planned by the PTV xTour and the PTV xRoute services respect the daily rest positions. However, the PTV xRoute service does not support BETWEEN_ALL_TRIPS and BETWEEN_TRIPS options. But if there is a tour specified in the input plan where the drivers' working hours cannot be respected given only these positions, daily breaks are also planned at other positions and marked with a PositionViolation. Positions of breaks and daily rests in a response tour are reported in the tour events of the corresponding tour report. Breaks and daily rests are represented by tour events that have the tour event type BREAK and DAILY_REST respectively. A tour event is split up into multiple consecutive tour events if the tour event types or the violation types change during this period.
Example 1
- We are in the EU and the planning horizon spans a single day.
- You specify EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY (or alternatively SingleDayWorkingHours with the driving time regulation EU_EC_561_2006).
- The cumulative driving time from the tour start up to a specific location is 4 hours.
- The driving time to the next location in the tour is 1 hour.
- This would exceed the permissible 4.5 hours of driving without break.
- Therefore a driving tour event of 30 minutes is generated followed by a 45 minutes break tour event, followed by another driving tour event of 30 minutes.
Example 2
- We are in the EU and the planning horizon spans a single day.
- You specify EU_DRIVING_TIME_REGULATION_FOR_SINGLE_DAY (or alternatively SingleDayWorkingHours with the driving time regulation EU_EC_561_2006).
- The cumulative driving time from the tour start up to a specific location is less than 4.5 hours.
- At this specific location you have a waiting time of one hour due to opening intervals.
- The first 45 minutes of this one hour period is flagged as BREAK in addition to WAITING.
- The cumulative driving time from this location to the end of the tour is also less than 4.5 hours.
- No additional breaks are needed to respect the drivers' working hours.
- In this example scheduling the break during the waiting time saves travel time compared to a 45-minute break en route between two stops.
Example 3
- We are in the EU and the planning horizon spans a (five-day) workweek.
- You want to plan a tour where each trip fits in a day and daily rests are scheduled between trips when necessary.
- You specify EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_SINGLE_DAYS (or alternatively MultiDayWorkingHours with the driving time regulation EU_EC_561_2006 and the daily rest positions setting BETWEEN_TRIPS).
- The planning consists of deliveries from a depot to customers. Because of maximum quantity scenarios of the vehicle it is necessary to pick up orders from the depot multiple times which creates multiple trips.
- A daily rest is scheduled at the depot location directly after each trip, except the last one.
Example 4
- We are in the EU and the planning horizon spans a (five-day) workweek.
- You want to plan a tour with trips that might span more than a day. Daily rests may be scheduled also within trips.
- You specify EU_DRIVING_TIME_REGULATION_FOR_MULTIPLE_DAYS (or alternatively MultiDayWorkingHours with the driving time regulation EU_EC_561_2006 and the daily rest positions setting ANYWHERE).
- The planning consists of deliveries from a depot to customers. Some orders are far away from the depot so the trip in which they are served contains one or multiple daily rests.
- Daily rests may be scheduled anywhere and anytime even en route between two stops.
Example 5
- We are in the EU and the planning horizon spans a single day.
- You want to plan a tour with trips that consider multiple travel times.
- You specify EU_WORKING_TIME_DIRECTIVES_FOR_SINGLE_DAY (or alternatively SingleDayWorkingHours with the working time directive EU_2002_15_EC).
- The cumulative working time from the tour start up to a specific location is 5 hours given a specified start time.
- The driving time to the next location in the tour is 2 hours.
- This would exceed the permissible 6 hours of working without break.
- Therefore a 30 minutes break tour event is generated after the first hour of driving, followed by another driving tour event of 1 hour.
Example 6
- We are in the US and the planning horizon spans a single day.
- You want to plan a tour in the US and you know that the short-haul exception applies.
- You specify US_HOURS_OF_SERVICE_REGULATIONS_FOR_SHORT_HAUL_AND_SINGLE_DAY (no alternative).
- Due to the exception, a break will not be scheduled.
- However, the preset will make sure that the total driving time does not exceed 11 hours and that the tour is not longer than 14 hours.
Example 7
- We are in the US and the planning horizon spans a (five-day) workweek.
- You want to plan a tour with trips that might span more than a day. Daily rests may be scheduled also within trips.
- You specify US_DRIVING_TIME_REGULATIONS_FOR_MULTIPLE_DAYS (or alternatively MultiDayWorkingHours with the driving time regulation US_FMCSA_395_2020 and the daily rest positions setting ANYWHERE).
- The planning consists of deliveries from a depot to customers. Some orders are far away from the depot so the trip in which they are served contains one or multiple daily rests.
- Daily rests may be scheduled anywhere and anytime even en route between two stops.
Related Topics
Technical Concept | Tours and Trips |
Technical Concept | Driving Time Regulation |
Technical Concept | Working Time Directive |
Technical Concept | Configurable Working Hours Preset |
Integration Sample | Planning a Tour using a Distance Matrix |