Integrated Optimization of Routing and Energy Management for Electric Vehicles in Delivery Scheduling

: At present, electric vehicles (EVs) are attracting increasing attention and have great potential for replacing fossil-fueled vehicles, especially for logistics applications. However, energy management for EVs is essential for them to be advantageous owing to their limitations with regard to battery capacity and recharging times. Therefore, inefﬁciencies can be expected for EV-based logistical operations without an energy management plan, which is not necessarily considered in traditional routing exercises. In this study, for the logistics application of EVs to manage energy and schedule the vehicle route, a system is proposed. The system comprises two parts: (1) a case-based reasoning subsystem to forecast the energy consumption and travel time for each route section, and (2) a genetic algorithm to optimize vehicle routing with an energy consumption situation as a new constraint. A dynamic adjustment algorithm is also adopted to achieve a rapid response to accidents in which the vehicles might be involved. Finally, a simulation is performed to test the system by adjusting the data from the vehicle routing problem with time windows. Solomon benchmarks are used for the validations. The analysis results show that the proposed vehicle management system is more economical than the traditional method.


Introduction
Fossil energy consumption by vehicles has increased significantly over the past decades, leading to ever-worsening environmental pollution [1]. Some densely populated cities, such as Tokyo, Beijing, and Shanghai have strict policies to control the increase in fossil-fueled vehicles. City managers are also establishing suitable policies to support electrical vehicles (EVs) in urban freight transport [2,3]. EVs play an important role in replacing traditional fossil-fueled vehicles worldwide, particularly in logistics applications. For example, Amazon is procuring 100,000 EVs and plans to deploy them in their package delivery system by 2021 [4]. Mathematical modeling has also been proposed for EVs to explore the relationship between the delivery costs and sustainability impact [5].
Energy management is essential for EVs because of their limited battery capacity and specific recharging times [6]. Fully charging an EV takes much longer than refueling a traditional vehicle, and fully charged EVs cannot travel as far as fossil-fueled trucks with full fuel tanks. Therefore, recharging stops for EVs should be incorporated into route planning as an additional consideration [7]. Thus, it is necessary to develop a new vehicle routing model for EVs that determines both the shortest possible route and the best energy management strategy.
The vehicle routing problem (VRP) involves planning for vehicles to deliver and collect goods or people. The classical VRP is defined as a single depot with route length constraints [8]. Several variants of this classical problem have been studied, including the vehicle routing problem with time windows (VRPTW), because real-life cases are more complex than theoretical problems [9]. VRPTW is a problem in which every customer must start within a given time window (a, b), with the vehicle arriving before a and waiting until the customer becomes available. However, arrivals after b are prohibited. In the case of a fixed-sized fleet, finding a feasible solution to the VRPTW itself is a non-deterministic polynomial complete (NPC) problem. As a result, research on VRPTW has focused on heuristics [10]. The electric vehicle routing problem (EVRP) is an extension of the VRP that considers the use of EVs in the logistics distribution. Most studies on EVRP have focused on changes in the EV model; however, the changes brought by the new technologies should also be considered.
New technologies make logistics more transparent. Global positioning systems (GPS), sensors, mobile communication, and radio frequency identification (RFID) techniques can be used to record various types of data regarding delivery vehicles. Energy consumption can be forecasted using these technologies, albeit with some inaccuracies, and furthermore some emergent situations can be detected. The method to optimize the vehicle schedule also needs to be improved to ensure that vehicle schedules can be changed in real time.
The main gap in current studies is the lack of consideration of many factors that affect energy consumption and can be monitored when building the EV energy model. In this study, the objective is to develop a new model that considers both the optimal route and new energy management strategies for EVs. Therefore, a new energy management system is proposed for EVs based on the VRPTW model to solve the aforementioned challenges.
The proposed system has two functions: first, recording historical energy consumption and forecasting future energy consumption; and second, applying a genetic algorithm (GA) to optimize vehicle scheduling using forecast energy consumption. The proposed system also alerts operators to emergencies in real time, helping operators make timely interventions.
This study is organized as follows: Section 2 briefly reviews previous research on optimization algorithms for vehicle scheduling problems and systems for energy management. In Section 3, the entire framework for the proposed system is introduced, and a method for forecasting the vehicle energy consumption is described. A new problem model is built for EVs using the predicted energy consumption; and a GA is used to prepare the vehicle schedule. Section 4 discusses the simulation, results, and performance of the proposed system. Section 4 presents the research conclusions and provides an outlook for future work.

Literature Review
Vehicle schedule management is a classical VRP. Researchers VRPs have studied various VRP. Alba and Dorronsoro solved the classical VRP using a cellular GA combined with a specialized local search method [11]. Tarantilis and Kiranoud developed a generalized route construction algorithm to find the optimal solution for the distribution of perishable products and ready-mixed concrete for construction companies [12]. Hwang developed a GA-TSP model by improving the GA to solve a typical VRPTW [13]. Ho and Haugland presented a tabu search heuristics method for the split delivery vehicle routing problem with time window (SDVRPTW), which considers that more than one vehicle can provide service to a customer [14]. Cheung et al. developed a mathematical model that can be used in monitoring systems for dynamic fleet management, which uses dynamic data such as vehicle locations, traveling time, and incoming customer orders [15]. These methods built a research basis for the EVRP.
Regarding EVRP research, Conrad and Figliozzi were the first to extend the traditional VRP to EVRP. They proposed a model that assumes that EVs in a fleet are allowed to recharge at certain customer locations [16]. Juan et al. proposed the use of metaheuristics and heuristics as the most efficient way to deal with VRPs [17]. Zuo et al. considered a concave, nonlinear charging function as a new energy consumption model for the EVRP [18]. Zhang et al. suggested an EV battery swap station (BSS) location-routing problem with stochastic demands to determine a minimum cost scheme. EVRP with BSSs includes the optimal number and location of BSSs in an efficient route plan based on stochastic customer demands [19]. Keskin et al. presented a two-stage simulation-based heuristic using adaptive large neighborhood searches (ALNSs) for an electric vehicle routing problem with a time window (EVRPTW) that considers whether the waiting time at the stations is longer than expected [20]. Napoli et al. discussed the issue of the production of electricity required for EVs to carry out daily missions [21]. Ferro et al. developed a new mixedinteger programming model for the EVRP and used the CPLEX solver [22]. Xiao et al. investigated an EVRPTW that included the energy and electricity consumption rates (ECR) per unit distance traveled as a function of speed and load; this problem is referred to as EVRPTW-ECR. A mixed-integer linear programming model was developed for the EVRPTW-ECR [23]. Afroditi et al. developed a comprehensive mathematical formulation with multiple constraints owing to capacity limitations, time window restrictions, and the vehicle's predefined charging level to model EVRP [24]. Kancharla and Ramadurai proposed a three-index formulation for an EVRP with nonlinear charging, load-dependent discharging, and an ALNS algorithm to solve the problem with capacitated charging stations [25]. Zhang et al. applied the ant colony algorithm to EVRP to minimize energy consumption [26]. Lin et al. presented a general EVRP and determined an optimal routing strategy that minimizes travel time, energy costs and the number of EVs dispatched. This is the first EVRP model to consider the effect of vehicle load on battery consumption [27]. Soysal et al. proposed a chance-constrained mixed-integer nonlinear programming model and a linear approximation for the pick-up and delivery problem with EVs under the stochastic battery depletion assumption [28]. Raeesi and Zografos introduced an alternative to intra-route recharging of electric commercial vehicles used for freight distribution by utilizing new pertinent technological developments that enable mobile battery swapping. They further proposed a methodology for the exact evaluation of each given solution in the context of EVRPTW [29]. Jie et al. presented a two-echelon capacitated electric vehicle routing problem with battery swapping stations (2E-EVRP-BSS) to determine the delivery strategy that considers battery driving range limitations for deliveries within metropolitan areas most effectively. An integer programming formulation and a hybrid algorithm that combines column generation and adaptive large neighborhood search (CG-ALNS) were proposed to solve this problem [30].
In addition to the aforementioned studies that used different models to calculate specific energy consumption values, other studies have considered energy consumption as an uncertainty factor for the EVRP. For example, Zhang et al. used fuzzy numbers to denote service time, battery energy consumption, and travel time inconsistencies, and applied fuzzy theory to solve the EVRPTW [31]. Pelletier et al. proposed a robust optimization framework to consider inconsistencies in the context of an EVRP. Furthermore, a two-phase heuristic method based on a large neighborhood search was used to solve larger instances of the problem. Several numerical tests were conducted to assess the effectiveness of the proposed methodology [32]. Notably, the energy consumption and traveling time must be considered because of the difficulties involved in predicting the energy consumption.
The main difference between the traditional VRP and EVRP is that the latter considers energy consumption in its model. For energy management, Basso et al. proposed a method for calculating the energy cost coefficients of a road network. These coefficients embed information regarding road topography, vehicle speed, power train efficiency, and the effects of acceleration and braking at traffic lights and intersections. Using this method, an accurate energy consumption estimation can be obtained [33]. Kessler and Bogenberger analyzed the existing energy consumption models [34]. Alqahtani and Hu developed an integrated VR and energy scheduling decision model to adaptively dispatch vehicles to balance temporally and spatially distributed energy requests. This model considers vehicle mobility constraints to maximally exploit the potential of mobile prosumer networks for cost savings and carbon emission reductions [35].
Based on these previous studies, it is difficult to accurately predict energy consumption. Multiple factors exist apart from the vehicle and the traveling distances that affect energy consumption including the weather, road conditions, and driver behavior. The effects of factors such as the number of starts and stops at intersections and traffic lights, and the speed dropping below a certain threshold must also be considered for dynamic traffic information. Consequently, a case-based reasoning (CBR) system is considered to forecast the energy consumption and travel time.
For research on the CBR system, Shen et al. built an approximate CBR model that uses neural network technology to process fuzzy inference with the dualities of fuzzy logic and approximate reasoning [36]. The main characteristic of this system is its ability to solve new problems by using the results of past cases, which is similar to the current models.
Sadek et al. proposed a prototype CBR system that can create routes for real-time freeway traffic. The results of the aforementioned study indicated the successful generation of high-quality solutions using case-bases of reasonable sizes in real time [37]. Moreover, it could automatically update the case-bases by modifying the coefficients. For instance, Anthony and Xun successfully dealt with planning problems in development control using a developed CBR system. The system helped the user make decisions for new cases by recycling similar previous cases [38]. Passone et al. incorporated an expert database into a GA that was implemented for the CBR adaptation phase. The proposed system is suitable for numerical modeling applications [39]. Maria and Maite proposed retention and forgetting strategies to add and remove cases, with strategies that automatically update the case-base of a CBR system and maintain it at a certain scale. The results showed that the case-base was effectively maintained by the proposed strategies [40]. Castro et al. developed a fuzzy CBR system to solve the risk problems. The fuzzy algorithm helped the CBR system use the most suitable case in the case base instead of the most similar one [41].

Vehicle Management System
With the emerging sensor and mobile communication techniques, vehicle status and environmental factors can be immediately determined and transmitted to back-end management systems. However, it is difficult to predict accurate values of energy consumption and travel time through mathematical formulations as many factors can affect the results. Therefore, a CBR system can be developed to obtain a range of values and apply the static method to obtain a conservative result for further optimization of the vehicle schedule. Figure 1 illustrates the framework of the proposed system. This system has two subsystems: a CBR system and an optimization system. The CBR system is used to estimate the energy consumption and travel time for each delivery task. By combining the static optimization, an amplification parameter is first determined; then the energy consumption and traveling time for the calculation are obtained and output to the optimization system. With this information, the optimization system optimizes the schedule for the vehicles and the company then follows the schedule. The optimization system adjusts the schedule using heuristics if the real-time monitoring system detects abnormal situations.

CBR System Architecture
In the proposed vehicle scheduling system, a CBR system is incorporated to forecast the energy consumption and travel time. The system architecture is illustrated in Figure  2. The system is composed of two parts. The first part is the route division. It separates the planned route into several segments. Route segmentation simplifies finding the same route from the case base. If the exact same route does not exist in the database, then fuzzy logic and CBR are used to select the most similar one. The second part of the system is the calculation part. The CBR is applied to calculate the time of each route's small segment. Neural network theory is applied to train the weightings of the CBR; rule-based strategies are then used to update the case base in the final step.
Compared with the traditional CBR system, the proposed system integrates fuzzy logic and neural network techniques. Consequently, the system is much more intelligent. The case base automatically updates itself. If the deviation between the estimated and the actual traveling result is considerable, the weightings will be trained using the neural network and the existing case will be replaced.

CBR System Architecture
In the proposed vehicle scheduling system, a CBR system is incorporated to forecast the energy consumption and travel time. The system architecture is illustrated in Figure 2. The system is composed of two parts. The first part is the route division. It separates the planned route into several segments. Route segmentation simplifies finding the same route from the case base. If the exact same route does not exist in the database, then fuzzy logic and CBR are used to select the most similar one. The second part of the system is the calculation part. The CBR is applied to calculate the time of each route's small segment. Neural network theory is applied to train the weightings of the CBR; rule-based strategies are then used to update the case base in the final step.
Compared with the traditional CBR system, the proposed system integrates fuzzy logic and neural network techniques. Consequently, the system is much more intelligent. The case base automatically updates itself. If the deviation between the estimated and the actual traveling result is considerable, the weightings will be trained using the neural network and the existing case will be replaced.

Weighting Design
Weightings are used to calculate the degree to which cases match in the case-base in the CBR system. A database is designed to save the weight coefficients of all factors that affect the process of degeneration. The design of the database for traveling time estimation is shown in Table 1, while the database design for energy consumption is shown in Table 2.
Different data types exhibit different weightings (w i ), with the weightings satisfying the following constraints: The vehicles will provide the information listed in Tables 1 and 2 to the back-end system when they have completed their delivery tasks. The system stores the data in the case base and produces a new case identification number for the data.
When the system begins to estimate the traveling time and energy consumption, it first searches in the case base. If the data of the unsolved problem matches the data of a case in the case base, the system records the value of x i as 1 in the blank space of the match degree. Then, it multiplies the match degree with the weighting of this type of data (w i × x i ) to produce the result. The system summates all calculation results for all types of data belonging to the case. The sum (M) is obtained as the case degree, which matches the problem that needs to be solved.
where M indicates the match degree of the case matches to the problem.
The system chooses the data with the highest match degree in the database for all cases of the same route and then uses the case's time or energy consumption as the predicted result for the matching segment after calculating the results. The sum of the times or energies needed for all segments is the time or energy consumption required for the vehicle to arrive at the destination. If the match degree of a case to the problem is less than c (c is a coefficient, which can be adjusted based on real conditions by users), the deviation of the most similar existing route segments under the conditions of the best-matched case and of the unsolved problem will be calculated. The deviation ratio of the distance is the deviation ratio of the route segment of the problem and the most similar case. Then, the result can be calculated using Equation (4): where t is the traveling time for the route segment of the problem, t s is the traveling time for the most similar case, E is the energy consumption for the route segment of the problem, E s is the energy consumption for the most similar case, L is the length of the route segment for the problem, and L s is the length of the route for the most similar case. Finally, the total energy consumption and the time spent for each segment are the energy and time needed for delivery, respectively.

Case Update
The factors that affect logistics are constantly changing and developing. With the development of new vehicles, changes in the transportation infrastructure, and the amount of traffic in a city, the time needed to travel or the energy consumed between the same starting point and destination under the same conditions will change. Thus, the results of the cases in the database are not applicable to new cases. Consequently, the database should be updated once the deviation becomes more pronounced. The method is as follows: First, the system checks whether the segment in the case-base is the most similar route to the problem; if it is, the case-base stores the actual result of the segment as a new case. If the new case is more similar to the previous case, for which M = 1, the new case will replace the previous case. The system trains the weighting of the case when the results are different. If M = 1, the case base also adds a new case. The case base is updated according to the following rules: Rule 1: If the segment in the case-base is the same as the actual segment then go to Rule 2.
Rule 2: If the match degree is not less than c, go to Rule 3; otherwise, go to Rule 4.

Weight Training
In the proposed CBR system, the result is calculated from the weight of each factor in a case w i . In some cases, the weights in the database are incorrect. Therefore, it is necessary to apply a neural network to train the weights. The details are as follows: X = {x 1 , x 2 , . . . , x n } is a set of n vectors, where the components of each vector represent the match degree of a case with w i as the coefficient, the value of which is determined by specific segments. The different segments have different sets of w i . A single-layer neural network is applied to train the weightings [42].
Step 1: Initialization Set initial weights w i and threshold θ as random numbers.
Step 2: Activation Activate the perceptron by applying inputs x i (q) and the desired output Y d (q), which is the actual traveling time. The actual output at iteration q = 1 is calculated.
where n is the number of perception inputs and Equation (5) is a step activation function.
Step 3: Training Update the weights of the perceptron where ∆w i (q) is the weight correction at iteration q.
The weight is corrected based on the delta rule: Step 4: Iteration Increase p by 1, return to Step 2, and repeat the process until convergence. Then, w i can be determined.

Amplification Coefficient
In this study, the uncertainties of the predicted time and energy consumption are considered. Therefore, an amplification coefficient is used to ensure that the arrival time of the product will be within an acceptable time window and to prevent the vehicle from running out of energy while it is in use.
The CBR has two outputs: the estimated time and the match degree. An amplification coefficient A is created by considering these two factors.
where c is a coefficient that can be adjusted based on practical situations, experiments, and simulation results. M represents the match degree of the most similar case. Figure 3 shows the relationship between A and M. Then, the estimated traveling time t is adjusted to t : The estimated energy consumption E is adjusted to E : Energies 2021, 14, x FOR PEER REVIEW 9 of 19

Model of Problem
The recharging of EVs in a charging station during a delivery is considered neither in the proposed model nor in most other EVRPTWs. Therefore, the vehicle can only be charged in the depot, in the proposed system. There are two reasons for this design. First, in most countries, recharging stations for EVs are not common; hence, it is possible that there are no recharging stations on the delivery route. Second, current batteries can last longer than previous batteries owing to the improved EV designs. For example, Tesla states that its electric trucks can travel 800 km between successive charges. Other commercial electrical trucks can travel as much as 400 km between charges. This distance is normally sufficient for the daily tasks of a delivery truck. In the future, a solution will

Model of Problem
The recharging of EVs in a charging station during a delivery is considered neither in the proposed model nor in most other EVRPTWs. Therefore, the vehicle can only be charged in the depot, in the proposed system. There are two reasons for this design. First, in most countries, recharging stations for EVs are not common; hence, it is possible that there are no recharging stations on the delivery route. Second, current batteries can last longer than previous batteries owing to the improved EV designs. For example, Tesla states that its electric trucks can travel 800 km between successive charges. Other commercial electrical trucks can travel as much as 400 km between charges. This distance is normally sufficient for the daily tasks of a delivery truck. In the future, a solution will need to be considered for the charging problem.
The schedule problem can be defined on a direct graph G = (V, A), where A is the set of arcs and V = {1,2, . . . , v} is the set of destination locations. Furthermore, A m is the set of arcs of vehicle m. For any i → j ∈ A , let t ij denote the normal adjusted traveling time from destination i to destination j, let e ij denote the energy consumption from destination i to destination j, and let d ij denote the distance from destination i to destination j. All the vehicles start from the same distribution center, called the depot. Set k as the available vehicles, where vehicle m has the capacity C m and full energy E m . Set p m as the cost of vehicle m running at 1 km. Set f m as the fee for using vehicle m, which includes the driver salary and depreciation cost of the vehicle. There are n products that must be delivered. In this problem, a vehicle is only allowed to deliver product i in a given time window [a i , b i ], which means that the destination only handles the consignment after a i and before b i . A vehicle is only allowed to arrive at the distribution center before a i , but the vehicle can wait until the destination becomes available; however, but arrivals after b i are not allowed. Set s i as the service time for product i. Set w as the weight of product i. The duration for which the destinations are open is defined as [a, b].
The objective function of the problem is stated as follows: Each vehicle's schedule is subject to the following constraints: where b j denotes the latest time for product j. This means that the vehicle must arrive before the upper time of the time window for destination j.
This formula is used to calculate the ready time that the vehicle can leave the destination j.
where W k denotes the weight of product k in vehicle m. This means that the total weight of the products must be less than the capacity of vehicle m.
This means that the total energy consumption by vehicle m must be less than its energy capacity.
A GA is applied to solve this problem. A specific method can be found in reference [43]. In the algorithm, the chromosome string is composed of the serial number of the products, where a gene means a product and its order means an arrangement order. The initial population was randomly selected. A selection factor was set to select the parents using the roulette wheel. It also contains a mutation operation to prevent the population from becoming trapped in local optimization. Subsequently, a new generation was produced. Equation (12) is a fitness function that is used to evaluate the arrangement performance. This process is repeated. After each iteration, the best solution is obtained. When the number of iterations reaches the stopping number or time reaches the stopping time, the vehicle schedule is arranged using the best result.

Dynamic Adjustment
Three situations are considered for dynamic adjustment: traffic jams, environmental changes, and urgent consignments.

Traffic Congestion and Vehicle Problem
It is difficult to forecast traffic situations and vehicle accidents. If the monitoring system finds a truck stuck in a traffic jam or in need of maintenance, it will check whether the current estimated delivery time will exceed the latest starting time of the delivery or whether the remaining energy is sufficient to complete all deliveries. If the system finds that some products cannot be delivered within their corresponding time windows or that the vehicle's energy will be insufficient, the system will remove the deliveries from the original schedule of the vehicle and reassign them.

Environmental Effects
Some products are sensitive to certain environmental conditions. Changes in factors such as temperature, humidity, and concentration of dangerous gases strongly affect the quality of these products. If there are problems with environmental factors in a vehicle, the consignments in the vehicle are removed from the original schedule by the system and reincorporated into the schedule.

New Urgent Tasks
If there are any urgent products arriving after the static optimization, dynamic optimization is applied to ensure that these products can be incorporated into the original schedule.
The three aforementioned situations, as well as some other situations, can be handled by incorporating deliveries into the original schedule, but the parameters of the problem need to be adjusted. The methods used to handle such situations would be the same. The method shown in Figure 4 is described in detail in reference [43]. Subsequently, a new schedule is generated.

Simulation
Solomon benchmark problems were employed for the simulation to test the proposed system. The data can be obtained from http://w.cba.neu.edu/~msolomon/problems.htm (Accessed on 7 October 2020). Because of a lack of energy data for EVs in the Solomon database, only time was considered in the simulation. For the CBR system, a normal distribution was used to build the traveling time model. Because the traveling time of each issue was independent, it obeyed a normal distribution. The model was used to simulate the traveling time. The expected value and variance were related to the results

Simulation
Solomon benchmark problems were employed for the simulation to test the proposed system. The data can be obtained from http://w.cba.neu.edu/~msolomon/problems.htm (Accessed on 7 October 2020). Because of a lack of energy data for EVs in the Solomon database, only time was considered in the simulation. For the CBR system, a normal distribution was used to build the traveling time model. Because the traveling time of each issue was independent, it obeyed a normal distribution. The model was used to simulate the traveling time. The expected value and variance were related to the results of the case archived from the CBR system. The model was built as follows: The probability density function of the normal distribution is As shown in Equation (17), the normal distribution has two variables: µ and σ. In this model, the estimated time can be set as µ, and where c represents a coefficient that can be adjusted, and M represents the match degree of the most similar case. Based on the 3σ rule, which states that for a normal distribution, nearly all values lie within three standard deviations of the mean, the amplification coefficient A can be set based on Equation (19): For this problem, the traveling time is assumed to follow a normal distribution between the two distribution centers and between each distribution center and the depot. The corresponding amplification coefficient is obtained from the data of the CBR system A ij (i, j ∈ A; i = j). Subsequently, t ij can be calculated. With the calculated result, the GA is used for further optimization. Table 2 shows an example of some cases between the depot and the two distribution centers in the case base. From the data, µ = 15.25D = σ 2 = 1.337, and σ = 1.156 can be obtained. The amplification coefficient can be calculated as follows:A 02 = µ+3σ µ = 1.227, t 02 = A 02 · µ 02 = 18.718. Then, t 02 is used as the new traveling time between the depot and Point 2 for the Solomon benchmark problem to test the optimization method. The traveling times between points are calculated using the same method. The calculated traveling time replaces the original time in the Solomon benchmark problem for optimization. Subsequently, the GA is applied. For the GA, the population size is set as 500, p c is set as 0.8, p m is set as 0.03, and the maximum Gen is set as 3000. The cost unit p = 1, the loading of the vehicle q = 200, the penalty for waiting p e = 1, and the penalty for late arrival p l = 10. The running results of R101 in the Solomon benchmarks and the optimal route are shown in Table 3 and Figure 5.
The main objective of the tests is to compare the performance for certain and uncertain times. Table 4 shows the results of the optimized cost for the R101 problem. Then, the real conditions are simulated. After implementing the optimal schedule, a random traveling time is generated following the normal distribution of the cases in the case base. This may cause schedules with a certain time to not satisfy the time requirement. Then, a penalty is added to the cost. The results are listed in Table 5. The results show that the real cost considering uncertain time is less than the cost that only considers a certain time.    As mentioned before, the Solomon benchmark has three types of problems. The serial numbers begin with C, R, and RC respectively. For the cases that begin with C, the points can be divided into clusters according to their locations. For the cases that begin with R, the time windows are narrow. For the cases that begin with RC, the locations of the points can be divided into clusters, and the time windows are narrow. Therefore, three groups of ten tests were conducted. From the results shown in Tables 4, 6, and 7, for the original schedule, the cost for a certain time is better than that for an uncertain time. This is because the traveling time for a certain case uses the time for an average number of cases, which is less than the traveling time in uncertain cases, and it can arrange fewer vehicles and incur less cost. However, ideal cases do not occur in reality. Real conditions may cause schedules with a certain time to not satisfy the time requirement, and a penalty will be produced. Therefore, after the simulation, the situation is different. Regardless of the type of problem, the results show that the real cost considering uncertain time is less than the cost that only considers a certain time. This can be observed from Tables 5, 8, and 9. The Solomon benchmark has three types of problems. Simulations are conducted for C101 and RC 101. The results of the initial costs are presented in Tables 6 and 7.  Tables 8 and 9 present the data after the implementation of the schedule. The schedules considering uncertain time are better for these two types of problems.  Finally, the conclusions are summarized. Considering the uncertainty of the factors, including energy consumption and travel time, will be more suitable to reality. The final result is the most cost-saving solution.

Conclusions
In summary, a new EV schedule management system was presented. The system consists of two parts.
(1) The forecasting system obtains a set of fuzzy data, in which the CBR is applied to forecast the time and energy consumption. The proposed CBR system includes a case-base design, weight training, and case updates. For weight training, an ANN is incorporated into the algorithm design. Additionally, considering the development of cities, case base updates are also included in the system design. The main innovation of the system is that an amplification coefficient that complies with the match degree is proposed, which will also be used in the second part of the system. An amplification coefficient is generated to guarantee that the vehicle can complete the tasks in the allotted time without running out of energy.
(2) The optimization process with a GA and hybrid heuristic method is applied to optimize the vehicle schedule. In this process, the amplification coefficient was considered; if there are any abnormal situations, dynamic adjustment can be performed.
Finally, a simulation was conducted to prove that the consideration of uncertain times and energy could effectively reduce delivery loss and cost. The Solomon benchmark problem was used to test the system. The results showed that, in the beginning, the cost of the proposed system was higher than that of a traditional system. However, the proposed system could effectively decrease the occurrence of default issues, which would affect the reputation of a company.
This study built a new energy management and vehicle routing model for EVs. In the model, the energy consumption and travelling time can be forecasted by CBR system and adjusted for further processed. With the result a more reasonable and reliable routing can be made for EVs. With the help of the model, companies can manage EVs' schedule more effective in logistics.
In future work, the system would be deployed in a logistics company to collect real data to perfect the proposed model and CBR system. For EVs, the factors that affect battery life are limited to the theoretical part (at least for now). However, in the real world, there may be some other factors that have not been considered previously, such as road situations and driver behaviors. Scholarship Council (CSSA) and technical support from Michigan State University. We would like to thank the anonymous reviewers very much, as their comments and suggestions were very helpful in this paper's revision.

Conflicts of Interest:
The authors declare no conflict of interest.