Joint optimization of green vehicle scheduling and routing problem with time-varying speeds

Based on an analysis of the congestion effect and changes in the speed of vehicle flow during morning and evening peaks in a large- or medium-sized city, the piecewise function is used to capture the rules of the time-varying speed of vehicles, which are very important in modelling their fuel consumption and CO2 emission. A joint optimization model of the green vehicle scheduling and routing problem with time-varying speeds is presented in this study. Extra wages during nonworking periods and soft time-window constraints are considered. A heuristic algorithm based on the adaptive large neighborhood search algorithm is also presented. Finally, a numerical simulation example is provided to illustrate the optimization model and its algorithm. Results show that, (1) the shortest route is not necessarily the route that consumes the least energy, (2) the departure time influences the vehicle fuel consumption and CO2 emissions and the optimal departure time saves on fuel consumption and reduces CO2 emissions by up to 5.4%, and (3) extra driver wages have significant effects on routing and departure time slot decisions.


Introduction
Environmental issues have attracted considerable public attention around the world. A wide consensus holds that the transportation system is a major contributor to climate change and global warming. Studies have shown that freight transportation contributes to approximately 5.5% of global greenhouse gas (GHG) emissions [1]. The report on CO 2 emissions in 25 European countries during the period 1990-2005 also indicated that approximately 26% of the total CO 2 emissions in the air come from the transportation system. In logistics service activities, CO 2 emissions from the transportation system were found to account for 93% of the total pollutant emissions, whereas those from warehousing account for only 7% [2]. Thus, creating an environmentally sustainable logistics system is necessary. PLOS  Among the logistics activities, the vehicle routing problem (VRP) is one of mostly widely researched, which was first introduced by Dantzig and Ramser [3]. The traditional VRP aims to minimize the total cost or total distance travelled by a fleet of vehicles that start from and end at one depot. Its variants, such as the multi-depot vehicle routing problem, open vehicle routing problem, vehicle routing problem with time-windows, and dynamic vehicle routing problem, have been the subjects of considerable research in the past years, mostly because of the additional constraints and objectives arising from real-world applications [4,5].
Drexl [6] compared the traditional VRP and its variants. Lysgaard and Wøhlk [7] proposed an exact algorithm for the cumulative capacitated vehicle routing problem to minimize the total arrival time rather than the total distance or time travelled.
A growing body of research has pointed out a concern regarding the environment; thus, new vehicle routing models have been presented to account for not only the travel costs or distances but also the energy consumption and GHG emissions [8][9][10][11][12][13][14]. İ. Kara et al. [8] proposed the energy-minimizing VRP to reduce the total energy consumed. Kwon et al. [9] studied a VRP, whose objective is to minimize the total operational cost of heterogeneous vehicles, including CO 2 emissions cost. Palmer [15] investigated an integrated routing and CO 2 emission model for goods vehicles and developed a model that was tested on a case study of home deliveries for grocery stores in the United Kingdom. The author found that an average saving of 4.8% in CO 2 emissions is possible compared to using routes that minimize time, but at the expense of a 3.8% increase in the required time. Bektaş and Laporte [11] proposed the pollution-routing problem, a new variant of VRP, to minimize the total cost, which includes the cost of fuel consumption, the corresponding GHG emission cost, and driver wages. Zhu et al. [16] proposed a procedure to find the maximum-capacity path while considering both fuel consumption and total cost.
Recent research on minimizing emissions in vehicle routing models can be divided into two main categories: (1) the set of models where time independence is assumed and (2) the set of models where the road conditions are subject to traffic congestion, such that the time needed to travel along a road segment depends on the departure time of vehicles [4].
The fuel consumption and CO 2 emissions of delivery vehicles are closely related to the driving speed, load and road conditions, and other factors. Most researchers define vehicle speed as a constant variable. Some Researchers have conducted surveys that revealed that fuel cost accounts for a large proportion of transportation costs [17]. According to a report, fuel cost accounts for over 46% of the operational cost of a logistics company in China [18]. Figliozzi [19] studied CO 2 emissions on different road conditions and time-definite customer demands. The result indicated that road conditions and speed limits have significant influences on CO 2 emissions. By implementing several congestion mitigation techniques, CO 2 emissions can be reduced by up to 20% [20]. Demir et al. [21] studied the VRP with CO 2 emissions and proposed a corresponding optimization model and solution algorithm. Pradenas et al. [22] added return transportation to the VRP, thereby avoiding the return of the vehicle load to mitigate GHG emissions.
Van Woensel et al. [23] compared a queuing approach with other approaches to solve a VRP with time-varying speed due to different road conditions. Maden et al. [24] studied the VRP with time-varying speed and found that fuel consumption and emissions can be reduced by 7% using the vehicle route optimization with real-time traffic congestion information on the road network. Ropke and Pisinger [25] proposed an adaptive large neighborhood search (ALNS) algorithm to deal with pickup and delivery problems with time windows and found that the ALNS algorithm is capable of finding solutions of good quality in a reasonable time. Lorini et al. [26] proposed a dynamic VRP model where travel times and demands are assumed to be dynamic. Figliozzi [27] analyzed the computational complexity of the genetic algorithm (GA), tabu search (TS), and ant colony algorithm in solving time-dependent VRP (TDVRP). Jabali et al. [28] proposed a model that considers CO 2 emission-related costs, including fuel consumption, travel time, and emissions that are time-dependent, and the model is solved using a TS procedure. Franceschetti et al. [29] described the pollution-routing problem in time-dependent environment using an integer linear programming. Wen et al. [30] studied the optimal path selection problem along with the road congestion pricing and road time-varying speed conditions. Wang, Y. et al. [31] addressed a collaborative two-echelon logistics joint distribution network design problem, which is solved by a hybrid algorithm integrated an ant colony optimization algorithm and genetic algorithm. Taş et al. [32] studied a TDVRP with stochastic travel times and proposed two meta-heuristics: TS and ALNS. Ehmke et al. [33] focused on minimizing the CO 2 emissions in urban areas while considering the effect of travelling at traffic speed and vehicle loads and proposed a technique to reduce computational difficulties. Wen and Eglese [34] investigated the minimum-cost VRP with time-dependent speed data and congestion charge scheme. They introduced a heuristic algorithm called LANCOST to minimize the total travel cost, which includes fuel cost, driver cost, and congestion charge. Luo et al. [35] applied the ALNS heuristics and dynamic programming recursions to the VRP, which considers stochastic demands and weight-related cost. Qian and Eglese [4] addressed the optimization of fuel emissions in VRPs with time-varying speeds, considering the capacities of the vehicles and the time constraints on the total length of each route. They presented a column generation based on the TS to solve the problem. Xiao and Konak [36] addressed a TDVRP with the objective of minimizing the emitted CO 2 and proposed a hybrid solution approach that combines a GA with an exact dynamic programming procedure. Xiao and Konak [37] proposed a hybrid algorithm of mixed-integer linear programming and iterated neighborhood search to deal with the green vehicle scheduling and routing problem with time windows, which considers time-dependent road conditions. Huang et al. [38] considered a TDVRP with path selection and formulated models on both stochastic and deterministic conditions.
A road timetable was designed to provide the expected times for vehicles to travel between locations starting at different times [39]. In a TDVRP, the first in, first out method is an important property, and the time-varying speed is defined as a constant at a certain period to guarantee this property [40].
In this study, we consider the time window for each customer. Although most researchers consider time windows as hard constraints, some practical applications have shown that timewindow constraint can be violated at a cost [41].
To the best of our knowledge, existing related studies integrating vehicle scheduling and routing problem considering different wages in different time slots are still scarce. In this study, we focus on the optimization of minimizing the total cost, which includes fuel consumption, different driver wages in different time slots, and CO 2 emissions, in time-varying road conditions. Solving the problem is immensely time-consuming, thus an ALNS algorithm is proposed. The main contributions of this study are twofold. First, a joint optimization model of the departure time schedule of vehicles and the routing problem with time-varying speeds is presented, and CO 2 emissions and soft time-window constraints are considered. Second, higher wages for drivers who are working during nonworking periods are considered, and the trade-off between the total cost and CO 2 emissions is analyzed.
The rest of this paper is organized as follows. Section 2 describes the green vehicle scheduling and routing problem with time-varying speeds, whose objective is to minimize the total costs, which include fuel cost, CO 2 emissions, time-window violation penalty, and driver wages. Section 3 introduces the framework of the ALNS algorithm. Section 4 presents a case study to examine the efficiency of the proposed algorithm and the managerial insights are obtained according to the results. Finally, Section 5 presents the conclusions and recommendations for further studies.

Problem description
The general assumption in the traditional vehicle routing problem is that vehicle speed is constant, and few considerations reflect the actual road conditions. Vehicle speed cannot be constant all the time and is in fact constantly changing due to different road conditions. Thus, our study mainly focuses on the joint optimization of the vehicle scheduling and routing problem with time-varying speeds, CO 2 emission considerations, and higher wages during nonworking periods. The fuel consumption and CO 2 emissions of a vehicle are undoubtedly associated with the driving speed and load weight. We consider the fixed cost, the delivery cost, the timewindow violation cost, and the external cost of vehicle emissions. We also study the optimization problem of the routes and the schedules of a fleet of delivery vehicles that minimize the fuel emissions in a road network where speed depends on time. A brief demonstration of the solution is presented in Fig 1. Hypotheses A1: The location of a warehouse (i.e. depot) and the customers are known. A2: The time-window constraint can be violated at a cost. A3: The demand and service time windows of each customer are known. A4: Orders cannot be split, that is, each customer has only one vehicle for its services. A5: Only one type of vehicle is available, and its dead weight and load capacity are 2.5 and 7 tons, respectively. The number of vehicles is sufficient.
A6: In the urban traffic network, the change rule of average vehicle speed is ladder-like. A7: The per-unit-time reward for drivers during the nonworking period (i.e., earlier than 8:00 a.m. or later than 6:00 p.m.) is higher than that during the normal work period (between 8:00 a.m. and 8:00 p.m.).
In a given arc (i, j), the vehicle speed is v, the total vehicle weight (including the load weight) is f, and the arc length is d. The fuel consumption of the vehicle can then be calculated using the formulation proposed by Demir et al. [10]: Mathematical model 2A} is a set of arc lengths, and K = {1,. . .,k} is a set of homogeneous vehicles. The following are other symbols: In arc (i, j), the traveling time of the vehicle can be expressed as a function related to the departure time when vehicle k leaves node i: The energy consumption of the vehicle in arc (i, j) can be written as In Eq (3), we let v ij denote the average traveling speed of the vehicle over arc (i, j). The total vehicle weight equals to (w + f ij ), where w is the vehicle weight and f ij is the load of the vehicle on arc (i, j).
To calculate the cost of time-window violation penalty for all customers, the arrival and departure times on customer i of vehicle y i and r i are needed. [a i , b i ] is the time window of customer i. The violated time to serve customer i is calculated as follows: if y i < a i : if y i > b i : In other situations, the time window of customer i is not violated and no extra costs are paid.
The energy consumption also changes because of the change of speed. The optimization objectives of this study are shown as follows: to determine the optimal visiting route for each vehicle and to choose the optimal departure time for each vehicle from several available time slots. During the calculation process, vehicle routing and departure times are simultaneously optimized while considering the energy consumption. The objective function (7) includes five parts, namely, fixed cost, driver wages, penalty cost of time-window violation, cost of fuel consumption, and cost of CO 2 emissions. to: Eq (8) represents each vehicle route that starts from the warehouse only once. Eq (9) implies that each vehicle should return to the same warehouse only once, and Eq (10) represents the vehicle that visits each customer exactly once. Constraint (11) states that balance should be maintained for the arrival and departure times of customer i for vehicle k. Constraint (12) indicates that the load of vehicle k cannot exceed its capacity. Eq (13) calculates the total wages of drivers under normal and abnormal work period conditions.
Constraint (14) ensures that the vehicle leaves the warehouse after or at ts 1 .
Constraint (15) ensures that vehicle returns to the warehouse before or at ts M+1 .
Constraint (16) states that the departure time of vehicle k from the warehouse is equal to the starting time of vehicle k.

Algorithm analysis
The vehicle routing problem belongs to the NP-hard category, which is generally solved by some heuristic algorithms [25]. Among the heuristic algorithms based on the neighborhood search methods, the adaptive large neighborhood search (ALNS) has proven to be successful for a wide variety of vehicle routing problems [44][45][46][47]. The classical ALNS algorithm is an iterative process where, at each iteration, part of the current solution is destroyed and then reconstructed in the hope of finding a better solution [21,25]. Therefore, we apply an ALNS heuristic to solve the aforementioned optimization problem.
The main procedure is as follows. First, an initial solution is constructed to meet the demand of each customer. Second, the optimal route of each vehicle can be found by using the ALNS heuristic. Finally, the optimal departure time of each route is determined.
The step-by-step description of the algorithm is as follows: Step 1: Use the greedy algorithm to construct an initial solution S 0 .
Step 2: Calculate the objective function value obj(S 0 ). Set the best solution S Ã = S 0 and best objective value obj = obj(S 0 ).
Step 3: Let the initial temperature t = 100. The initial scores of removal heuristics h r and insertion heuristics h i are set to 0, and the weight of each heuristic w i is initially set to 1.
Step 4: Destroy the incumbent solution S i by using a removal heuristic h r .
Step 5: Construct a new solution S t by using an insertion heuristic h i .
Step 6: Calculate the objective function value of the incumbent solution and mark it as obj(S t ).
If obj > obj(S t ), then obj = obj(S t ) and S Ã = S t ; otherwise, the solution is accepted with a probability of exp(−(obj(S t )−obj)).
Step 7: Update the scores of removal and insertion heuristics and update the temperature t = t × τ.
Step 8: Check whether the end of the current segment has been reached. If the end has been reached, then proceed to Step 9; otherwise, proceed to Step 10.
Step 9: The weight of each heuristic ρ i is updated and all scores are set to 0.
Step 10: Check whether the temperature or the time limit is reached. If one of the limits is reached, then proceed to Step 11; otherwise, proceed to Step 4.
Step 11: Search the best departure time for each route.
Step 12: Output the best solution S Ã (i.e., routes, departure time of each route, and corresponding objective value).

Initial solution
We generate M routes first and insert all customers into these routes. Then, the initial solution is constructed. M is determined by where m is the parameter that estimates the maximum vehicles needed. The initial solution is constructed using a basic greedy insertion heuristic. All customers are inserted into the routes based on their distances to the depot.

Insertion and removal heuristics
We have developed two insertion and three removal heuristics in this study. These heuristics have been proven effective [35,48]. Insertion heuristics.

Basic greedy insertion heuristic
The basic greedy insertion heuristic inserts μ removed customers into the destroyed solution. Moreover, all feasible positions in the current route are tested and customers are inserted into positions with the lowest cost.

Revised greedy insertion heuristic
The revised greedy insertion heuristic aims to improve the basic greedy insertion heuristic. The main difference is that, in each iteration, all the feasible insertion positions in every route are tested. The revised greedy insertion heuristic was used by Luo et al. [35]. It runs much slower than the basic greedy insertion heuristic.
Removal heuristics. Random, worst and neighborhood graph removal heuristics are used in this study. These heuristics are used to destroy the incumbent solution by removing μ customers.

Random removal heuristic
The random removal heuristic randomly selects μ customers, which are removed from the incumbent solution.

Worst removal heuristic
The worst removal heuristic selects μ customers that have the largest cost savings. The worst removal heuristic can improve the quality of the solution because the customers with large cost savings can be placed in better positions.

Neighborhood graph removal heuristic
This heuristic aims to remove the most critical customers according to their historical information. The information is stored in a graph G = (V, E). The information stored in this graph is the weight w ij of each edge (i, j)2E. The weights are set to be infinite at the beginning and updated at each iteration and are calculated by: Then, all w ij for each customer j; 2 N 0 0 are summed up. The μ customers to be removed are those with the highest X j2N 0 w ij . When a customer is removed, the surrounding customers are recalculated.

Acceptance and stopping criteria
The acceptance criterion used in this article is adapted from the simulated annealing. The solution that is better than the current one is accepted directly, whereas the probability of accepting a worse solution is exp(−(obj(S t )−obj)), where t represents the current temperature.
Temperature t starts out at the initial temperature T Start . At each iteration, t is multiplied by cooling rate c, where 0 < c < 1. The iteration stops when either the temperature reaches the limit temperature or the limit on iteration times is reached. Both limits are fixed at the beginning.

Large neighborhood
At each iteration, μ customers are selected from the incumbent solution to destroy the incumbent solution. μ is the parameter that controls the neighborhood size. With the increase of parameter μ, the neighborhood size becomes larger and more computational time is needed.

Adaptive adjustment mechanism
Weight ρ i is introduced to select the insertion and removal heuristics h i , i2{1, 2,. . .,k} at each iteration. The idea is to update the score of each heuristic to measure its performance. A roulette wheel mechanism is adopted to choose the insertion and removal heuristics. The probability for heuristic h i to be chosen is: The entire search process is divided into several segments. A segment consists of iterations of the ALNS heuristic. To start the entire search process, the score π i , i2{1, 2,. . .,k} of each heuristic h i , i2{1, 2,. . .,k} is set to 0. At the end of each iteration, all heuristics are adjusted based on their performances. The score (π i ) is increased by σ 1 , σ 2 or σ 3 , depending on the rule, which is presented in Table 1.
At the end of each segment, weight ρ i is updated using the recorded score π i as follows: 1] is the controlling parameter and λ i denotes the number of times heuristic h i has been used in this segment. If λ i equals to 0, then weight ρ i is unchanged. The new solution is a globally best solution.
The new solution has not been visited and is better than the incumbent solution.
σ 3 The new solution is accepted and has not been visited previously, but it is worse than the incumbent solution.

Data and parameter setting
A numerical example is used to illustrate the applications of the proposed model and the solution algorithm. The example distribution service network is a supermarket chain in Changsha, Zhuzhou and Xiangtan, Hunan province of China. The network consists of one depot and 38 customers, as shown in Fig 4. All customers are served by the depot located in Xiangtan. The corresponding information on the locations, distance matrix, demands, and time windows of all the supermarket service nodes are shown in Appendices 1, 2, 3 and 4, respectively. The fixed costs of the vehicles, driver wages during normal work period, fuel cost, penalty cost of time-window violation, and CO 2 emissions tax charge are set to 100 CNY per shift, 15 CNY per hour, 7.59 CNY per liter, 10 CNY per hour, and 80 CNY per ton, respectively [49] [50]. The wages of drivers during the nonworking hours are twice that during the normal work period. The exchange rate of USD to CNY is 6.6533 (i.e. 1 USD = 6. 6533 CNY) [51]. In this case study, we consider the actual traffic congestion. The relationship between vehicle speed and time slot is shown in Table 2, and the driver wages during different periods are shown in Table 3.
The parameters of the ALNS algorithm are given as follows. According to the numerical experiment in the literature, the initial temperature T Start is set to 100, the weight of each heuristic ρ i is initially set to 1, whereas the scores of heuristics π i are set to 0. The rest parameters are determined according to the computational experiments. The cooling rate c is 0.999; the score adjustment parameters are σ 1 = 100, σ 2 = 20, σ 3 = 10; and the score adjustment controlling parameter is α = 0.5. After several preliminary experiments, the neighborhood size μ is fixed to 15. Moreover, the iteration stops when the temperature reaches the limit temperature or the limit on iteration times is set to 1000 s. These input data are considered the base case in the following analysis unless otherwise specified.

Analysis and discussion of results
The proposed model and solution algorithm are applied to the sample supermarket chain distribution. The results are summarized as follows.
The proposed solution algorithm was coded in Java and run on a Dell N5040 laptop with a 2.13GHz Intel Pentium CPU and 4.00 GB RAM. The CPU time for searching the corresponding optimal solution is 37.7 seconds.
First, we address the effects of the different optimal objectives on the delivery routes and departure time. The following two schemes are employed: Scheme 1 aims to minimize the total of CO 2 emissions, while Scheme 2 aims to minimize the total costs. According to the above algorithm, we obtain the corresponding solutions for the minimum total cost and minimum CO 2 emissions, which are shown in Tables 4 and 5, respectively.  From Tables 4 and 5, we can deduce the following: Minimal energy consumptions are not guaranteed for the vehicles along the shortest path. However, several common routes exist (i.e., the visiting sequences are the same with different optimization objectives). Furthermore, the distances between customers covered by the common routes are shorter and the loading rate in the routes is higher. Thus, they can be served by one vehicle with relatively less costs.
In Table 5, the optimal departure time for each vehicle to achieve minimal CO 2 emissions is 0:00 midnight because the driving speed is at its optimum from 0:00-5:00.
To minimize the total carbon emissions with no departure time limitations, vehicles tend to depart from the depot with higher speeds and avoid the rush hours.
As shown in Table 6, the optimal departure time is 10:00, which considers the objective of minimizing the total cost of CO 2 emissions and fuel consumption, whereas the departure time switch is 14:00, which considers the objective of minimizing the total costs. This is the result    of the scheduling and routing schemes with the objective of optimizing the total cost that is related to CO 2 emissions, in which more extra wages are paid because of the work during nonworking periods. In the scheme of optimizing the total cost, the departure time plan is chosen within the normal work period, and more costs related to CO 2 emissions are incurred. Fig 5 shows that the departure time slots of vehicles have significant effects on the total cost-related CO 2 emissions. In this instance, the vehicle energy consumption at 10:00 a.m. is the least because the peak times (7:00 a.m.-9:00 a.m. and 12:00 p.m.-2:00 p.m., during which vehicles travel at a low speed), are avoided. Thus, the energy consumption is reduced. At 17:00 p.m., the energy consumption of the delivery vehicle is at the maximum because vehicles are caught up in the rush hour. At this time, the vehicle is extremely slow and its load remains relatively large for a longer period, thereby consuming a larger amount of energy. CO 2 emission in Scheme 1 is less than that in Scheme 2. The savings is up to 60.3118 kg, and the savings percentage is approximately 5.4%. This finding implies that scheduling the vehicle departure is an important method to reduce the total CO 2 emissions of a delivery tour.

Routes
Next, the effects of different wages for overtime periods on delivery routing and departure time decisions are explored. We employ another two schemes: Scheme 3, in which the wages for different periods are the same, and Scheme 4, in which the wages for overtime periods are twice those of the wages for normal working periods. Tables 7-9 show that although the driver wages per hour during overtime periods are doubled, the driver wages increase only by a percentage of 29.1%. The cost related to energy consumption and the penalty cost of time-window violation also increase. The optimal routes and the corresponding departure time should be determined based on the trade-off analysis between driver wages and other costs, especially the penalty cost of time-window violation. The vehicle routes and the corresponding departure time with different driver wages are different from those without extra wages. This finding implies that the extra driver wages affect routing and departure time decisions.

Practice insights
Based on the above analysis, we have obtained some practice insights shown as follows. There are several key results of this research that have direct managerial insights for delivery practice. Results show that: (1) the shortest routes based on the minimal total costs are different from those routes based on minimal total CO 2 emissions, (2) the choice of starting time has a significant influence on the overall energy consumption and CO 2 emissions, and (3) the extra driver wages affect the routing and departure time decisions. In this study, the optimal travel time reduces the CO 2 emissions by almost 5.4% compared with the worst travel time. Thus, considering the road traffic congestion factors and the reasonable arrangements for the departure time of vehicles is an important way to reduce logistics costs and CO 2 emissions.

Conclusions
This paper investigated the joint optimization problem of the green vehicle scheduling and routing problem, taking time-varying vehicles speeds and different wages in different time slots into considerations. A corresponding joint optimization model of the departure time schedule of vehicles and the routing problem with time-varying speeds is presented. The objective of the proposed model not only aims at minimizing transportation related costs (i.e. fuel consumptions and drivers wages) and fixed cost of vehicles, but also considers the cost of carbon emission. Based on the characteristics of the optimization model, a heuristic algorithm based on the adaptive large neighborhood search algorithm is provided to solve the problem. The optimal model and corresponding algorithms were evaluated by a real-life case study on the joint vehicle scheduling and routing problem. The effects of the different optimal objectives on the delivery routes and departure time are also analyzed. Meanwhile, the following new insights and important findings are obtained from this study. First, the choice of starting time has a significant influence on the overall energy consumption and CO 2 emissions. Second, the extra driver wages affect the routing and departure time decisions. Third, it is a significant way for logistics delivery operators to reduce logistics costs and CO 2 emissions by joint optimization of the departure time of vehicles and routing considering the road traffic congestion factors.
Although the numerical results presented in this study can be explained logically, larger and realistic cases are necessary to further justify the findings using the proposed model. It is also important to address the robust green vehicle routing problem under stochastic traffic conditions.