Legal aspects in road transport optimization in Europe

Road freight transportation is subject to several legal requirements having direct impact on the practical applicability of routes and schedules. The vast majority of vehicle routing literature, so far, has largely focused on physical constraints such as capacity limits, or customer requirements such as time windows for pickups and deliveries. This paper studies legal requirements for long-distance haulage in the European Union, identi ﬁ es some major gaps in the current state-of-the-art in vehicle routing, presents approaches for overcoming this gap, and analyzes the impact of the legal requirements studied.


Introduction
In the European Union, as in other parts of the world, road freight carriers must comply with several legal requirements. Some of these legal requirements, e.g., speed limits and access restrictions for certain types of vehicles and roads, can be easily considered in approaches for road transport optimization, because these approaches are usually based on distance matrices which can be precomputed taking into account the various requirements of the individual roads. Other legal requirements, in particular, those arising from social legislation are more complex and difficult to deal with in approaches for road transport optimization and have so far seen little coverage in the scientific literature on vehicle routing.
This paper contributes to research on transport optimization in several ways. First of all, it reviews social legislation for road freight transport in the European Union and identifies major gaps in the state-of-the-art in vehicle routing. These gaps can lead to practically infeasible solutions and solutions having unnecessarily high costs. Secondly, an approach is presented which can be used by transport companies, drivers, and enforcement agencies to validate compliance of planned or executed schedules. Furthermore, an approach for generating feasible schedules is presented and it is shown how compensation schemes compliant with social legislation can be considered when optimizing routes and schedules. Lastly, the impact of social legislation on feasibility, route length, costs, and road safety is experimentally analyzed. This impact analysis should be of particular interest to policy makers and other stakeholders, in particular, as relevant regulations are currently under review and may be revised in the near future (European Commission, 2017b).

Social legislation
In the European Union, several legal frameworks exist aiming at improving road safety and working conditions of drivers as well as ensuring fair competition between road transport operators throughout the European single market. Among these is Regulation (EC) No 561/2006(European Union, 2006 which entered into force in 2007. With the introduction of this regulation, transport companies can be made liable for infringements committed by the drivers and, thus, they are legally responsible if plans and schedules are generated in such a way that drivers do not have enough time for compulsory break and rest periods. According to Regulation (EC) No 561/2006, a driver must not drive for more than 4 1 2 h without taking a break of at least 45 min duration, during which the driver may not carry out any work. The break can also be taken in two parts, whereas the first part must have a duration of at least 15 min and the second part must have a duration of at least 30 min. After a total of 9 h of driving, a driver must take a rest period of 11 h duration, during which the driver may freely dispose of her or his time. Similar to break periods, rest periods can also be taken in two parts, whereas the first part must have a duration of at least three hours and the second part must have a duration of at least nine hours. Thus, if a rest period is taken in two parts, a total rest of 12 h is required before the driver may continue to drive again. Three times a week, the regular duration of a rest period may be reduced to at least 9 h, and twice a week, the total driving time between rests may be extended to 10 h. In any case, the required amount of rest must have been taken within 24 h after the end of the previous rest period. The accumulated amount of driving and the accumulated amount of working within a week are restricted to at most 56 and 60 h and a weekly rest period of at least 45 h must be taken after at most 144 h after the end of the previous weekly rest period. Alternatively, a reduced weekly rest period of 24 h may be taken if the reduction is compensated by an equivalent period of rest taken in a subsequent week. The regulation constrains the total accumulated driving time during any two consecutive calendar weeks to at most 90 h and in any period of four months, the average working time during a calendar week must not exceed 48 h.
In order not to incentivize drivers to violate above mentioned rules on driving hours, Regulation (EC) No 561/2006 demands that transport companies do not give drivers any payment related to distances traveled, not even in the form of a bonus or wage supplement.
Besides Regulation (EC) No 561/2006, which is directly applicable in all member states of the European Union, transport companies must also comply with national implementations of Directive 2002/15/EC (European Union, 2002). The directive is also called "Road Transport Working Time Directive" and outlines additional provisions for working time, breaks, and night work. The directive is not directly applicable, however, the member states of the European Union have adopted additional national regulations imposing comparable constraints, with some variation in the working time limits and the definition of night time (see Goudswaard et al., 2006). These regulations require that a truck driver does not work for more than six hours without a break of at least 30 min. If the total amount of work between two rest periods exceeds 9 h, the amount of break time required is increased to at least 45 min. The required break time can be taken in several periods of at least 15 min each. Furthermore, the directive restricts the total amount of work within any period of 24 h if night work is performed. Night work in this context means any work performed during night time which is defined by national law. As shown in Table 1, the definition of night time and the daily working time limit varies across the European Union.
It must be noted, that in some countries, additional regulations exist prohibiting road freight transport during night. In Austria, there is a general night time driving ban for heavy goods vehicles between 22.00 h and 5.00 h (International Road Transport Union, 2016a). In Germany, night driving restrictions exist for specific roads (International Road Transport Union, 2016b), and in the United Kingdom there is a night time driving ban in the Greater London area from 21.00 h to 7.00 h (International Road Transport Union, 2017a). Table 1 Night time definitions and daily working time limits (Goudswaard et al., 2006 3. Discussion of the regulatory impact According to Broughton et al. (2015), 62.9 percent of the truck drivers in the European Union never work during nights and, among the remaining truck drivers, less than half of them regularly perform night work. It must be noted that the EU Labor Force Survey (European Commission, 2017a), on which the study by Broughton et al. (2015) is based, does not provide a definition of night work, so that the number of drivers who do not work between midnight and 4.00 h, i.e. the shortest night time definition of the night work provisions, might actually be even higher.
Some logistics operations systematically rely on night driving. For example, in the courier, express and parcel (CEP) industry, night driving is used to move shipments between major cities. Similarly, parts and components which are produced during the day at one facility are sometimes transported by night so that they are available at another facility before the morning shift starts there. Such operations are usually planned on a strategical or tactical level before drivers are assigned to specific tasks. Based on normative work plans considering the total working time allowed, the timing of loading and unloading operations is usually synchronized with the trip requirements such that no significant waiting times occur. When a driver is eventually assigned to such a night shift, it is usually assumed that the driver is fully rested. In such cases, the impact of the night work provision mostly depends on the distance between hubs and facilities and whether the night shifts may legally include 8 or 10 h of working time. Similarly, for day time operations, transportation between hubs and facilities is often planned based on normative work plans and loading and unloading operations are usually synchronized with the trip requirements. Thus, the difference between day and night time operations is minor in countries with a 10 h working time limit for night workers and the non-driving work does not exceed one hour per night shift.
Night driving is also sometimes considered for long-distance trips in line-haul transportation. The fastest way of completing a long-distance trip is to follow a normative driving pattern comprised of driving periods with the maximal allowed duration, a 45 min break between the driving periods, and a rest period of minimal duration when required. Fig. 1 illustrates such normative driving patterns starting at different times of the day. The lines show the duration required as a function of the driving time for normative schedules considering different rule sets. The solid black line illustrates the schedule of a driver who does not work during night time and starts driving at 7.00 h in the morning of the first day. The dashed black line illustrates the schedule of a driver starting at 7.00 h in the morning of the first day without considering the night work provision. As we can see, a driver ignoring the night work provisions could significantly reduce the trip duration by taking a rest period of minimal duration whenever the daily driving time limit of Regulation (EC) No 561/2006 is reached. When considering the night work provisions, the driver has to extend the rest period until the morning of the next day. The gray lines illustrate the schedule of a driver starting at midnight with a daily working time limit for night workers of 8 h (dashed gray line) and 10 h (solid gray line). For countries with a daily working time limit of 10 h for night workers, the driving pattern is very similar to the driving pattern of a driver who does not work at night (solid black line). As we can see, night drivers in countries with a daily working time limit of 8 h have a productivity loss of at least one hour on every day  Goel Transportation Research Part E 114 (2018) 144-162 compared to drivers who do not work during night and every additional hour of other work would further reduce the productivity. We can conclude that the night work provisions have a significant impact on driving patterns for long-distance trips, whether the driver is conducting night work or not. Without these provisions, the productivity of the driver could be significantly increased. In countries with a daily working time limit of 8 h for night workers, long-distance trips are best conducted during day time. In countries with a daily working time limit of 10 h for night workers, a productivity loss could occur if more than one hour of other work has to be conducted by the driver in every shift. A major goal of Directive 2002/15/EC is to increase road safety. To better understand how the driving patterns shown in Fig. 1 impact road safety, we used the fatigue and risk index calculator available from Health and Safety Executive (2006). The risk index calculator is described in Spencer et al. (2006) and can be used to estimate the relative risk of the occurrence of an accident given a specific work schedule. The factors considered when calculating the risk indices include the accumulated fatigue associated with working over a period of several days, the effect of start time and length of the individual daily shifts, and the breaks taken within these shifts. The risk index calculator indicates that the driving pattern illustrated by the dashed black line has a 33 percent higher accident risk than the driving pattern illustrated by the solid black line. This higher risk can be seen as a result of the combination of shorter times for recovery and occasional night work. The major difference between the driving patterns shown by the solid black line and the solid gray line is a shift in the timing of the activities. According to the risk index calculator, this shift in the timing results in a 47 percent increase in accident risk. The smaller amount of driving time within any 24 h period, that is prevalent in the pattern illustrated by the dashed gray line, compensates the detrimental effect of night work to some extend with only a 26 percent higher accident risk compared to the solid black line. It has to be noted here, that for the driving patterns illustrated by the solid and dashed gray lines, the cumulative risk component grows approximately twice as fast than for the driving pattern illustrated by the solid black line. This means that for shorter trips, the difference between accident risks for night time and day time workers is less pronounced. We can conclude that for long-distance trips, the relative increase in accident risks for night workers can hardly be justified by a productivity gain for night workers. When night work is avoided, the directive clearly achieves its goal of increasing road safety for long-distance trips.
For transport operations where truck drivers have to conduct a mix of driving and other work and where drivers may have to wait because of opening hours of customers, assessing the impact of hours of service regulations can not be conducted based on normative driving patterns, because driver schedules could be very irregular and may change from day to day. If night work is performed, the amount of work within 24 h is limited to 8 or 10 h. If a driver does not work at night, however, the maximum amount of daily work is implicitly constrained by the maximum time span between subsequent rest periods, i.e. 13 h if a rest period of 11 h duration is taken or 15 h if a reduced rest period of only 9 h duration is taken. A driver can legally have at least two 6 h work periods and a 45 min break within this time span, and thus, can work significantly longer than a night worker. Thus, unless there are special reasons to conduct night work, e.g., due to requests requiring night time deliveries, day time operations can be expected to be more productive than operations involving night work.
Given that the majority of truck transport is conducted during day time (Broughton et al., 2015) and that night time provisions do not impose a major challenge for transport operations that can be based on normative driving patterns, the remainder of this paper will focus on transport operations where drivers do not work during the night and in which regular driving patterns can not be assumed. Thus, we assume that the timing of driving, work, break, and rest periods may differ on every day of operation depending on the requirements of the tasks assigned to the drivers.
Although, Regulation (EC) No 561/2006 requires that driver payments are not related to distances traveled, labor costs should anyhow be considered when optimizing road transport. In many organizations, regularly employed drivers have a fix number of working days and vacation days per year. Any day on which a driver is working, reduces the number of remaining working days, even if the actual amount of work on that day is very small. Similarly, external drivers can often only be hired on a daily base. A compensation scheme based on the number of working days of the drivers is in accordance with legal requirements and, thus, transport companies should try to minimize the number of working days while making the best possible utilization of the drivers on every working day.

State-of-the-art
Approaches for optimizing road freight transport are commonly based on the vehicle routing problem, i.e., the problem of determining a cost-minimal set of routes for a fleet of vehicles such that a set of given customers is visited and all operational constraints are satisfied. Given the maturity of research concerning the vehicle routing problem (see e.g. the book by Toth and Vigo (2014)), the last decade has seen an increasing interest in variants of the vehicle routing problem capturing important constraints arising in practical applications, see e.g. the surveys by Irnich et al. (2014) and Lahyani et al. (2015). An important class of practical constraints are those on drivers' working hours as imposed by government regulations and corporate agreements. One of the first works explicitly considering breaks and night rests within a vehicle routing context is presented by Savelsbergh and Sol (1998) who consider a compulsory 45 min lunch break between 11.00 h and 14.00 h and a night rest between any two working days. More recently, vehicle routing problems with break requirements have been studied in Beaudry et al. (2010), Wen et al. (2011), Parragh et al. (2012, Coelho et al. (2016).
For hours of service regulations in the United States algorithms for determining a feasible truck driver schedule are presented by Archetti and Savelsbergh (2009), Goel and Kok (2012b), and Goel (2014). Xu et al. (2003), Rancourt et al. (2013), and Goel and Vidal (2014) present heuristics for solving the vehicle routing and truck driver scheduling problem in the United States. Recently, Goel and Irnich (2017) and Tilk (2016) proposed first exact approaches capable of optimally solving the problem. Koç et al. (2016) study the interplay between hours of service regulations in the United States, costs, and carbon emissions due to engine idling.
The introduction of Regulation (EC) No 561/2006 triggered the development of several models and algorithms to facilitate the generation of compliant routes and schedules, in particular, the works by Goel (2009Goel ( , 2010, Drexl and Prescott-Gagnon (2010), Kok et al. (2010), as well as other heuristic approaches for combined vehicle routing and truck driver scheduling, e.g., by Zäpfel and Bögl (2008), Ceselli et al. (2009), Bartodziej et al. (2009, Derigs et al. (2011), Drexl et al. (2013), and Goel and Vidal (2014).Afirst exact approach capable of optimally solving the vehicle routing and truck driver scheduling problem subject to Regulation (EC) No 561/2006 is presented by Goel and Irnich (2017). The special case of generating team driver schedules complying with Regulation (EC) No 561/2006 is studied by Goel and Kok (2012a). The first papers focusing on modeling Regulation (EC) No 561/2006 did not consider the provisions outlined in the Road Transport Working Time Directive (Goel, 2009;Goel, 2010;Drexl and Prescott-Gagnon, 2010), and thus, were only useful for generating compliant schedules for self-employed drivers who were initially excluded from the scope of the directive. With the extension of the scope of the directive to also apply to self-employed drivers in 2009 and the subsequent adaptation of national law in the following years, the rules of the directive must be complied with by all drivers. Kok et al. (2010) consider provisions defined by the directive and claim to present the first planning method that respects "all restrictions on drivers' driving and working hours laid down in Regulation ( Approaches for determining a feasible truck driver schedule for hours of service regulations in Canada and Australia are studied by Goel and Rousseau (2012) and . These scheduling approaches have also been used within the hybrid genetic search presented by Goel and Vidal (2014) who also present a comparison of the impact of the hours of service regulations in the United States, Europe, Australia, and Canada.
In the vehicle routing literature, the predominant objectives are to minimize the number of vehicles used and the total distance traveled. While respective models may approximate transport costs reasonably well in many parts of the world, they do not fit to legal requirements in the European Union, because Regulation (EC) No 561/2006 dictates that driver wages must not be related to the distance traveled. If labor costs can be approximated by a linear function of the total route duration, the approaches by Savelsbergh (1992) and, more recently, by Tilk and Irnich (2017) can be used to minimize labor costs. For various hours of service regulations world wide, Goel (2012b,c,a) propose exact approaches for finding the schedule with minimal duration. Heuristic approaches considering duration-related labor costs within vehicle routing and scheduling problems are presented by Xu et al. (2003), Zäpfel and Bögl (2008), and Rancourt et al. (2013). Although minimizing route durations can help in minimizing labor costs, it must be noted that in many cases, transport companies and drivers would prefer work plans consisting of full working days over those consisting of multiple partial working days with only a few hours of work each. Approaches minimizing total route durations would not make a difference between these alternatives and may result in undesired work plans. To the best of the author's knowledge, approaches for minimizing the number of working days have not been considered in any of the papers on hours of service regulations.

Validating compliance of given work plans
This section shows how compliance with Regulation (EC) No 561/2006 and Directive 2002/15/EC can be validated for a given work plan. Before showing how we can determine whether a truck driver schedule complies with Regulation (EC) No 561/2006 and Directive 2002/15/EC, let us make some assumptions and observations concerning the regulations. In both rule sets, there are provisions imposing limits on driving and working time concerning periods of more than a week. When generating schedules on a rolling planning horizon, these weekly limits can be considered by parameter adjustments, i.e., by reducing the maximum weekly driving and working time to the remaining values considering the bi-weekly limit and the maximum time not violating the four month average. Therefore, in the remainder we will only consider planning horizons of at most six days, which is the maximum amount of time between two weekly rest periods as mandated by Regulation (EC) No 561/2006. We make a simplifying assumption that the planning horizon does not include midnight between Sunday to Monday. This simplification is without loss of generality, because the problem formulation can be modified as described in Goel (2011) for other planning horizons. Furthermore, there are weekend and Sunday driving bans in several countries (see overview of driving restrictions for goods transport by International Road Transport Union (2017b)), so that in these countries weekly planning horizons would not include Sunday at all.
According to Directive 2002/15/EC, a break must have a duration of either 30 min or 45 min, depending on the total amount of work, and can be taken in several parts of at least 15 min each. Like Kok et al. (2010) and Prescott-Gagnon et al. (2010), we simplify this constraint in the remainder, by using the same definition of breaks as in Regulation (EC) No 561/2006, i.e. a break is an off-duty period of at least 45 min or an off-duty period of at least 15 min followed by another off-duty period of at least 30 min. This simplification guarantees compliance with the directive, however, in rare cases compliant schedules may only exist if the possibility of taking several short breaks of 15 min each is exploited. As this paper focuses on planning problems in which drivers do not perform night work (compare Section 3), we assume that drivers take a rest period in every night.
Feasibility w.r.t. the weekly driving and working time limits can be easily verified by checking the accumulated values. For the other rules, compliance can be checked using so-called resource labels representing the driver's state at a particular point in time and resource extension functions (REFs) modifying these labels considering the activities a driver is performing (compare Irnich, 2008). For A. Goel Transportation Research Part E 114 (2018) 144-162 Regulation (EC) No 561/2006 respective resource labels and REFs have been presented by Goel and Irnich (2017), however, neither the constraints imposed by the Road Transport Working Time Directive, the possibilities of extending the daily driving time limit from nine to ten hours and reducing the duration of rest periods from eleven to nine hours, nor the constraints on driver payment schemes were considered. For the ease of reading, this section describes how compliance of a schedule can be validated under the assumption that the driver does not exploit the possibilities of extending the daily driving time limit from nine to ten hours and reducing the duration of rest periods from eleven to nine hours. In a later section, it is shown how the approach can be adapted so that these possibilities are also considered. Also the minimisation of labor costs w.r.t. the constraints on driver payment schemes will be added in a later section.
The main parameters constraining resource labels in the European Union are shown in Table 2. Relevant resource labels can be defined by time night drive|R drive|B work|B elapsed rest break where l time denotes the completion time of the schedule, l night denotes the time at which the next night begins, l drive|R denotes the total amount of driving since the last rest, l drive|B denotes the total amount of driving since the last break or rest, l work|B denotes the total amount of driving and other work since the last break or rest, l elapsed denotes the time elapsed since the end of the last rest period, l rest denotes the minimum duration of the next rest, i.e. t rest|2nd if the first part of a rest is already taken or t rest otherwise, and l break denotes the minimum duration of the next break, i.e. t break|2nd if the first part of a break is already taken or t break otherwise. Throughout a trip, a driver can drive or perform some other type of work, take a rest or a break (including the second part of a rest or break taken in two parts), take the first part of a rest or break, and wait idle without performing any work. For each type of driver activity, we can define a REF that updates the driver state, i.e. the resource label. Table 3 shows how the REFs are defined for a given parameter ∆ specifying the duration of the driver activity. In this table, and those which will follow, empty fields indicate that the resource value is not changed by the REF.
Each   Table 3 Resource extension functions. Goel Transportation Research Part E 114 (2018) 144-162 In the remainder of this paper, we will distinguish between rest periods taken on a day and rest periods covering a night. This definition ensures that a night rest is long enough to fully cover the next night. As we assume that a rest is taken every night, no label refers to a schedule ending in the middle of the night. Note that we do not consider rest periods covering more than one night, as these can be represented by two or more subsequent night rests. We can now state the following feasibility conditions. Given a label l representing a feasible driver state, rest elapsed rest day and ⩽− ll ∆ night time , i.e. if the duration of the rest is as long as required by the regulation, the required rest can be completed within 24 h after the end of the previous rest, and the rest does not reach into the next night, has not yet been taken, duration of the first part of the break is sufficiently long, the next rest can be completed within 24 h after the end of the previous rest, and the first part of the break does not reach into the next night, i.e. if the driving time limits are not exceeded, the next rest can be completed within 24 h after the end of the previous rest, and the driving period does not reach into the next night, Given an initial driver state and a sequence of driver activities with their durations, we can use above REFs and feasibility conditions to check whether the respective schedule complies with hours of service regulations. Table 4 shows the calculations for a truck driver in Belgium (i.e. with a night time definition of 20.00-6.00 h) and the sequence of driver activities shown in Fig. 2. For the ease of reading, a planning horizon starting at midnight is assumed and all time values represent the hours after the start of the first day. The initial label l 0 represents the driver characteristics at time 11.00 h, where 3 h have elapsed since the previous rest. In these three hours, the driver has worked for a total of 2 3 4 h of which 2 1 2 h have been driving time. Thus, the maximum possible driving time before the next break, as given by (1), is 2 h. Furthermore, the driver has already taken the first part of a break. As feasibility conditions are satisfied for of each REF applied when conducting the calculations, the sequence of driver activities shown in Fig. 2 Goel Transportation Research Part E 114 (2018) 144-162 feasible extension of the label l 0 .

Generating compliant schedules
Let us now consider a sequence of customer locations denoted by … nn n ,,, k 12 that shall be visited by a truck driver. At each location ∈… nn nn {,,, } k 12 some work of duration s n shall be conducted, e.g. loading or unloading. This work must begin within a given time window denoted by tt [ ,] nn min max . The (positive) driving time required for moving from a node n to a node m is denoted by d nm .
If we want to determine a feasible schedule for this sequence of customer locations, we have to ensure that the accumulated driving time between two consecutive customer locations n and m matches the total driving distance d nm between the locations, that the work at each location n has duration s n and begins within the respective time window tt [ ,] nn min max , and that the sequence of driver activities complies with hours of service regulations. Finding such a schedule, if not done cleverly, may require to evaluate a huge number of different sequences of driver activities and a huge number of reasonable activity durations. Even if time is discretized, enumeration of all reasonable activity sequences and durations is in general too time consuming for practical purposes. Luckily, it is possible to limit the number of activity sequences drastically and determine a unique parameter value ∆ for each of the REFs. As proposed by Goel (2010) all driving periods can be scheduled with the maximal possible durations and all off-duty periods can initially be scheduled with the minimum duration required by the regulation. Only if additional off-duty time is required because a customer is reached before the opening of the time window, the duration of the previous rest may be increased.
The scheduling approach presented in the following requires two new label attributes l trip and l latest , where l trip represents the remaining driving time until the next customer location is reached, and l latest represents the latest possible time at which the last rest has to be completed. With l latest we can determine whether and by how much the duration of the last rest can be extended without violating time window constraints or pushing work activities into the night. This might be useful if we want to avoid unnecessary waiting times when a customer is reached before the opening of the time window. but also ensures that the work at the customer location begins within the given time window, e.g., by increasing the duration of the last rest or adding waiting time. As shown in Table 5 Table 6. The completion time of the schedule is either set to the previous completion time plus the duration of the service or to the earliest start of the service plus its duration. The accumulated work since the last break is increased in the same way as by REF f work . The time elapsed since the last rest is either increased by the duration of the service or is set to the time difference between the earliest completion of the service and the latest completion time of the last rest.
The attribute l latest , which represents the latest completion time of the last rest, is updated as shown in Table 7. For REFs f dayrest and f nightrest , the value of l latest is set to the start of the night following the rest period. For REF f visit , the value of l latest either remains unchanged or is reduced to the difference between the latest start of the service on the current day and either the time elapsed since the last rest or the time span between the opening time of the time window and the latest completion time of the rest. For all other REFs, the latest possible time at which the last rest has to be completed either remains unchanged or is reduced to an amount guaranteeing that subsequent activities are not pushed into the next night.
Given a label l representing a feasible driver state, then.   • for all other REFs the feasibility conditions remain unchanged.
Let us consider a driver in Belgium (i.e. with a night time definition of 20.00-6.00 h) who has just completed service at a customer location n, and who is supposed to visit customer location m. The time window of customer n is [6,20], the time window of customer m is [34,40], and the driving time between the customers is = d 9 nm 1 2 . The label l n , representing the driver state after conducting the service at location n, contains the same attribute values as label l 0 in Table 4, i.e., the label represents the driver characteristics at time 11.00 h, where 3 h have elapsed since the previous rest, and in these three hours, the driver has worked for a total of 2 3 4 h of which 2 1 2 h have been driving time. The new attribute value for the remaining trip distance is zero because the label represents a driver at a customer location. The new attribute value for the latest completion time of the last rest is time 17.00 h because the three hours, which have elapsed since the last rest, must be taken before the start of the next night. The label can be updated as shown in Table 8. In the table, ∆ l represents the maximum driving time as given in (1). First, the driving time to reach customer m is initialized to d nm . Then, driving and break periods are added with the largest possible driving time and smallest possible break duration. Thereafter, a rest period is added using REF f 11 nightrest . Note that the parameter for the rest duration is 11, i.e., the minimum value required by the regulation, but the rest is actually scheduled with a duration of 12 h, because the rest must to cover the full night. After another driving period of three hours, customer location m is reached. The customer can be reached at time 33, however, this is one hour before the opening of the time window. The REF f m visit extends the duration of the last rest from 12 to 13 h, so that customer location m is reached within the time window and the time elapsed since the end of the last rest period remains minimal. Eventually, the driver activities generated are the same as shown in Fig. 2. With the new label attributes and REFs we can determine a feasible schedule for any given sequence of customer locations denoted by … nn n ,,, k 12 , if such a schedule exists. To do so, we generate a network consisting of the nodes and arcs shown in Fig. 3 for  Table 7 Determining the latest completion time of the last rest.   By expanding labels as described above, the total number of alternative labels generated by the scheduling approach may grow quickly.
Given two labels = llll l l l l l l l ( , ,,,,, , latest .Ifl 1 and l 2 denote resource labels at the same node and if ⪯ ll 12 , then l 1 dominates l 2 and the label l 2 can be discarded. By discarding dominated labels, the total number of alternative labels and the computational effort of the scheduling approach can be significantly reduced.
For detailed information regarding the mathematical properties on which the above mentioned approach is based, the reader is referred to the Appendix.

Extended daily driving times and reduced rests
In order to consider extended daily driving times and reduced rests, we need the additional parameters listed in Table 9 and additional resource attributes l extensions and l reductions indicating the number of times the driving time has been extended to above 9 h and the number of times the duration of a regular rest period has been reduced to below 11 h without having taken the first part of a rest before.
The resource attribute l extensions is incremented by f l ()     day . Similarly, the feasibility conditions for the other REFs are changed in such a way that either a regular or a reduced rest can be taken within 24 h after the previous rest.
The scheduling approach outlined in the previous section can be adapted to the case of extended daily driving times and reduced rests. For this, we have to create additional copies of the arcs associated to REF f drive . One copy is created for each alternative limit on the accumulated driving time resulting from the options of extending the daily driving time and/or reducing the rest duration. Furthermore, a copy of each arc associated to REF f dayrest or f nightrest is created and used with the duration of a reduced rest. Except for minor changes in the dominance criteria to consider the new resource attributes appropriately, no further changes are required.

Minimizing labor costs
The scheduling approach outlined above only focuses on finding a feasible schedule for a given route. The resulting schedules may thus have unnecessarily long waiting times between subsequent customer locations which may result in unnecessarily high schedule durations and labor costs. We will now describe how the scheduling approach can be modified in order to minimize labor costs. minimizing the duration required to perform a route may result in schedules in which a short period of time is worked just before the night on the first day and/or just after the night before the last day. We deem it to be more realistic that driver wages are related to the number of days a driver is employed to perform a route. Thus, independently of the actual amount of work performed on a particular day, we assume that the driver is paid for the full day. When optimizing routes and schedules a transport company would thus seek to make the best use of each paid day of work.
In order to determine the number of days required for a particular resource label, we can introduce a new resource attribute l begin , representing the day on which the first work activity of the driver is conducted. In the beginning of the scheduling approach, different resource labels are generated for each day of the planning horizon at which the schedule may begin. After initialization, the resource attribute is not changed by any of the REFs. For any resource label l, the respective number of days of work can be easily determined by calculating the difference between the day corresponding to l time and l begin .
With the additional resource label, the dominance relationship '⪯' has to be adjusted when comparing two resource labels l 1 and l 2 , so that ⪯ ll 12 implies that ⩾ ll 1 begin 2 begin . Consequently, a resource label can only dominate another resource label if fewer days of work are required.

Computational results
This section presents the results of several computational experiments conducted in order to better understand the impact of the night time provisions for logistics operations studied in the previous sections and to demonstrate the usefulness of the scheduling approach presented. A. Goel Transportation Research Part E 114 (2018) 144-162 9.1. Impact on feasibility In a first analysis, we are interested in identifying the impact of the night work provisions on the feasibility of routes. In particular we want to analyze how likely it is, that tours obtained by solving a vehicle routing and truck driver scheduling problem without considering the night work provisions can be executed without conducting night work. As a reference we used the optimal solutions obtained by the exact approach for solving vehicle routing and truck driver scheduling problems presented by Goel and Irnich (2017). This approach has been evaluated on 56 benchmark instances provided by Goel (2009). The instances are divided into different groups with random and/or clustered customer locations. For each route in the solutions obtained by the approach by Goel and Irnich (2017), we applied a scheduling approach using the REFs presented in this paper in order to determine whether a feasible schedule exists, in which each customer is visited within the given time window and no work is performed during night time. As some customers have very short time windows which require a night visit, we modified the instances by increasing the length of the respective time windows in such a way that each customer can also be visited during day time. Table 10 shows the percentage of the routes for which no feasible schedule without night work can be found and the percentage of complete solutions in which at least one route cannot be executed without night work. We can see that, depending on the definition of night time, for between 15 and 30 percent of the routes no feasible schedule without night work exists. This results into a low share of between 30 and 60 percent of solutions in which all routes can be executed without night work. This shows that, when optimizing vehicle routes and schedules without explicitly considering the night work provisions, it is very likely that solutions are found that cannot be executed without night work. Thus dispatchers would either have to manually modify the solutions to avoid night work, and thus would increase the cost of the solution, or would have to rely on night work, which would result in additional compensation for the drivers which would also increase costs and which might not be legally possible for all regions of operation.

Impact on route length
In a second analysis, we are interested in identifying the impact of the night work provisions on the total distance traveled by all routes in a solution of a vehicle routing and truck driver scheduling problem. Furthermore, the applicability of the REFs presented within the exact branch-and-price approach for the vehicle routing and truck driver scheduling problem presented by Goel and Irnich (2017) is evaluated. Again the benchmark instances for the vehicle routing and truck driver scheduling problem provided by Goel (2009) are used in this analysis and only the first 25 customers of all instances are considered as in Goel and Irnich (2017). To assure that a feasible solution exists for any of the night time definitions given in Table 1, the length of the time window of some customers in the benchmark instances was increased in such a way that each customer can be visited without performing any work between 20.00 h and 7.00 h, assuming a driving pattern of two driving periods of four and a half hours interrupted by a 45 min break and followed by a rest period.
We performed different experimental runs assuming a night time definition of 20.00-7.00 h, 23.00-6.00 h, and 0.00-4.00 h. The first night time definition could be used by a transport company operating internationally and seeking to use a single parameter setting that guarantees feasibility within the entire European Union. The other two night time definitions are representative for most of the countries which also have a night time definition of seven or four hours duration. Furthermore, experiments are conducted on the same instances ignoring the night work provision of the directive. The optimization goal in all experiments is to minimize the total distance traveled. Table 11 shows the solutions obtained when solving an instance of the vehicle routing and truck driver scheduling problem using the exact approach on a single core of an Intel i7-56000U CPU @ 2.60Ghz with a runtime limit of one hour. The first column indicates the name of the instance and the remaining columns indicate the total distance of all routes in the solutions, whereas the columns labeled No night shows the results of the approach by Goel and Irnich (2017) which ignores the night work provisions. Two sets of experiments are conducted. The first set named EU (Standard) considers all rules considered in Section 6, the second set named EU (All) also considers the possibility of extending the daily driving time to ten hours and reducing the rest duration to nine hours as described in Section 7. For the set EU (All), the approach by Goel and Irnich (2017) has been extended accordingly. Fields with an entry "n/a" indicate that the approach was not able to find the optimal solution within the runtime limit. The last rows of the table show the average distance traveled per instance, the increase in distance traveled compared to the respective case disregarding the night time provisions, and the average time (in seconds) required by the solution process to solve an instance.
We can see that for some instances the night work provision does not have an impact on the optimal solution. However, for some instances, e.g. instances TDS C201, TDS C202, TDS C203, TDS R101, and TDS R102, the impact is significant. On average there is an increase in distance of around 4, 2, and 1 percent for night time definitions of 20.00-7.00 h, 23.00-6.00 h, and 0.00-4.00 h.  Goel Transportation Research Part E 114 (2018) 144-162 Interestingly, exploiting the possibility of extending the daily driving time to ten hours and reducing the rest duration to nine hours appears to only have very limited benefit. This insight contradicts previous results indicating that extending the daily driving time to ten hours and reducing the rest duration to nine hours can significantly reduce operational costs (Kok et al., 2010; 191.17 191.17 191.17 191.17 191.17 191.17 191.17 191.17 TDS_C102 190.08 190.08 190.08 190.08 190.08 190.08 190.08 190.08 TDS_C103 190.08 190.08 190.08 189.42 190.08 190.08 190 191.17 191.17 191.17 191.17 191.17 191.17 191.17 191.17 TDS_C106 191.17 191.17 191.17 191.17 191.17 191.17 191.17 191.17 TDS_C107 191.17 191.17 191.17 191.17 191.17 191.17 191.17 191.17 TDS_C108 191.17 189.75 189.75 189.75 191.17 Goel and Vidal, 2014). The main reason for this difference is, that in previous studies the night work provisions of the Road Transport Working Time Directive had been neglected and solutions have been generated in which a significant share of the routes would be infeasible in practice. Another interesting results of the experiments is, that considering the night work provisions significantly accelerates the solution process and with longer night time durations less time is required to solve the instances. The main reason for this acceleration is that the night rests can help reducing variation in alternative resource labels because after each night rest the resource labels l rest and l break are at the initial values. Thus, dominance becomes stronger and the number of alternative labels that have to be considered is dramatically reduced. This insight should be of particular interest to the transportation research community because it clearly shows that improving algorithmic decision support does not necessarily require novel methodologies for solving difficult optimization problems faster. Instead, solving the right problem should always be considered as the primary contribution.

Impact on costs
In a third analysis, we are interested in identifying the impact of the night work provisions on costs. As Regulation (EC) No 561/ 2006 prohibits paying drivers based on the distances traveled, this analysis assumes that drivers receive a fix salary for every day they are on service. More precisely, we assume a cost structure of 150 Euro for driver and vehicle for each day of operation plus 0.50 Euro per kilometer for direct expenses related to distance such as fuel and toll costs. With this cost structure and the adaptations described in Section 8, we reran the previous set of experiments for the EU (Standard) rule set. Table 12 shows the results of the new experiments. The first column indicates the name of the instance, the following columns show the minimal costs of the solutions obtained in the previous experiment, and the last columns show the costs of the solutions obtained by the exact approach. The last rows show the average costs over all instances and the relative cost reduction compared to the costs of the solutions obtained when using total travel distance as the optimization goal. It must be noted that the additional resource label l begin weakens dominance and thus, causes additional computation effort when trying to minimize daily wages. Therefore, only a small share of the instances was solved to optimality within the runtime limit of one hour. For those instances, for which no optimal solution is found within the runtime limit, the costs of the best solutions found are shown. We can see that around 4 percent can be saved by using the cost minimization goal when optimizing routes. As only a few instances are solved to optimality when trying to minimize costs, the actual cost savings can be expected to be higher than the reported cost difference.

Impact on road safety
To understand the impact of the night work provisions on road safety, we used the fatigue and risk index calculator available from Health and Safety Executive (2006) to analyze the relative accident risk of the solutions obtained for experiments with different night time durations. The indices represent the estimated relative accident risk and an index of two represents a twice as high average accident risk as an index of one. Fig. 4 shows the average risk indices for the solutions obtained for the different night time definitions in Europe. Although, Austria has a night time definition of only fours hours duration, Austria also has a general ban on night driving between 22.00 h and 5.00 h for heavy goods vehicles (International Road Transport Union, 2016a) and is thus shown with the other countries having a night time definition of seven hours. The risk indices shown in the figure are normalized to the average risk associated to routes and schedules obtained when solving the benchmark instances without considering the night work provisions. We can see that risk indices are significantly lower for all national regulations compared to the case where the routes and schedules are optimized without considering night time provision. We can thus conclude that the night work provisions are effective in reducing accident risk. Furthermore, we can see that for night time durations of seven or eight hours, the risk is approximately 3 percent smaller than for the shortest night time definitions allowed by the directive. With a night time definition of ten hours duration, Belgium appears to have the by far safest regulations in Europe. The previously used scenario of a carrier who plans using a night time definition which includes all night time definitions found in Europe, will have a 10 percent lower average risk as a carrier who plans using the shortest night time definitions of just four hours.

Conclusions
This paper studies legal aspect in road freight transport optimization and reviews relevant regulations. We identify a major gap in the current state-of-the-art in vehicle routing for truck drivers in the European Union, i.e., that night work provisions of the Road Transport Working Time Directive have been neglected in all approaches presented so far.
We present an approach for determining whether a truck driver schedule complies with all relevant regulations and propose a scheduling approach for generating compliant schedules for a given route. Computational experiments using our scheduling approach reveal that a large share of the routes generated with previously presented approaches cannot be performed without night work and would be infeasible in practice.
When explicitly considering the night work provisions of the Road Transport Working Time Directive, our approach can solve vehicle routing problems with only moderately higher distance compared to solutions generated ignoring the directive. Our experiments show that transport companies can only slightly improve routes by exploiting the possibility of extending the daily driving time to ten hours and reducing the rest duration to nine hours. This managerial insight contradicts previous results reported for experiments ignorant of the night work provisions of the Road Transport Working Time Directive. Furthermore, we showed that considering the night work provisions is beneficial from an algorithmic performance point of view with solutions found up to 4.5 times faster.
We propose a new objective for optimizing routes and schedules based on mileage and labor costs related to working days, rather than on mileage or route duration alone. By using this objective, total transportation costs can be reduced by approximately 4 percent.  Goel Transportation Research Part E 114 (2018) 144-162 Lastly, we compare the different national implementations of the Road Transport Working Time Directive and show that longer night time definitions induce a significant reduction of fatigue-related accident risks. Given that in the European Union there are around 4000 fatalities a year in accidents with heavy goods vehicles (European Transport Safety Council, 2017) and that driver fatigue is a significant factor in approximately 20 percent of commercial road transport crashes (European Transport Safety Council, 2001), this insight should be of high relevance for policy makers concerned with road safety.