# Route Optimization of Electric Vehicle considering Soft Time Windows and Two Ways of Power Replenishment

Authors: Ming Meng; Yun Ma
Journal: Advances in Operations Research
 (2020)

---

## Abstract

Under the background of severe air pollution and energy shortage, electric vehicles (EVs) are promising vehicles to support green supply chain and clean production. In the world, the renewal of EVs has become a general trend. Therefore, the concern about EVs is a hot issue at present, but EVs have the characteristics of limited driving distance and long charging time. When the EVs are used in logistics transportation, these characteristics have a significant impact on the vehicle routing problems. Therefore, based on the research experience of traditional vehicle routing optimization, combining with the characteristics of EVs, this paper presents an optimal problem of electric vehicle routes with time windows based on two charging methods and it also designs a mathematical model which was caused by early and late arrival as the objective function to minimize the transportation cost, vehicle use cost, power supply cost, and penalty cost. The model is solved using an ant colony algorithm. Finally, the ant colony algorithm is tested and analysed with an example.


---

## Body

## 1. Introduction

The research on vehicle routing began in the 1950s, Dantzig and Ramser firstly proposed the concept of vehicle routing problem (VRP), which refers to the purpose of distributing or collecting goods between distribution centres and a certain number of customers with different needs through the design of vehicle routing, and finally reached the goals, such as the shortest distance, the least time, and the least cost [1]. The importance of transportation in the logistics system distribution activities is undeniable, but in recent years, the large use of fossil fuel vehicles has resulted in the rapid consumption of oil resources and excessive emissions of greenhouse gases, so considering the balance and optimization of monetary costs and the environmental problems of fossil fuel vehicles, many vehicle routing problem models for fuel or emissions have risen, such as the fuel consumption rate of the VRP was considered by Xiao et al. [2], fuel consumption and carbon emission of the VRP considered by Zhang et al. [3], a time-dependent VRP model of minimizing fuel consumption of Norouzi et al. [4], the green vehicle routing problem (GVRP) model of Poonthalir and Nadarajan [5], and the vehicle scheduling problem of minimizing carbon emission of Wang et al. [6].Because of the environmental protection characteristics of EVs, in recent years, with the rapid growth of the market share, EVs have been introduced into the market as personal and commercial alternative energy vehicles. In 2018, the number of electric vehicles worldwide exceeded 5.1 million, an increase of 2 million from 2017, and the growth of new vehicles almost doubled (IEA, 2019). In China, electric vehicles are growing at the rate of more than 50% per year (IEA, 2018). In 2018, the number of electric vehicles in China ranked first in the world [7]. Compared with traditional fuel vehicles, the main advantages of electric vehicles are zero greenhouse gas emissions, high efficiency, and low operating noise [8], which helps logistics companies get more and more social and environmental customer support. And it gets a green image [9]. Fernandez and Casals use sustainable analysis and practical estimation methods that take into account the life cycle carbon emissions of electric vehicles to analyse the contribution of electric vehicles to reducing greenhouse gas emissions [10, 11]. Wu et al. used the life cycle assessment method to estimate that the total life cycle greenhouse gas emission reduction potential of battery electric vehicles will gradually reach 13.4% in 2020 [12]. In addition to environmental benefits, EVs also have economic benefits. Compared with traditional fossil fuel powered vehicles, EVs consume 10% to 15% of the fuel cost of traditional vehicles at the same distance [13]. Therefore, the focus on EVs has become a hot issue at present. However, due to the characteristics of EVs such as low endurance mileage and long charging time, it becomes a significant and challenging task to study its VRP.Electric vehicles refer to cars that use electric engines to provide energy through their own chemical batteries. The electrical energy used by EVs can be converted into many kinds of clean energy, which is the main force of environmental protection vehicles in the future with a high energy utilization rate and being clean and pollution-free. As a distribution vehicle, electric vehicles need to be charged much time for long-distance distribution, and the power replenishment time is longer than the refueling time. Therefore, it is necessary to consider the charging problems that may occur in the charging process. Based on traditional fuel vehicle route optimization, the introduction of the charging stations is the primary issue of electric vehicle upgrading combining with the characteristics of EVs. Electric distribution companies apply some coordination methods to control the charging load. That can affect the charging duration. Yang et al. studied the charging scheduling of electric vehicles on the highway [14]. Dogan and Alci optimized the charging schedule of electric vehicles considering the cost of battery degradation [15]. Dogan et al. based on a heuristic algorithm for charge and discharge coordination optimization [16]. Aravinthan and Jewell proposed a two-step method for scheduling EV charging, which limits the impact on EV charging on distribution assets [17].At present, fast charging is the most common charging strategy. Schucking et al. proposed five charging strategies and believed that DC fast charging is essential [18]. In addition to fast charging on the issue of charging strategy, battery switching is also a relatively popular charging strategy. Adler and Mirchandani used real-time highway data to find the optimal battery exchange strategy [19]. Yang and Sun studied the location routing problem of the battery switching station of EVs with large capacity and optimized the routing plan and the selection of battery switching stations [20]. Dai et al. regarded the battery exchange strategy of EVs as the background and it provided reference for the determination of decision variables such as the number of backup batteries in AC power station and the charging selection of EVs [21]. Margaritis et al. analysed the advantages and disadvantages of battery exchange strategy to the government, users, and enterprises based on the EU [22]. This study combines the two charging strategies of fast charging and battery switching. The fast charging time is related to the remaining power, fixed battery replacement time, and the power replenishment method with less time is selected.In the large-scale application of EVs in modern logistics, in addition to considering the plan to charge or replace batteries on the way, the delivery time is also extremely important for logistics companies, so we need to consider some important practical factors, such as customer time windows. In the actual distribution activities, more and more logistics enterprises begin to pay attention to the timeliness of package delivery. For customers, “punctuality” is one of the important factors affecting customer experience, so the vehicle routing problem with time windows (VRPTW) has also become an important part of the research. By adding time windows constraints to the basic VRP model and Solomon built VRPTW model, in which time window is a hard time window that must be observed [23]. Qureshi further expanded the concept of the hard time window, extended the problem to the category of the soft time windows, and determined the strictness of time windows by setting penalty function [24]. The soft time windows problem is widely used. Goeke considered the problem between time windows and EVs is pickup and delivery [25]. Keskin and Catay studied partial charging strategies for electric vehicles with time windows [26]. Desaulniers et al. studied the effective route optimization of battery electric commercial vehicle fleets, and they considered four variants of the route problem of electric vehicle with time windows [9]. Goeke studied the pickup and delivery of EVs with time windows (PDPTW-EV). In the PDPTW-EV, access location is limited by time windows [25]. Many scholars introduced charging stations and time windows for discussion [27, 28]. This study combines the two hot charging strategies of fast charging and battery switching. The fast charging time is related to the remaining power, fixed the switching time, and the power replenishment method with less time is selected. This paper not only considers the problem of charging stations, but also uses the broken line time windows to limit the distribution time based on the soft time windows.In summary, compared with other similar studies, the main contributions of this paper are as follows: (1) in order to calculate the cost of logistics enterprises more accurately and save cost, this paper considers the cost of transportation as much as possible, that is to say, fixed cost, transportation cost, charging cost, and time penalty cost. And it establishes a mixed-integer linear programming model (MILP) with the goal of minimizing the total cost; (2) in order to save charging time, two commonly used charging methods are considered, and one with shorter charging time is selected; and (3) considering the customer’s time tolerance, the broken line soft time windows is adopted.The rest of this paper is organized as follows: Section2 describes the problem and identifications of the main assumptions. In Section 3, the MILP model is established and the description of the method of solving the model is provided. In Section 4, the test results of an example are given and the sensitivity analysis is carried out. Finally, the paper summarizes in Section 5.


## 2. Problem Description

This problem can be abstracted as that an enterprise uses EVs to provide distribution services forn customers with time windows after the distribution centre is fully charged. Each customer’s demand, service duration, good service time windows, and customer tolerance level are needed to be known. Finally, reasonable planning of the vehicle distribution route is necessary so that the total cost of distribution is small.The soft time windows can relax the constraints of time windows, optimize resource allocation, and reduce energy consumption and road congestion, so the time windows studied in this paper mainly are soft time windows. As shown in Figure1, in the traditional soft time windows, whether the vehicle arrives before or after l, the customer is allowed to serve, but they are required to pay the corresponding penalty fee, which is generally a simple linear relationship with the degree of time deviation. However, for the deviation of the best service time windows, customers have the difference between tolerance and intolerance. Therefore, based on the traditional soft time windows, considering the tolerance range of customers, this paper proposes a broken line time window.Figure 1
Penalty cost function under traditional soft time windows and polygonal line soft time windows.According to the customer tolerance level (∂) and service duration (tf), the tolerance time window can be obtained on the basis of the optimal time window e′,l′, where e′=e−∂×tf,l′=l+∂×tf. If the vehicle provides services in the best time window e,l, there will be no penalty cost to be paid. If the vehicle provides services in the interval e′,ee′,e or l,l′, there will be only less penalty cost to be paid. If the vehicle starts service earlier than e′ or later than l′, there will be more penalty cost to be paid. Compared with the traditional soft time windows, the broken line soft time windows take the actual feelings of customers into consideration, which will be conducive to better coordination between enterprises and customers, reasonable allocation, and optimization of resources.In view of the above considerations, the problems and basic assumptions to be solved are as follows: (1) each vehicle can meet the needs of multiple customer points, and each customer point can only be served by one vehicle; after the completion of the distribution service, the vehicle must drive back to the distribution centre; (2) all vehicles are the same type, and the total transportation volume shall not exceed the capacity limit of EVs; (3) each customer’s location coordinates, demand quantity, and service duration are known, and there are optimal service time windows and tolerance time windows; (4) the time window penalty coefficient of each customer node is the same; (5) EVs can only be charged or their battery can be replaced in the distribution centre or power station; (6) each customer must be visited and can only be visited once; (7) the road is smooth, without considering traffic congestion and other special situations; (8) it is assumed that the transportation cost generated by the vehicle is linearly related to the route length, and the use cost of each vehicle is fixed; and (9) the objective function of this problem is to minimize the total distribution cost.


## 3. Materials and Method

In this part, according to the electric vehicle routing problem with time windows (EVRPTW), we establish a MILP model and determine the constraints.


### 3.1. Defining Variables

The parameters and decision variables used to describe the MILP model are shown in the following:N: set of all nodes n in networks.V: set of all nodes v in networks.C: set of all nodes c in networks.D: network D=N∪C∪o consisting of sets of nodes, D=0,1,2,…,N+C.n: set of customer nodes, where n∈N.v: set of EV nodes, where v∈V.c: set of charging station nodes, where c∈C.o: set of distribution centre nodes.C0: fixed cost per vehicle.C1: electric vehicle unit distance transportation cost.EC: total electricity supplementary cost.C2: charging cost per unit time.C3: single battery replacement cost.i,j: index of nodes, i=0,1,2,…,n.dij: distance from the node i to the node j, i,j∈D.qn: demand of the customer node n, and n∈N.Q: rated load capacity of electric vehicles.P: battery capacity of electric vehicles.g: charge coefficient.Pdv1: the residual power of EVs when v reaches the node D.Pdv2: residual electricity of the electric vehicle V leaving node D.p: battery capacity of electric vehicles.h: power consumption coefficient.g: charge coefficient.tfi: if i represents the customer point,tfi represents the service time of electric vehicle at the node i; if i represents the charging stations, then tfi represents the electric vehicle’s power replenishment time, i∈N∪Mtci: single battery change time, and i∈C.twi: waiting time of electric vehicles at the customer node i.tiv: the time point when the vehicle v arrives at the customer node i, where t0v=0ti′v: the start time of the v-car service customer node i.tij: time of electric vehicles from i to j.speed: driving speed of electric vehicles.ei: the lower limit of the best service time windows of the customer node i.li: the upper limit of the best service window of the customer node i.ei′: the lower limit of tolerance time windows of the customer node i.li′: upper limits of tolerance time windows of the customer node i.ρm: unit time penalty cost of vehicles violating the time windows, m = (1, 2, 3, 4).xijv: if the vehicle v is from i to j, then xijv=1, otherwise xijv=0.xov: if the vehicle v returns to the distribution centre after delivering a customer group, then xov=1, otherwise xov=0.yiv: the task of the customer node i is completed by the vehicle v, then yiv=1, otherwise yiv=0.


### 3.2. Model and Method

The objective function is to minimize the comprehensive cost, including transportation cost, vehicle use cost, electricity replenishment cost, and time window penalty cost. The formula of the MILP model is as follows:(1)Fmin=C0∑v∈Vxov+C1∑v∈V∑i∈D∑j∈D,i≠jxijvdij+∑v∈V∑i∈CECitfi+∑v∈V∑i∈Npuitiv.Among them,(2)ECitfi=C2×tfi,tfi≤tci,C3,tfi>tci,(3)puiti′v=ρ1ei′−ti′v+ρ2ei−ei′,ti′v≤ei′,ρ2ei−ti′v,0,ρ3ti′v−li,ρ3li′−li+ρ4ti′v−li′,ei′<ti′v≤ei,ei<ti′v≤li,li<ti′v≤li′,li<ti′v,subject to(4)∑i∈D,k≠ixikv=∑j∈D,k≠jxkjv,k∈D,(5)∑v∈Vynv=1,n∈N,(6)∑n∈Nynvqn≤Q,(7)∑v∈V∑i∈D,i≠0xoiv≤V,(8)∑i∈N∑j∈D,i≠jxijv≤N,(9)t0″=0,(10)tij=dijspeed,i,j∈D,(11)tfi=mintci,P−piv1g,(12)tiv=ti′v+tfi+twi,i∈N,(13)ti′v≥tiv,i∈N,v∈V,(14)tj′=∑i∈D∑j∈D,i≠jxijvti″+tij,(15)piv1=piv2,i∈N,(16)pov1=100,(17)pjv1=piv2−xijv×dijh,i,j∈D,i≠j,v∈V,(18)piv1≥0,i∈D,v∈V,(19)xijv,xov,yiv∈0,1,i,j,o∈D,v∈V.In the model given above, Constraint (4) ensures that the vehicle starts from the distribution centre returns to the distribution centre and focuses on distribution centre. Constraint (5) ensures that each customer is served only once by one vehicle. Constraint (6) is a restraint on vehicle loading. Constraint (7) indicates that the number of EVs serving the customer is less than or equal to the total number of vehicles owned by the distribution centre. Constraint (8) requires that the number of customers served by each vehicle is less than or equal to the total number of customers. Constraint (9) requires that when the electric vehicle starts from the distribution centre, the time is 0. Constraint (10) indicates that the travel time of electric vehicles from the point i to the point j is the ratio of the distance between two points and the travel speed. Constraint (11) indicates that when the electric vehicle passes through the charging stations, the charge replenishment time is the minimum of the battery replacement time and fast charging time. Constraint (12) indicates that the time the electric vehicle leaves the customer node i is the sum of arriving at the customer node, waiting time at the customer node i, and servicing time. Constraint (13) shows the relationship between the starting service time and the arrival time of vehicles at the customer point. Constraint (14) indicates that the time the electric vehicle arrives at the node j is the accumulation of the previous time. Constraint (15) means that neither power consumption nor power replenishment occurs at the customer node i. Constraint (16) indicates that when the electric vehicle starts from the distribution centre, the state of charge is 100. Constraint (17) indicates that the remaining power to node j is equal to the remaining power to leave node i minus the power consumed on the way. Constraint (18) indicates that the state of charge of electric vehicles is nonnegative at any position. Constraint (19) indicates that the decision variable is constrained to 0-1.In this paper, the ant colony algorithm is used to solve the approximate optimal solution of the NP hard problem. The ant colony algorithm has the characteristics of distributed computing, positive information feedback, and heuristic search. In essence, it is a heuristic global optimization algorithm in the evolutionary algorithm. The algorithm imitates the social behaviour of ants in order to find the shortest route from nest to food source. In the ant colony algorithm, each ant performs four basic activities in the process of route construction: (1) select the next customer based on the probable function of the distance from the current location to the customer and the route strength on the arc; (2) save the taboo list of the customers in the current route; (3) update the residual capacity of the vehicle; and (4) update the track intensity on the access arc, and use the method of local search to improve the quality of the solution. Finally, the taboo lists are deleted, and a new iteration is started. When the ant colony algorithm solves the MILP model, the specific steps are as follows:Step 1: importing data and setting basic parameters.Step 2: calculating the distance between customer nodes and the cost and time of distance between customer points.Step 3: initializing and iterating in order to find the best route.Step 4: terminating the algorithm and reporting the best solution.Figure2 shows the traversing process of a single ant in the iterative search for the best route.Figure 2
Single ant traversal process to find the best route during iterative search.The meanings of the mathematical symbols involved in Figure2 are explained as follows:Current: the current location of ants.Allowedk: the collection of client nodes that have not been accessed, initially including all client nodes.Nexti: the set of optional customer nodes when the electric vehicle is in i-node.Pnexti: the collection of optional customer nodes for EV charging closest to i-node.


## 3.1. Defining Variables

The parameters and decision variables used to describe the MILP model are shown in the following:N: set of all nodes n in networks.V: set of all nodes v in networks.C: set of all nodes c in networks.D: network D=N∪C∪o consisting of sets of nodes, D=0,1,2,…,N+C.n: set of customer nodes, where n∈N.v: set of EV nodes, where v∈V.c: set of charging station nodes, where c∈C.o: set of distribution centre nodes.C0: fixed cost per vehicle.C1: electric vehicle unit distance transportation cost.EC: total electricity supplementary cost.C2: charging cost per unit time.C3: single battery replacement cost.i,j: index of nodes, i=0,1,2,…,n.dij: distance from the node i to the node j, i,j∈D.qn: demand of the customer node n, and n∈N.Q: rated load capacity of electric vehicles.P: battery capacity of electric vehicles.g: charge coefficient.Pdv1: the residual power of EVs when v reaches the node D.Pdv2: residual electricity of the electric vehicle V leaving node D.p: battery capacity of electric vehicles.h: power consumption coefficient.g: charge coefficient.tfi: if i represents the customer point,tfi represents the service time of electric vehicle at the node i; if i represents the charging stations, then tfi represents the electric vehicle’s power replenishment time, i∈N∪Mtci: single battery change time, and i∈C.twi: waiting time of electric vehicles at the customer node i.tiv: the time point when the vehicle v arrives at the customer node i, where t0v=0ti′v: the start time of the v-car service customer node i.tij: time of electric vehicles from i to j.speed: driving speed of electric vehicles.ei: the lower limit of the best service time windows of the customer node i.li: the upper limit of the best service window of the customer node i.ei′: the lower limit of tolerance time windows of the customer node i.li′: upper limits of tolerance time windows of the customer node i.ρm: unit time penalty cost of vehicles violating the time windows, m = (1, 2, 3, 4).xijv: if the vehicle v is from i to j, then xijv=1, otherwise xijv=0.xov: if the vehicle v returns to the distribution centre after delivering a customer group, then xov=1, otherwise xov=0.yiv: the task of the customer node i is completed by the vehicle v, then yiv=1, otherwise yiv=0.


## 3.2. Model and Method

The objective function is to minimize the comprehensive cost, including transportation cost, vehicle use cost, electricity replenishment cost, and time window penalty cost. The formula of the MILP model is as follows:(1)Fmin=C0∑v∈Vxov+C1∑v∈V∑i∈D∑j∈D,i≠jxijvdij+∑v∈V∑i∈CECitfi+∑v∈V∑i∈Npuitiv.Among them,(2)ECitfi=C2×tfi,tfi≤tci,C3,tfi>tci,(3)puiti′v=ρ1ei′−ti′v+ρ2ei−ei′,ti′v≤ei′,ρ2ei−ti′v,0,ρ3ti′v−li,ρ3li′−li+ρ4ti′v−li′,ei′<ti′v≤ei,ei<ti′v≤li,li<ti′v≤li′,li<ti′v,subject to(4)∑i∈D,k≠ixikv=∑j∈D,k≠jxkjv,k∈D,(5)∑v∈Vynv=1,n∈N,(6)∑n∈Nynvqn≤Q,(7)∑v∈V∑i∈D,i≠0xoiv≤V,(8)∑i∈N∑j∈D,i≠jxijv≤N,(9)t0″=0,(10)tij=dijspeed,i,j∈D,(11)tfi=mintci,P−piv1g,(12)tiv=ti′v+tfi+twi,i∈N,(13)ti′v≥tiv,i∈N,v∈V,(14)tj′=∑i∈D∑j∈D,i≠jxijvti″+tij,(15)piv1=piv2,i∈N,(16)pov1=100,(17)pjv1=piv2−xijv×dijh,i,j∈D,i≠j,v∈V,(18)piv1≥0,i∈D,v∈V,(19)xijv,xov,yiv∈0,1,i,j,o∈D,v∈V.In the model given above, Constraint (4) ensures that the vehicle starts from the distribution centre returns to the distribution centre and focuses on distribution centre. Constraint (5) ensures that each customer is served only once by one vehicle. Constraint (6) is a restraint on vehicle loading. Constraint (7) indicates that the number of EVs serving the customer is less than or equal to the total number of vehicles owned by the distribution centre. Constraint (8) requires that the number of customers served by each vehicle is less than or equal to the total number of customers. Constraint (9) requires that when the electric vehicle starts from the distribution centre, the time is 0. Constraint (10) indicates that the travel time of electric vehicles from the point i to the point j is the ratio of the distance between two points and the travel speed. Constraint (11) indicates that when the electric vehicle passes through the charging stations, the charge replenishment time is the minimum of the battery replacement time and fast charging time. Constraint (12) indicates that the time the electric vehicle leaves the customer node i is the sum of arriving at the customer node, waiting time at the customer node i, and servicing time. Constraint (13) shows the relationship between the starting service time and the arrival time of vehicles at the customer point. Constraint (14) indicates that the time the electric vehicle arrives at the node j is the accumulation of the previous time. Constraint (15) means that neither power consumption nor power replenishment occurs at the customer node i. Constraint (16) indicates that when the electric vehicle starts from the distribution centre, the state of charge is 100. Constraint (17) indicates that the remaining power to node j is equal to the remaining power to leave node i minus the power consumed on the way. Constraint (18) indicates that the state of charge of electric vehicles is nonnegative at any position. Constraint (19) indicates that the decision variable is constrained to 0-1.In this paper, the ant colony algorithm is used to solve the approximate optimal solution of the NP hard problem. The ant colony algorithm has the characteristics of distributed computing, positive information feedback, and heuristic search. In essence, it is a heuristic global optimization algorithm in the evolutionary algorithm. The algorithm imitates the social behaviour of ants in order to find the shortest route from nest to food source. In the ant colony algorithm, each ant performs four basic activities in the process of route construction: (1) select the next customer based on the probable function of the distance from the current location to the customer and the route strength on the arc; (2) save the taboo list of the customers in the current route; (3) update the residual capacity of the vehicle; and (4) update the track intensity on the access arc, and use the method of local search to improve the quality of the solution. Finally, the taboo lists are deleted, and a new iteration is started. When the ant colony algorithm solves the MILP model, the specific steps are as follows:Step 1: importing data and setting basic parameters.Step 2: calculating the distance between customer nodes and the cost and time of distance between customer points.Step 3: initializing and iterating in order to find the best route.Step 4: terminating the algorithm and reporting the best solution.Figure2 shows the traversing process of a single ant in the iterative search for the best route.Figure 2
Single ant traversal process to find the best route during iterative search.The meanings of the mathematical symbols involved in Figure2 are explained as follows:Current: the current location of ants.Allowedk: the collection of client nodes that have not been accessed, initially including all client nodes.Nexti: the set of optional customer nodes when the electric vehicle is in i-node.Pnexti: the collection of optional customer nodes for EV charging closest to i-node.


## 4. Calculation Experiment and Cost Analysis

In order to verify the proposed MILP model, the calculation experiments are carried out based on the known benchmark instances, and the ant colony algorithm is used to solve the model.


### 4.1. Test Examples

The experimental data are from Solomon’s VRPTW standard problem set, and the data number is R101 [29], which is characterized by uniform distribution of customer points and narrow time windows. In this case, a vehicle is generally only responsible for the distribution of several customer points, and the vehicle route cost is greatly affected by the time windows, so the data selection of the case is reasonable. In order to draw a clear road map, this paper only selects the first 26 data, including 1 distribution centre and 25 customer nodes.1 is the distribution centre, 2–26 is the customer node, 27–31 is the charging stations node. The specific parameters of the example are shown in Table 1, and the node information is shown in Table 2.Table 1
Temperature and wildlife count in the three areas covered by the test examples.
NameParameterMaximum loading capacity of vehicles80 piecesUse cost of vehicles1000 RMB/vehicleUnit transportation cost2 RMB/kmSpeed of vehicles40 km/hFull charge at the charging stations60 kWhPower consumption per unit distance1 kWhCost per battery replacement30 RMBBattery replacement time once31 minService time per customer10 minPenalty coefficient of time windows(1, 0.5, 1.5, 2)The customer tolerance level0.5Maximum number of iterations200Table 2
Node information.
NumberX-coordinateY-coordinateDemandReady timeDue date1353500230241491016117133517750604554513116126555201914915961530263444725303991098205058191910439951051055601697107113060161241341220651267771350351963731430252315916915151020324216305816711710201975851853021571671920401287972015601776862145659126136224520116272234510189710724555296878256535315316326652061721822710320023028274700230294030002303050500023031601000230In this paper, according to the actual situation, we made assumptions about the required data in Table1, and for this part of the program design, we reserved a data change area, which is malleable.The MILP model is solved by MATLAB programming. In order to reduce the influence of random factors as much as possible, this paper repeatedly tests the example 10 times to get the total cost optimal solution (C), the number of vehicles (N), route length (L), and penalty cost (P) when the optimal solution is reached.As can be seen from Table3, the optimal solution of this example is 7283.08, including the route length when the optimal solution is reached at 270.61, and Table 4 shows that the optimal allocation scheme includes 4 routes; the route map is shown in Figure 3.Table 3
Related results of the test examples.
Operation timesCNLP17404.184272.082372.1127613.714278.042544.1537764.363262.933814.2947586.944280.752669.4857283.084270.612238.9667567.743258.583629.4677590.473269.973617.0587491.764269.342314.0797603.673271.033724.88107466.963263.063578.25Average7537.293.5269.643050.27Table 4
Sequence of routes when the test examples reaches the optimal solution.
VehicleRoute number11–14–22–23–24–27–9–121–7–6–18–17–15–16–28–19–20–131–3–5–26–25–4–13–28–8–141–2–21–10–11–12–1Figure 3
Corresponding route trajectory when the example reaches the optimal solution.


### 4.2. Cost Analysis

Based on the calculation experiment of the Solomon benchmark example, the sensitivity analysis of the cost affecting the electric vehicle route planning is carried out.


#### 4.2.1. Use Cost and Transportation Cost

First, adjust the use cost from 1000 for each vehicle to 5000 for each vehicle, keep the other parameters unchanged, repeat the test for 10 times, and see Table5 for the results when the optimal solution is reached.Table 5
Impact of adjusting use cost on results.
Operation timesNLP12281.256036.1322275.016646.8132268.506809.4342281.496021.6152280.766722.0762268.626450.8272272.846257.5382274.155855.4192285.666344.63102280.636025.55Average2276.896317.00It can be seen from Table5 that after adjusting the use cost of vehicles from 1000 to 5000, after 10 times of operation, compared with Table 3, the number of vehicles is reduced from 4 to 2, which is 50%. It can be seen that the higher the use cost of vehicles is, the smaller the number of vehicles used is. When the use cost of vehicles is much higher than other costs, the vehicle route distribution scheme with the minimum number of vehicles will be preferred. At the same time, the route length is only increased by 3% compared with the result in Table 3, while the time window penalty is increased by 52%. This is understandable, because the proportion of vehicle use cost in the objective function increases, so the algorithm will tend to find the solution with the minimum vehicle use.Keep the cost of using vehicles at 5000 per vehicle, and adjust the unit transportation cost from 2 to 10, while the penalty factor of time windows remains unchanged. Run the program 10 times, and see Table6 for relevant results when the optimal solution is reached.Table 6
Impact of adjusting use cost and unit transportation cost on results.
Operation timesNLP12281.256524.1822275.016646.8132272.416992.5442281.496021.6152281.236679.2062268.626593.4372272.846257.5382274.156323.0992285.386344.63102280.636025.55Average2277.306440.86It can be seen from Table6 that after adjusting vehicle use cost and unit transportation cost at the same time, the number of vehicles obtained is significantly reduced compared with Table 3. It can be seen that when vehicle transportation cost and use cost are much higher than other costs, the route distribution scheme with the least number of vehicles will be preferred. The route length in Table 6 is similar to that in Table 3, but the penalty cost of time windows is increased by 53%. By increasing the factors of vehicle use cost and unit freight in the objective function, the proportion of time window penalty cost is greatly reduced. Therefore, the length of the route and the number of vehicles are given priority in the result, so the time window penalty is greatly increased. This shows the effectiveness of the algorithm again in this paper.


#### 4.2.2. Time Window Penalty Cost

Adjust the penalty coefficient of the time windows fromρ1=1,ρ2=0.5,ρ3=1.5,andρ4=2 to ρ1=5,ρ2=2.5,ρ3=7.5,andρ4=10, keep other parameters unchanged, repeat the test 10 times, and see Table 7 for the results when the optimal solution is reached.Table 7
Impact of adjusting time window penalty costs on results.
Operation timesNL18279.7727234.7037291.2247245.1556284.2566271.8078265.7986259.4097289.76107267.66Average6.9268.95After the penalty cost coefficient increases 5 times, the calculation results are shown in Table7. The route length is reduced by 0.3% compared with the result in Table 3, but the number of optimal vehicles has increased from 4 to 7, indicated an increase of 75%, and we can see that the number of vehicles has increased significantly. This is understandable, for the change of the penalty cost coefficient increases the penalty cost in the objective function, so the algorithm will tend to find more solutions for vehicles to serve customers. The increase in the number of vehicles will inevitably lead to a decrease in the average driving route length, which proves the effectiveness of the algorithm again. Therefore, the higher the cost of fines is, the more vehicles are required. This has led logistics companies to prepare more vehicles under strict time window conditions, making the customer’s total demand unchanged or even increased.


#### 4.2.3. Electricity Replenishment Cost

The battery capacity is 60 kWh, the charging time needs 60 min, and the power change time is 31 min. The shortest power supply mode is selected. Therefore, when the supplementary power is not more than half, quick charging is preferred. Otherwise, choose the battery replacement strategy. The charging cost per unit time is 1 RMB/min, and the cost of single battery replacement is 30 RMB. Now, the cost of power supply is increasing. The charging cost per unit time is 50 RMB/min, and the cost of single battery replacement is 1500 RMB. The results are shown in Table8, and the vehicle route, when the optimal solution is reached, is shown in Figure 4.Table 8
Impact of adjusted electricity supplement costs on results.
Operation timesNLP14284.153492.1025273.772099.1935272.842372.2045268.242601.6455244.322244.6065251.662644.7774271.033498.7585266.052281.8594281.593563.48105265.552552.16Average4.7267.922735.07Figure 4
Vehicle route at high electricity replenishment cost.It can be seen from Table8 that after the unit charge cost is adjusted from 1 to 50 and the single battery change cost is adjusted from 30 to 1500, after ten runs, compared with Table 3, the number of vehicles increased from 4 to 5 vehicles, indicated an increase of 25%. At the same time, it can be seen that the number of charging stations passed in Figure 3 is 3; however, the number of charging stations passed in Figure 4 is 2. Increased costs have drived companies to choose more vehicles to avoid charging. In addition, compared with Table 3, the route length is reduced by 0.6%, together with the penalty cost is reduced by 10.3%. And the increase in the number of vehicles serving customers leads to a reduction in the possibility of reducing time, penalties, and costs. This proves the effectiveness of the algorithm. Therefore, when the charging facilities are not perfect, together with the power replenishment cost is high, the logistics companies tend to use more vehicles to avoid charging as much as possible.


## 4.1. Test Examples

The experimental data are from Solomon’s VRPTW standard problem set, and the data number is R101 [29], which is characterized by uniform distribution of customer points and narrow time windows. In this case, a vehicle is generally only responsible for the distribution of several customer points, and the vehicle route cost is greatly affected by the time windows, so the data selection of the case is reasonable. In order to draw a clear road map, this paper only selects the first 26 data, including 1 distribution centre and 25 customer nodes.1 is the distribution centre, 2–26 is the customer node, 27–31 is the charging stations node. The specific parameters of the example are shown in Table 1, and the node information is shown in Table 2.Table 1
Temperature and wildlife count in the three areas covered by the test examples.
NameParameterMaximum loading capacity of vehicles80 piecesUse cost of vehicles1000 RMB/vehicleUnit transportation cost2 RMB/kmSpeed of vehicles40 km/hFull charge at the charging stations60 kWhPower consumption per unit distance1 kWhCost per battery replacement30 RMBBattery replacement time once31 minService time per customer10 minPenalty coefficient of time windows(1, 0.5, 1.5, 2)The customer tolerance level0.5Maximum number of iterations200Table 2
Node information.
NumberX-coordinateY-coordinateDemandReady timeDue date1353500230241491016117133517750604554513116126555201914915961530263444725303991098205058191910439951051055601697107113060161241341220651267771350351963731430252315916915151020324216305816711710201975851853021571671920401287972015601776862145659126136224520116272234510189710724555296878256535315316326652061721822710320023028274700230294030002303050500023031601000230In this paper, according to the actual situation, we made assumptions about the required data in Table1, and for this part of the program design, we reserved a data change area, which is malleable.The MILP model is solved by MATLAB programming. In order to reduce the influence of random factors as much as possible, this paper repeatedly tests the example 10 times to get the total cost optimal solution (C), the number of vehicles (N), route length (L), and penalty cost (P) when the optimal solution is reached.As can be seen from Table3, the optimal solution of this example is 7283.08, including the route length when the optimal solution is reached at 270.61, and Table 4 shows that the optimal allocation scheme includes 4 routes; the route map is shown in Figure 3.Table 3
Related results of the test examples.
Operation timesCNLP17404.184272.082372.1127613.714278.042544.1537764.363262.933814.2947586.944280.752669.4857283.084270.612238.9667567.743258.583629.4677590.473269.973617.0587491.764269.342314.0797603.673271.033724.88107466.963263.063578.25Average7537.293.5269.643050.27Table 4
Sequence of routes when the test examples reaches the optimal solution.
VehicleRoute number11–14–22–23–24–27–9–121–7–6–18–17–15–16–28–19–20–131–3–5–26–25–4–13–28–8–141–2–21–10–11–12–1Figure 3
Corresponding route trajectory when the example reaches the optimal solution.


## 4.2. Cost Analysis

Based on the calculation experiment of the Solomon benchmark example, the sensitivity analysis of the cost affecting the electric vehicle route planning is carried out.


### 4.2.1. Use Cost and Transportation Cost

First, adjust the use cost from 1000 for each vehicle to 5000 for each vehicle, keep the other parameters unchanged, repeat the test for 10 times, and see Table5 for the results when the optimal solution is reached.Table 5
Impact of adjusting use cost on results.
Operation timesNLP12281.256036.1322275.016646.8132268.506809.4342281.496021.6152280.766722.0762268.626450.8272272.846257.5382274.155855.4192285.666344.63102280.636025.55Average2276.896317.00It can be seen from Table5 that after adjusting the use cost of vehicles from 1000 to 5000, after 10 times of operation, compared with Table 3, the number of vehicles is reduced from 4 to 2, which is 50%. It can be seen that the higher the use cost of vehicles is, the smaller the number of vehicles used is. When the use cost of vehicles is much higher than other costs, the vehicle route distribution scheme with the minimum number of vehicles will be preferred. At the same time, the route length is only increased by 3% compared with the result in Table 3, while the time window penalty is increased by 52%. This is understandable, because the proportion of vehicle use cost in the objective function increases, so the algorithm will tend to find the solution with the minimum vehicle use.Keep the cost of using vehicles at 5000 per vehicle, and adjust the unit transportation cost from 2 to 10, while the penalty factor of time windows remains unchanged. Run the program 10 times, and see Table6 for relevant results when the optimal solution is reached.Table 6
Impact of adjusting use cost and unit transportation cost on results.
Operation timesNLP12281.256524.1822275.016646.8132272.416992.5442281.496021.6152281.236679.2062268.626593.4372272.846257.5382274.156323.0992285.386344.63102280.636025.55Average2277.306440.86It can be seen from Table6 that after adjusting vehicle use cost and unit transportation cost at the same time, the number of vehicles obtained is significantly reduced compared with Table 3. It can be seen that when vehicle transportation cost and use cost are much higher than other costs, the route distribution scheme with the least number of vehicles will be preferred. The route length in Table 6 is similar to that in Table 3, but the penalty cost of time windows is increased by 53%. By increasing the factors of vehicle use cost and unit freight in the objective function, the proportion of time window penalty cost is greatly reduced. Therefore, the length of the route and the number of vehicles are given priority in the result, so the time window penalty is greatly increased. This shows the effectiveness of the algorithm again in this paper.


### 4.2.2. Time Window Penalty Cost

Adjust the penalty coefficient of the time windows fromρ1=1,ρ2=0.5,ρ3=1.5,andρ4=2 to ρ1=5,ρ2=2.5,ρ3=7.5,andρ4=10, keep other parameters unchanged, repeat the test 10 times, and see Table 7 for the results when the optimal solution is reached.Table 7
Impact of adjusting time window penalty costs on results.
Operation timesNL18279.7727234.7037291.2247245.1556284.2566271.8078265.7986259.4097289.76107267.66Average6.9268.95After the penalty cost coefficient increases 5 times, the calculation results are shown in Table7. The route length is reduced by 0.3% compared with the result in Table 3, but the number of optimal vehicles has increased from 4 to 7, indicated an increase of 75%, and we can see that the number of vehicles has increased significantly. This is understandable, for the change of the penalty cost coefficient increases the penalty cost in the objective function, so the algorithm will tend to find more solutions for vehicles to serve customers. The increase in the number of vehicles will inevitably lead to a decrease in the average driving route length, which proves the effectiveness of the algorithm again. Therefore, the higher the cost of fines is, the more vehicles are required. This has led logistics companies to prepare more vehicles under strict time window conditions, making the customer’s total demand unchanged or even increased.


### 4.2.3. Electricity Replenishment Cost

The battery capacity is 60 kWh, the charging time needs 60 min, and the power change time is 31 min. The shortest power supply mode is selected. Therefore, when the supplementary power is not more than half, quick charging is preferred. Otherwise, choose the battery replacement strategy. The charging cost per unit time is 1 RMB/min, and the cost of single battery replacement is 30 RMB. Now, the cost of power supply is increasing. The charging cost per unit time is 50 RMB/min, and the cost of single battery replacement is 1500 RMB. The results are shown in Table8, and the vehicle route, when the optimal solution is reached, is shown in Figure 4.Table 8
Impact of adjusted electricity supplement costs on results.
Operation timesNLP14284.153492.1025273.772099.1935272.842372.2045268.242601.6455244.322244.6065251.662644.7774271.033498.7585266.052281.8594281.593563.48105265.552552.16Average4.7267.922735.07Figure 4
Vehicle route at high electricity replenishment cost.It can be seen from Table8 that after the unit charge cost is adjusted from 1 to 50 and the single battery change cost is adjusted from 30 to 1500, after ten runs, compared with Table 3, the number of vehicles increased from 4 to 5 vehicles, indicated an increase of 25%. At the same time, it can be seen that the number of charging stations passed in Figure 3 is 3; however, the number of charging stations passed in Figure 4 is 2. Increased costs have drived companies to choose more vehicles to avoid charging. In addition, compared with Table 3, the route length is reduced by 0.6%, together with the penalty cost is reduced by 10.3%. And the increase in the number of vehicles serving customers leads to a reduction in the possibility of reducing time, penalties, and costs. This proves the effectiveness of the algorithm. Therefore, when the charging facilities are not perfect, together with the power replenishment cost is high, the logistics companies tend to use more vehicles to avoid charging as much as possible.


## 4.2.1. Use Cost and Transportation Cost

First, adjust the use cost from 1000 for each vehicle to 5000 for each vehicle, keep the other parameters unchanged, repeat the test for 10 times, and see Table5 for the results when the optimal solution is reached.Table 5
Impact of adjusting use cost on results.
Operation timesNLP12281.256036.1322275.016646.8132268.506809.4342281.496021.6152280.766722.0762268.626450.8272272.846257.5382274.155855.4192285.666344.63102280.636025.55Average2276.896317.00It can be seen from Table5 that after adjusting the use cost of vehicles from 1000 to 5000, after 10 times of operation, compared with Table 3, the number of vehicles is reduced from 4 to 2, which is 50%. It can be seen that the higher the use cost of vehicles is, the smaller the number of vehicles used is. When the use cost of vehicles is much higher than other costs, the vehicle route distribution scheme with the minimum number of vehicles will be preferred. At the same time, the route length is only increased by 3% compared with the result in Table 3, while the time window penalty is increased by 52%. This is understandable, because the proportion of vehicle use cost in the objective function increases, so the algorithm will tend to find the solution with the minimum vehicle use.Keep the cost of using vehicles at 5000 per vehicle, and adjust the unit transportation cost from 2 to 10, while the penalty factor of time windows remains unchanged. Run the program 10 times, and see Table6 for relevant results when the optimal solution is reached.Table 6
Impact of adjusting use cost and unit transportation cost on results.
Operation timesNLP12281.256524.1822275.016646.8132272.416992.5442281.496021.6152281.236679.2062268.626593.4372272.846257.5382274.156323.0992285.386344.63102280.636025.55Average2277.306440.86It can be seen from Table6 that after adjusting vehicle use cost and unit transportation cost at the same time, the number of vehicles obtained is significantly reduced compared with Table 3. It can be seen that when vehicle transportation cost and use cost are much higher than other costs, the route distribution scheme with the least number of vehicles will be preferred. The route length in Table 6 is similar to that in Table 3, but the penalty cost of time windows is increased by 53%. By increasing the factors of vehicle use cost and unit freight in the objective function, the proportion of time window penalty cost is greatly reduced. Therefore, the length of the route and the number of vehicles are given priority in the result, so the time window penalty is greatly increased. This shows the effectiveness of the algorithm again in this paper.


## 4.2.2. Time Window Penalty Cost

Adjust the penalty coefficient of the time windows fromρ1=1,ρ2=0.5,ρ3=1.5,andρ4=2 to ρ1=5,ρ2=2.5,ρ3=7.5,andρ4=10, keep other parameters unchanged, repeat the test 10 times, and see Table 7 for the results when the optimal solution is reached.Table 7
Impact of adjusting time window penalty costs on results.
Operation timesNL18279.7727234.7037291.2247245.1556284.2566271.8078265.7986259.4097289.76107267.66Average6.9268.95After the penalty cost coefficient increases 5 times, the calculation results are shown in Table7. The route length is reduced by 0.3% compared with the result in Table 3, but the number of optimal vehicles has increased from 4 to 7, indicated an increase of 75%, and we can see that the number of vehicles has increased significantly. This is understandable, for the change of the penalty cost coefficient increases the penalty cost in the objective function, so the algorithm will tend to find more solutions for vehicles to serve customers. The increase in the number of vehicles will inevitably lead to a decrease in the average driving route length, which proves the effectiveness of the algorithm again. Therefore, the higher the cost of fines is, the more vehicles are required. This has led logistics companies to prepare more vehicles under strict time window conditions, making the customer’s total demand unchanged or even increased.


## 4.2.3. Electricity Replenishment Cost

The battery capacity is 60 kWh, the charging time needs 60 min, and the power change time is 31 min. The shortest power supply mode is selected. Therefore, when the supplementary power is not more than half, quick charging is preferred. Otherwise, choose the battery replacement strategy. The charging cost per unit time is 1 RMB/min, and the cost of single battery replacement is 30 RMB. Now, the cost of power supply is increasing. The charging cost per unit time is 50 RMB/min, and the cost of single battery replacement is 1500 RMB. The results are shown in Table8, and the vehicle route, when the optimal solution is reached, is shown in Figure 4.Table 8
Impact of adjusted electricity supplement costs on results.
Operation timesNLP14284.153492.1025273.772099.1935272.842372.2045268.242601.6455244.322244.6065251.662644.7774271.033498.7585266.052281.8594281.593563.48105265.552552.16Average4.7267.922735.07Figure 4
Vehicle route at high electricity replenishment cost.It can be seen from Table8 that after the unit charge cost is adjusted from 1 to 50 and the single battery change cost is adjusted from 30 to 1500, after ten runs, compared with Table 3, the number of vehicles increased from 4 to 5 vehicles, indicated an increase of 25%. At the same time, it can be seen that the number of charging stations passed in Figure 3 is 3; however, the number of charging stations passed in Figure 4 is 2. Increased costs have drived companies to choose more vehicles to avoid charging. In addition, compared with Table 3, the route length is reduced by 0.6%, together with the penalty cost is reduced by 10.3%. And the increase in the number of vehicles serving customers leads to a reduction in the possibility of reducing time, penalties, and costs. This proves the effectiveness of the algorithm. Therefore, when the charging facilities are not perfect, together with the power replenishment cost is high, the logistics companies tend to use more vehicles to avoid charging as much as possible.


## 5. Conclusions

At present, most of the literature studies use a charging strategy, and the customer tolerance is not considered while studying the customer time windows. In this paper, the charging strategy of combining two charging ways is adopted, the broken line soft time windows is used considering the customer tolerance, and the MILP model of the EVRPTW is finally established. And through the calculation experiment of the Solomon benchmark example, the cost of affecting the route optimization of electric vehicle is analysed, the availability as well as effectiveness of data and algorithm are proved, and the management opinions on the practical application of MILP model are put forward.(1)
The higher the use cost and freight of vehicles are, the less the number of vehicles used. When the use cost and freight of vehicles are much higher than other costs, the vehicle route distribution scheme with the least number of vehicles is preferred.(2)
The higher the penalty cost of time windows is, the higher the number of vehicles used for vehicle distribution is. In the case of strict time windows, logistics companies need to prepare more vehicles than the total demand of customers.(3)
Logistics companies tend to use more EVs to avoid charging as much as possible when charging facilities are not perfect and the cost of power supply is high.The model can help the logistics enterprises provide some suggestions for the route optimization, help to promote the application of EVs in the field of logistics, and improve energy efficiency, energy conservation, and emission reduction. The proposed MILP model is helpful to reduce the logistics cost. However, the traditional shortcomings of VRP still exist in the EVRPTW model. For example, it is still a NP-hard, and it is difficult to solve large-scale problems. The focus of future research may be to developing more effective heuristic algorithm to solve large-scale problems, consider the real-time changes of traffic conditions, and expand the direction of the dynamic vehicle route.



---

*Source: 5612872-2020-05-20.xml*