An Efﬁcient Detour Computation Scheme for Electric Vehicles to Support Smart Cities’ Electriﬁcation

: Achieving carbon-neutral transportation is the ultimate goal of the ongoing joint efforts of governments, policy-makers, and the transportation research community. Electriﬁcation of smart cities is a very important step towards the above objective; therefore, accelerating the adoption and widening the use of Electric Vehicles (EVs) are required. However, to achieve the full potential of EVs, ground-breaking detour computation and charging station selection schemes are needed. To this end, this paper developed a new scheme that ﬁnds the most suitable detour/route for an EV whenever an unexpected event occurs on the road. This scheme is based on A* and uses an original, Simple-Additive-Weighting (SAW)-based, charging station selection method. The performance evaluation carried out using the open-source trafﬁc simulation platform SUMO under a grid map, as well as a real road network map highlighted that our scheme ensured more than 99% of EVs will reach their destination within a reasonable time even if a battery recharge is needed. This is a signiﬁcant improvement compared to the baseline scheme that uses the A* only.


Introduction
Electric Vehicles (EVs) are on the rise, and electricity is slowly becoming the primary fuel type for automotive vehicles. Governments around the globe are increasingly prioritising the climate in their agendas, and more movements are being developed that call for an urgent change in the crisis that falls in front of us. The main concern that is exacerbating the situation is the amount of fossil fuel we are burning. This leads to more carbon in the atmosphere and an increase in global greenhouse gas emissions. Due to the reliance of modern society on vehicles, transportation has become one of the main causes of the increase in greenhouse gas, representing around a quarter of Europe's emissions [1]. Consequently, this has driven up the demand for EVs and led governments to restrict other types of vehicles that cause a more severe impact on the environment. Over their lifetime, EVs are considerably less impactful, especially when paired with cleaner energy sources [2].
The shift towards EVs leads to new problems, one of these being routing and finding an optimal journey for the EVs. Optimal vehicle routing is a widely researched problem due to the reductions it can have on traffic congestion, which in turn can have significant effects on the economy and human health. When routing is applied to EVs, new challenges arise as compared to routing in traditional transportation vehicles, due to the specific constraints of EVs such as their limited battery capacity, the availability of charging stations, the lengthy charging and waiting time compared to traditional fuelling, in addition to the range anxiety experienced by drivers. Aiming to alleviate such issues, we focused on a specific scenario of re-routing or detour, which is needed whenever an unexpected event happens on the road, and developed a new computation scheme to find the most suitable detour/route for an electric vehicle to avoid the excessive delay that it might experience due to this event.
The remainder of this paper is organised as follows. In Section 2, we give an overview of EVs, the traffic congestion problem, and the vehicle routing problem and explain how the latter is more challenging in the context of EVs. A selection of related works is then discussed and compared in Section 3. Section 4 describes the essentials of our proposed EV detour computation scheme including our original EV charging station selection mechanism. The details of the performance evaluation configuration, the scenarios, and the analysis of the obtained results are reported in Section 5. Finally, we conclude the paper in Section 6.

The Rise of Electric Vehicles
The production and purchase of EVs in recent years have been growing rapidly. Passenger EV sales increased from USD 450,000 in 2015 to USD 2.1 million in 2019 [3]. EVs use a rechargeable battery and electric motors for propulsion. They have many advantages that are directly contributing to their rising popularity. Companies such as Tesla and Volkswagen are progressing EV technology, innovating private transport so that EVs can become more accessible to the general population and aid in the fight against climate change.
Despite the reduction in car sales due to the COVID-19 pandemic, the future is positive for EVs; with government policy changes and environmental concerns, they look to be on an increasing trajectory. The sustainable development scenario estimates that in 2030, EVs will constitute 13% of the global car fleet, representing a substantial increase compared to the 1% share achieved in 2020 [4]. Policies set in place around the world by various governments will be a contributing factor in the continuing rise. Seventeen countries have announced 100% zero-emission targets, as well as phasing out internal combustion engines till 2050, with France being the first to put the intention into law [5]. Additionally, the EV credit system implemented in China and India's faster adoption and manufacturing of EVs [3] show the progression and push from governments to shift towards EVs, contributing to their rise in the coming years.
Studies have found that even though in the production of EVs, more carbon is produced than Internal Combustion Engine Vehicles (ICEVs) [2], over their life-cycle, the carbon emitted from an EV is up to 70% less in countries with decarbonised power generation. In 2015, EVs contributed to 31% lower emissions per vehicle-kilometre compared to petrol cars [6]. EVs also present benefits to humans' health by reducing harmful emissions and noise pollution. In terms of fuel cost efficiency, also EVs are advantageous. A study conducted in 2016 found that when driving a Nissan Leaf (EV) instead of a Honda Civic (ICEV) over the 10-year life of the vehicle, the estimated fuel savings would be $4130 at a time when fuel prices were at a 10-year low [7].

Traffic Congestion
Traffic congestion refers to the travel delay caused by the interaction of vehicles on roads, particularly as the volume of the vehicle traffic approaches the road's capacity [8]. It is a global issue affecting the majority of the population of the Earth, mostly in urban areas. There are two main types of traffic congestion, recurring and non-recurring. Recurring congestion is "the congestion present on a normal day if nothing bad has happened on the roadway" [9], such as typical rush hour traffic. Non-recurrent congestion is defined as "unexpected or unusual congestion caused by an event that was unexpected and transient relative to other similar days" [9], such as accidents on the road or weather changes.
In the U.K., new vehicle registrations are forecast in 2022 to increase by 30% from 2020 [10]. Traffic congestion is expected to increase with the growing vehicle population. Besides the vehicle population, the growth in the general population will increase traffic congestion. The U.K. population is projected to grow by three million by 2028 [11], resulting in an increase of trips needed to be taken, resulting more congestion. Traffic from 2014 to 2019 escalated by 7.2% [12], and through the rise in the vehicle and general population, it is forecast to rise further to between 17% and 51% by 2050 [13].
Both types of congestion affect people daily, adding significant delays to their lives. This has substantial economic and social impacts on society. A 2019 traffic report scorecard found that the average British driver lost 115 h annually due to traffic congestion, and overall, EUR 5.2 billion was lost [14]. These can have negative effects on businesses and the economy, as it is a non-productive activity and could be a direct cause for employee tardiness. Traffic congestion can also affect people's health. Stress and aggressiveness brought on by traffic congestion can be detrimental to others' safety on the roads and cause more delays. The 2019 RAC Report on Motoring found that increasing traffic levels is the most common cause of stress at 40%, which represents 10 million motorists [15]. The congestion issue is of significance and, if not managed, will continue to disrupt different parts of society.

Vehicle Routing
Vehicle routing is one of the main ways of combating traffic congestion. Finding the optimal shortest path between two vertices in a network of vertices is a challenging task studied in graph theory. When applying this concept for vehicle routing, we would represent the vertices and edges as systems of junctions and roads, as illustrated in Figure 1. When adding vehicles to the problem, it becomes challenging due to factors such as weather conditions, traffic congestion, and the state of the road. Choosing the correct algorithm is an issue for many current transportation navigation systems as there are numerous approaches developed to tackle this issue, each with its pros and cons. Shortest path algorithms guarantee finding the optimal routing through exploring the whole set of available solutions [16]. One example of a shortest path algorithm is Dijkstra's algorithm, which finds the shortest path between two nodes in a graph [17]. The route is found by initially creating a set of nodes not visited, then beginning at the starting node and calculating the cost of movement to each node connected to the starting node [18]. After all neighbouring nodes have been considered, the starting node is then deleted from the nodes not visited set, and the next node is chosen as the one with the lowest cost of movement from the starting node [18]. These steps are then iterated until the destination node is deleted from the nodes not visited set or all nodes have been considered [18].
Heuristic-based shortest path algorithms explore available solutions and find an approximate optimal solution that is close to or the same as the optimal one [16]. The main heuristic-based approach developed is the A* algorithm [19]. The difference between the Dijkstra and A* algorithm is that the latter introduces a heuristic. A heuristic is a function that is used to solve problems faster and when traditional problems fail to find a solution. In the case of A*, the most popular method used for the heuristic calculates the distance from the node currently being evaluated to the end node, then using that cost, it decides which node to go to next.
In addition to A*, another example of a heuristic-based approach is the genetic algorithm [20]. It is a meta-heuristic used to solve optimisation problems and is based on the principles of genetics and natural selection [16,21]. The genetic algorithm has been used in the shortest path problem and can be an approach to solving harder problems such as when vehicles have to visit all nodes in a large network [22].
The different algorithms for the shortest path problem have advantages that better suit them for specific scenarios. Heuristic-based approaches reduce computation time, but can be more resource dependent due to more memory usage for storing the heuristic. Dijkstra and A* will always give the best route solution as long as A* does not overestimate the heuristic [23]. Meta-heuristic optimisation approaches such as the genetic algorithm and tabu search are better suited for multi-location vehicle routing where the dataset is much larger.

Electric Vehicle Routing
When it comes to routing electric vehicles, the problem becomes even more difficult. Extra constraints when routing EVs make calculating a route more challenging than normal ICEVs. Firstly, the EV charging station infrastructure is still not there, with demand for chargers rising rapidly. The U.K. would need to install Charging Stations (CSs) five-times faster if it was to reach between 300,000 and 500,000 stations, which is required for 2030 with current EV projections [24]. Refuelling times of EVs are also a problem that needs to be factored in when routing. An EV can take between 26 h for the slowest chargers (alternating current chargers) and 6 min for the fastest chargers (direct current fast chargers) to add 100 mi to its range [25]. In addition, with the CS infrastructure not being there and the added issue of timely charging, their availability is also affected. With EV demand and consumption continually grow and government policy changes around the globe, the issue will only worsen without major changes.
Range anxiety, the fear of battery capacity depleting mid-trip, is a concern of EV drivers [26]. This is something that could be reduced with electric vehicle routing and progression in CS infrastructure. Additionally, conditions in the EV environment can affect the battery capacity such as the weather. A 2019 study found that an EV at 20°F resulted in a 12% decrease in driving range, and when the Heating, Ventilation and Air Conditioning (HVAC) system was used, there was a 41% decrease. This could result in a need for more charges and will put a strain on CS availability at colder temperatures [27]. With these added constraints, a new comprehensive solution for electric vehicle routing needs to be developed.

Related Works
Several research works have been conducted on the EV routing problem in recent years. The authors in [28] investigated how to calculate a route for EVs based on stops at CSs if the current battery capacity was not enough to reach the destination, providing a route with the minimum travelling cost. Their method takes the EV range and CS locations and, using these, calculates a new route. When the current range of the EV is sufficient enough to reach the destination without the need for a refuelling stop, a route is calculated conventionally with the remaining capacity upon arrival. Meanwhile, when the starting range is insufficient, CSs based on the EVs range are selected as potential stops. Then, with the distance between CSs, estimated travel time, and charging time, the most cost-effective route is selected. Routes were created based on Dijkstra's algorithm and the appropriate CSs. The algorithm was then evaluated on a Japanese map with hypothetical CSs on the route, assessing execution time for selecting potential CSs and for conventional route searching with some of the selected CSs.
The obtained results showed that the point of interest search time, which is the execution time for selecting CSs and the route search time, was evidently higher for users needing to stop at CSs. However, the computation time can be seen as much faster and more accurate than manually planning CS visits on the route. Furthermore, their solution computes routes with accessible charging over a large network efficiently. A drawback of the solution is its failure to evaluate CSs further. Checking the availability and current capacity of CSs are things that could affect the journey times and distances that need to be travelled. Additionally, it does not take into account time delays such as traffic when evaluating routes.
In [29], the authors presented a routing solution for EVs focusing on energy efficiency. They modelled an EV with accurate energy consumption and then found the optimal route using a Bellman-Ford approach. They aimed to tackle the energy-efficient routing problem in its simplest form. They first modelled the energy consumption of an EV using parameters such as vehicle mass, gravitational acceleration, tyre rolling resistance coefficient, mass density, and the drag coefficient. Using this model, they computed the route from the start to the destination through the graph using the Bellman-Ford algorithm, finding the energy consumption between each node and making decisions on which path to take based on the least energy consumption from node to node. Their proposal was then simulated on various map sizes represented as graphs. From this, they found in large-scale maps that their approach was not scalable, taking 203 h on a graph with 270,780 edges, although on smaller-scale maps, it was effective, taking 0.128 s on a graph with 63 edges. Their solution was adequate and found routes based on energy efficiency for EVs in small networks with the Bellman-Ford algorithm working well for energy-weighted graphs. Furthermore, the EV energy model was an accurate representation of EV energy consumption. A downside of the model was its failure to highlight environmental issues such as the impact of weather conditions on the battery consumption speed. Another limitation to the routing proposal was that it did not take into account charging and CS selection when routing. As an extension to this solution, traffic conditions and vehicle remaining range could be considered when computing routing decisions.
Reference [30] developed a routing solution for Mobility on Demand (MoD) EV systems. MoD is a one-way vehicle sharing system, a promising way to reduce greenhouse gas emissions, and a sustainable solution for private mobility over the current reliance on a personal vehicles. They aimed to reduce the inconvenience surrounding MoD systems with the occasional customer needing to perform in-route charging and retrieve the optimal average trip time. The authors proposed a system of routing between multiple passenger stations while considering in-route charging and allocating passengers with fewer delay constraints to EVs needing to be charged. Using a multi-server, cloud-based infrastructure for connectivity through all components in the system, they calculated the routing probabilities of EVs to CSs and then made routing decisions based on these. Their model only considers EVs that need to be charged on the way to their destination. It was then simulated extensively using battery swapping to reduce excess charging delays and different system parameters. It was then evaluated against conventional shortest time decisions. The results from the simulations carried out showed a reduction in CS delays and trip times compared to other shortest time and random routing schemes. MoD systems could be a great implementation for private mobility using electric vehicles and may be a future system of transport to tackle population growth and climate change. The presented solution for routing and scheduling of vehicles in the system finds optimal solutions and would significantly reduce the frustration levels of customers that are forced to charge in-route.
A nearest-neighbour approach to EV routing, finding the most energy-efficient route, was proposed in [31]. This work aimed to develop a new routing solution for EVs taking into account vehicle battery capacity and CSs after the recent surge in the EV market share and the environmental benefits they bring with them. Their solution concentrates on multi-node traversal where each node only can be visited once. Using Dijkstra's algorithm from each current node, they found the next nearest node in the graph. They iteratively performed this until each node had been visited once. For routing an EV, their solution checks whether the vehicle can make it to the next node or next CS without losing all charge, charging fully at each CS it visits, and again iteratively checking at each node whether the vehicle will make the journey to the nearest neighbour. This was then simulated using the coordinates of cities (nodes), finding the accurate optimal solution based on the shortest route between each city. The simulation results revealed accuracy when calculating an optimum routing path for EVs with charging taken into account. It also highlighted a good basic solution to multi-stop vehicle routing, with checks on vehicle current range and routing the vehicle via CS when the current battery capacity could not reach the next city (node). As an extension, the algorithm could have a better estimation of EV range to take in more vehicle parameters such as vehicle weight, front surface area, and propulsion efficiency. Furthermore, route constraints such as traffic and weather conditions could be incorporated into the algorithm to test its effectiveness against real-world scenarios. Furthermore, accessing the algorithm next time against more conventional routing solutions would give a better insight into how well it performs.
A routing and charging algorithm for an Internet of Electric Vehicles (IoEV) was proposed in [32]. Their solution allows routing to be calculated in a distributed manner by users and a system operator. They aimed to protect the anonymity of users and reduce the computational complexity of the system operator. Their algorithm selects an approximate path for each EV, then optimises the charging scheduling of the EVs based on the approximate path. This was then simulated extensively, comparing the solution with two other benchmark algorithms on a dataset that maps real-world data to nodes and edges from Washington DC, USA. Overall, the simulation results showed that the proposed routing solution outperformed the two conventional methods used in the simulation and always produced a near-optimal performance with low computational complexity. Using an IoEV is a promising way of tackling the NP-hardness and computational complexity of EV routing for larger systems with multiple destinations, such as delivery couriering. Having a centralised location for distributing EVs and scheduling them at CSs would also reduce queuing times at CSs and allow for improved selection. A downside of their proposal is the infrastructure needed to be put into place to get the system up and running, as it needs a centralised system to manage multi-car rerouting. To extend their implementation, we propose to incorporate CS availability into the decision-making, which could further decrease travel and wait times.
The authors of [33] proposed a shortest time path planning algorithm with an energy consumption warning method for EVs with insufficient battery capacity for their journey. They also used the Java Spark Parallelization framework [34] to reduce the computation time. It was designed to help EV drivers with the charging problem of slow charging times, small CS availability, and best CS to which to route. They first presented an energy warning model that monitors the energy consumption of the vehicle and, using its average speed and regression coefficients, issues a warning when the current battery capacity of the EV will not reach its destination. Then, a path planning algorithm was developed. They used Dijkstra's algorithm to find the shortest path from the current node to CSs and then to the destination, choosing the optimal CS to stop at, factoring in queuing and charging times. When calculating the shortest path, they also implemented Spark to compute the shortest path in parallel. This improved the efficiency of the algorithm. Their solution was then run through a real-world traffic network to test its effectiveness. The simulation results demonstrated how with the addition of Spark Parallelization, significant reductions were seen in the time taken to find the optimal route. Notably, when the number of nodes in the graph grew larger, the runtime of the algorithm dropped compared to small graphs, for example on a road network with 300 nodes, the computation time decreased from 1.2 s to 0.1 s. The implementation of synchronous computing in the routing algorithm is an encouraging feature for large pathfinding in road networks.
The authors of [35] presented a pathfinding solution to the Electric Vehicle Routing Problem (EVRP). They used the tabu search approach to multi-objective route planning for EVs and aimed to combat the issues of limited battery capacity and charging demands when routing these vehicles. They aimed to optimize routing for logistics services when using EVs as the issue becomes more prominent with major U.S. companies implementing fleets of these vehicles. The authors proposed a routing solution using tabu search, where the vehicle has multiple destinations to visit on its journey. Tabu search is an optimization technique that uses a meta-heuristic and a tabu list, which mimics the human memory function, blocking all areas that have been searched in a route to avoid detours. It begins by creating a random initial route, then from that searches for possible routes, compares each route until it finds the optimal one, taking into account the electrical charging demands of the EVs. Their proposal was then evaluated using the coordinates of locations, CSs, and the locations that need to be visited. The tabu search solution was then evaluated against another commercial routing algorithm. The obtained results, based on a routing for two different distances, highlight that the time taken for tabu search was significantly reduced, with no time increasing with distance increase, unlike the method used by the mathematic program software CPLEX. Overall, the proposed algorithm is a good solution to the routing problem using EVs with multiple stops. It has significant time reductions compared to other existing solutions and always finds the optimal route considering EV battery limitations. A potential improvement to this algorithm would be to develop a more sophisticated mechanism for CS selection, taking into account the availability and the efficiency.

Comparative Study
Each of the above-discussed works aimed to design an efficient routing solution for EVs. It is clear that all CS constraints need to be considered when deciding on which CS to route the EV through. The path planning method proposed by researchers at the Xi'an University of Technology [33] considers more CS constraints, such as vehicles' waiting and charging times, when making a decision, making the path calculated more optimal for an EV. Compared to earlier works, such as [28,29], where these constraints were not considered, this work allowed for better judgement on the true optimal route. Moreover, the mobile on-demand proposal includes a promising idea with the CS schedule, although this would, in turn, affect the privacy of drivers and their vehicles [30]. To further improve the above works, the inclusion of more constraints for CSs such as CS charging efficiency, price, and vehicles' waiting will ensure a greater accuracy in the computing of the optimal route. Table 1 compares the above works in terms of their complexity, achieved scalability level, overall effectiveness, in addition to whether they took into account CS attributes or not.

Proposed Solution
In this section, we present the key principle and detailed operation of our EV detour computation algorithm.

Routing Process Design
We propose a detour routing algorithm that attempts to find the optimal route for an EV taking into account the current vehicle range, route length (i.e., the remaining distance to the destination), and traffic conditions. Figure 2 shows a high-level overview of our algorithm. The process of finding a detour is initialized when the current location of the EV and the destination are input. A route is then calculated based on these two locations using the path searching technique described in Section 4.2. When evaluating each node, the stopping criterion is put in place to check whether the current EV range is sufficient enough for the current route length. This ensures that the range does not fall much below the minimum State of Charge (SoC), which was set by default to 10%, but it can be configured by the user to a different value. Having a minimum SoC threshold is essential to ensure that battery capacity never becomes too low, as low and high SoCs can have a direct effect on battery health and ageing [36]. In addition, this stopping criterion will reduce the computation time as calculating the full route would be unnecessary if the current battery capacity does not allow reaching the final destination. The EV range was computed by multiplying the SoC by a factor called metres per Watt-hour (mWh). mWh represents the energy consumed by the EV per metre. We computed this factor by running several simulations and computing the average value of mWh, as shown in Equation (1), for the category of the EV.
where d is the distance driven by the EV and e is the total energy consumed. If a route reaches the end node without dropping below the minimum SoC, then this route is output back to the user. When it falls below the minimum SoC, then re-routing via a CS is initialized. A CS is selected following the technique described in Section 4.3. A route is then found from the start to the CS, again using the path search technique described in Section 4.2. Once the route is found, a new start point will be set after the CS location, and the algorithm iterates again from the beginning with the new start point until the destination is reached.

Vehicle Routing Algorithm
In our detour computation scheme, a graph-traversal algorithm is needed to calculate optimal routes for EVs. There are numerous methods developed in the literature for computing how a vehicle will traverse a road network, starting at one designated point and ending at another. As discussed in Section 3, several algorithms have been developed in graph theory to search for a path in a graph, typically the shortest one, such as Dijkstra, A*, tabu search, genetic algorithm, and breadth-first traversal. The main aim of these algorithms is to find the optimal route, achieve faster computing, and provide the ability to incorporate other constraints than the distance, such as travel time, road safety level, and easiness of driving level, when routing.

Chosen Path Search Algorithm
Upon evaluation of the algorithms used for graph traversal and vehicle routing, the A* algorithm is the one being most used to traverse road networks and find an optimal route. A* is a heuristic-based path finding algorithm that is considered an extension of the Dijkstra algorithm. A* was our chosen algorithm due to various factors. Firstly, the use of a heuristic function benefits the solution, with the main benefit being faster computation times due to searching fewer nodes. This is beneficial when the number of nodes in a graph increases. In addition, when the heuristic is admissible (can never overestimate the cost to reach the goal), A* is guaranteed to output the optimal path that has the least cost [37]. Moreover, the complexity of A* compared to the meta-heuristic techniques such as tabu search and genetic algorithms is much lower, making it easier to implement and add custom constraints. Likewise, these techniques are better suited for multi-objective routing problems such as the vehicle routing problem and the travelling salesman problem, where the routing criteria and graph size are much larger.

Network Costs and Heuristic
Equation (2) shows the A* path cost formula, which uses the minimum value for path selection.
The term denoted as g(n) traditionally is the cost of movement from the start node to the current node (n) in the graph (the weight from node to node in the network). The term h(n) is traditionally the heuristic function, which estimates the cost of movement from the current node to the destination node. h(n) is usually calculated through the Euclidean distance, which is denoted in Equation (3), with p and q being the coordinates of the nodes in the graph [18].
When finding a path for vehicle routing, using the traditional methods for A* will not suffice. This is due to more real-world constraints such as traffic affecting routing choices and finding the shortest path will only find the optimal shortest solution. Instead, our goal was to minimize the travel time of the vehicle routing, changing the traditional cost values for g(n) and the heuristic function h(n) from Equation (2) to fit these criteria.
Equation (4) denotes the new value of g(n), which is the travel time from the start node to the current node (n) in the graph. This is calculated by dividing the length from the start node to the current node, which is shown as l(n), by the mean edge speed in the last time step for the same nodes, which is denoted as s(n). Equation (5) denotes the new heuristic function formula for the value h(n). d(n) represents the Euclidean distance calculation used in the traditional A* heuristic function. This is then divided by m(n), which is the max speed of any edge in the network. Using the max speed of any edge in the network allowed us to never overestimate the cost to reach the goal for the heuristic, making it admissible and giving us the optimal route.

Charging Station Selection
The selection of the optimal CS is an important step in our proposed detour computation scheme. Figure 3 depicts a visual representation of our CS selection. Various parameters were considered when deciding at which CS the vehicle should refuel. Therefore, this makes it a Multiple-Attribute Decision-Making (MADM) problem. There are numerous methods developed to help make optimal decisions, and the technique we used was Simple Additive Weighting (SAW). Selection begins by obtaining all the CSs in range of EV current battery capacity and then deciding on the optimal one with the SAW method. The centre point of the range is first defined as the node from which the initial route calculation dropped below the minimum SoC. If no CSs are found from there, the node changes to the starting point if the search node is not initially that. A goal capacity at the end can also be defined, which outlines the preferred capacity when routing is complete, which will be accounted for when calculating the duration to charge for at the CS.

Simple Additive Weighting
SAW is one of the most popular and best-known MADM techniques used [38]. It uses a weighted sum of all attributes for each instance of objects and compares the total of each, with the higher overall weighted sum being the better choice [39]. To begin, each attribute value needs to be normalized for each CS, making each value within a common scale so values with more extreme ranges do not influence the end summation. There are many different techniques for data normalization such as linear, min-max, vector, and logarithmic normalization. A 2007 comparative study on normalization procedures in MADM found that vector normalization is the most suitable for SAW [38].
Equation (6) shows the formula used to normalize the data using beneficial vector normalization, and Equation (7) shows non-beneficial vector normalization. The beneficial formula is used when the attribute's value aims to be higher, and the non-beneficial formula is used when the value desired is lower. Once the data have been normalized, each value can then be multiplied by its weighting value. v i = n ∑ j=1 w j * r ij (8) Weightings are determined by how much the given parameter matters when making a decision, and they all have to add up to 100%. Equation (8) depicts how the score for each CS, based on SAW, is computed, where i represents the index of the CS, v is the overall score, and j refers to the index of the CS parameter. r holds the added score of the CS parameters, and w is the weighting value for the given parameter. Parameters for each CS are multiplied by its weighting, then each are summed together for its overall score.

Charging Station Decision Attributes
Deciding on which CS to route the EV to requires the decision attributes used in the SAW to be defined. Table 2 shows the parameters used in SAW. The distance from the search attribute is the straight line distance from the current CS search node to the CS, computed using the Euclidean distance. The distance from the divider attribute is the straight line distance from a line that connects the current node and the end node, which highlights whether the CS is in the right direction. Figure 3 shows a visual representation of how the distances work in context with the CSs in the vicinity of the EV's current range. Refuelling price, the number of vehicles charging, and the charging efficiency are CS properties used as attributes in SAW as well. Charging efficiency refers to the kilowatts gained by the EV battery per time step from the CS.

Performance Evaluation
In this section, we evaluate the performance of our proposed solution, using Simulation of Urban MObility (SUMO) [40], which is an open-source, highly portable, microscopic, and continuous multi-modal traffic simulation package, and analyse the obtained results. The detour computation scheme was assessed on a number of simulated test scenarios using different weighting metrics and a baseline routing algorithm.

Creating Test Data
The real-time interaction, including simulation initialization, with SUMO can be achieved through TraCi and Python [41]. To collect meaningful and reproducible results, SUMO needs to be run multiple times. To this end, we ran our simulations 10 times for each of the parameters listed below in Section 5.1.3.
SUMO uses seed values to ensure randomness in the simulation, which can be reproduced when the same seed value is run again. This will ensure that results from the different parameter variations and the baseline algorithm can be compared correctly. Fifty EVs were introduced into each simulation scenario with randomly assigned start and end nodes in the network to allow a variety of results for comparison. The random start and end nodes were controlled again by the SUMO seed. The maximum battery capacity of the vehicles was set to 10,000 Wh.
Once the iterations of the simulations are finished, a CSV file is output for analysis. SUMO has default output XMLs that show vehicle and simulation information from each time step and an overview of each. A Python function was built that output the data needed at the end of the simulation to a CSV file. This file consisted of the parameters used, the EV distance travelled, the EV routing travel time, the number of CS stops, the duration spent at each CS stop, the algorithm runtime, the EV battery capacity at the end of the simulation, the start and end nodes used by an EV, whether the algorithm was used, and whether the vehicle had reached its destination before its battery capacity ran out.

Evaluation Metrics
Once all the data were found for each iteration of the simulation, the data were collated for comparison. For the evaluation against the baseline routing algorithm, two metrics were needed.
Equation (9) above highlights how the average battery capacity at the end (ABE) of the simulation for the EVs was calculated. n is the total number of EVs in the simulation, and b is the battery capacity at the end of its journey. This was used to compare the end capacities for vehicles routed by our proposed detour computation scheme and the baseline algorithm.
Having an ABE around the defined value of the goal capacity at the end of the journey highlights that the proposed routing algorithm is efficient in battery health monitoring.
Equation (10) depicts the formula to obtain the percentage of vehicles that have completed the journey before the battery is empty (%VCJ). n again is the total number of EVs in the simulation, and c represents whether the EV completed the journey before its battery is empty. This was used again when comparing the baseline algorithm with our proposed detour computation algorithm and showed the success of the algorithm in routing the EV.

Evaluation Parameters
Firstly, an evaluation was carried out on different values for the SAWs, which aligned with what users would define when using the algorithm in real-world scenarios. Table 3 highlights the different SAWs used in the evaluation. The first four weightings give importance to the type of attribute they represent. Weighting A splits the two distance parameters' importance between them. B, C, and D each give the importance to the price, the number of vehicles charging, and the overall charging efficiency of the CS, respectively. The last gives equal weighting values to each parameter. Next, we evaluated our algorithm against a SUMO baseline routing algorithm. Using the "-noalg" option when running the Python script allowed the routed vehicle to be run without our proposed scheme and use the default SUMO routing algorithm (i.e., standard Dijkstra) [42]. The baseline routing algorithm has no options for EV charging, and so it will run until the battery is empty. Comparing the two algorithms highlighted the effectiveness of our proposed scheme in reducing the range anxiety (i.e., ensuring that the chosen detour will enable the EV to reach its destination without the need for recharging or its chosen route includes a CS where the EV can recharge its battery) of EV drivers.
Each of the different SAW weightings and the baseline routing algorithm were run using three different starting values for the EV's actual battery capacity, 500 Wh, 1250 Wh, and 2250 Wh. This gives a value under the default SoC threshold at 5%, just above it at 12.5%, and a value higher at 22.5%. Using these different capacity values gave us an idea of how each would affect routing and CS selection because both would be initialized at different stages due to the CS search node.

Grid Road Network Scenario
The first simulation scenario was the grid road network, which was created to show how the detour computation scheme works within a simple road network layout. In addition, this scenario highlights how an EV can benefit from using our proposed algorithm and the positive results it outputs even on a smaller scale. Figure 4 illustrates the 3 × 3 grid road network within the SUMO GUI. The grid was built using the netedit tool and was a small-scale replica of a grid road network that is used in big cities around the world such as New York and Barcelona. It had four CSs, highlighted in light blue, added in different parts of the grid for EVs to consider when routing using our proposed scheme. The simulation took advantage of the "randomTrips" SUMO tool and generated random vehicles with a defined route to simulate a realistic traffic scenario. EVs were generated in increments of ten time steps to route from two random nodes until fifty EVs were introduced in the simulation.   Table 3. The results showed a greater travel time for a starting battery capacity of 500 Wh compared to the other two. This was due to having a battery capacity lower than the default SoC threshold at 10% and needing to stop at a CS to recharge the battery to increase its capacity above this threshold. Upon comparison of the different weightings used, a starting battery capacity of 500 Wh was the only one we could make a good comparison of due to the grid road network being small, which simulated shorter trips for EVs where the need for recharging the battery is low. Weighting A, which weights towards CS distance, performed best out of the five weightings due to having a lower median and smaller spread for its Inter-Quartile Range (IQR), making it more consistent in achieving a lower travel time for EVs. The next best was the weightings for E due to the slightly lower spread for its IQR and median, then B was slightly behind, but it had less outliers and extreme values. Lastly, C and D were found to be the least effective in reducing the travel time of an EV. Overall, this showed that on a smaller road network, giving importance to distance when selecting a CS yields the best outcome and that waiting times at the CS increase the travel times the most. The 3D scatter graph shown in Figure 6 depicts the CS stop durations needed for different starting battery capacities in the grid road network scenario. It shows how these two metrics affect the remaining battery capacity when the EV reaches its destination and the overall vehicle travel time. Furthermore, it highlights how charging is needed when the starting battery capacity is below the threshold at 500 Wh, which in turn increases the CS charging duration and thus the overall travel time. Moreover, at 500 Wh, it kept the remaining battery capacity above the default goal capacity at the end, which was 10%, although there were a few outliers with the remaining capacity being over 20%. The occurrence of outliers here was due to the overestimation of the range value and increases in the braking of vehicles in route, enabling regenerative braking of the EV and battery capacity gains. Under a starting battery capacity of 1250 Wh, the plotted results show that a few CS stops only were needed because the network was smaller and only dipped below the capacity threshold a few times. In the case of a starting capacity of 2250 Wh, no CS stop was needed due to the fact that the battery capacity never fell below the end goal, keeping the travel time low.
According to these results, we can conclude that our scheme performed well and as expected in the grid road network scenario. In addition, the overall goal end battery capacity was met with the exception of a few outliers, maintaining the battery health.
Lastly, the performance of our detour computation scheme was compared against the SUMO baseline routing algorithm. The comparison results in terms of the achieved %VCJ and ABE are shown in Table 4. This table exhibits the results obtained from running the simulation ten times with the three starting battery capacities for the baseline routing algorithm and our proposed scheme, calculating the metrics defined in Section 5.1.2 for each of them. In every instance, every vehicle completed its journey without draining its battery. This was because the EV grid was a smaller network and the routes were shorter in length. The differences in the data here were the ABE values; starting capacities of 500 Wh and 1250 Wh had ABE SoC values of 11.4% and 11.5% when the detour computation scheme was used, and only 3.3% and 8.7% when it was not. This highlights how our EV detour scheme was successful in achieving its goal of maintaining battery health and keeping the SoC above the end goal. Again, due to the size of the used grid, a starting capacity of 2250 Wh did not show much difference change in the results because the need for CS selection and stops was not there. However, the slightly higher ABE indicated that travel-time-based routing performed better than the distance-based routing used in the baseline in retaining the battery capacity.

Manchester Road Network Scenario
Once the EV grid was created and evaluated, a larger-scale road network representing Manchester's city centre was produced for evaluation. Figure 7 shows an illustration of such a road network using the SUMO GUI.
The Manchester scenario was generated using OSMWebWizard and mimicked the road network of the city centre of Manchester in the U.K. Within OSMWebWizard, there is the demand generation feature, which allows the random generation of different modes of transport on the network. The Manchester SUMO simulation includes cars, trucks, buses, motorcycles, cyclists, and pedestrians. The box plots in Figure 8 illustrate the travel times achieved for the different weightings discussed in Section 5.1.3, under three different starting battery capacities, using the Manchester road network. For the highest starting battery capacity, 2250 Wh, there was no need for CS stops due to the battery capacity not dropping below the threshold. The travel times were similar due to this, with the median and IQR spread being around the same values. Following the previous EV grid simulation, when the starting battery capacity was set to 1250 Wh, Weighting A (giving importance to distance) performed better with C and D just behind. With weighting importance towards distance, the overall spread, median, and IQR were better than the others at 1250 Wh and achieved more consistent results. When the starting battery capacity was set to 500 Wh, Weightings A and E came out with similar results. The only difference between the two was Weighting A having a slightly smaller IQR and spread, making the results more consistent. Overall, the results from comparing the travel times and different weightings for the two simulations were comparable. Weighting importance on distance had the best-performing results in the reduction of travel time when making a CS selection decision with equal weightings coming just behind that. Figure 9 shows a 3D scatter graph comparing the remaining battery capacity at the end of the simulation, with the CS re-charging duration and overall travel time of the EVs' journey. When the vehicles starting battery capacity was set to 500 Wh, similar to the EV grid scenario, the CS stop duration and travel time increased due to the SoC being below the default threshold at 5%. A starting capacity of 1250 Wh had similar results in that the CS stop duration rose due to the network being larger and routes needing higher battery capacity to complete. However, the duration was less for a 1250 Wh starting capacity compared to the 500 Wh values because of the higher capacity at the start and less re-charge time required. The travel time outliers for 1250 Wh may correlate with the traffic congestion being high at the different times when CS re-charging ends at 500 Wh. Most of the simulation points had CS stop durations and travel times just below the values for 500 Wh. Finally, the remaining capacities at the end mostly equated to or were just above the default goal capacity at the end, reflecting successful management of battery health. The outliers here with remaining capacity were due to the same reasons as the EV grid with the overestimation of the range or capacity gains from regenerative braking.   Table 5 highlights how the baseline routing algorithm performed for the EVs in the simulation compared to the detour computation scheme under the Manchester road network. For starting capacities of 500 Wh and 1250 Wh, only 55% and 91% of vehicles completed the journey without running out of charge, compared to 99.4% and 100% when the algorithm was used. When the algorithm was used for 500 Wh, three out of fivehundred vehicles evaluated with these criteria did not make the journey, making the %VCJ 99.4%. Upon evaluation, this was down to the range estimation not estimating the range correctly when vehicles were travelling on faster roads and the battery capacity starting as a low value. Further work can be performed for range estimation of the proposed solution, predicting the range for each individual EV through its runtime instead of using a previous simulation. In addition, the average battery capacity at the end was greater for both capacities when the proposed algorithm was used, supporting battery health. These results highlight the benefits of using our detour computation scheme, specifically aiding in the reduction of the range anxiety of EV users and overcoming the limitations of current EVs such as the finite amount of CSs and restricted battery capacities.

Conclusions
This paper proposed a new detour computation scheme for EVs with the aim to alleviate the range anxiety issue of EV drivers, reduce traffic congestion, and make EVs more appealing to drivers to increase their market share. Towards that end, we designed an adapted version of A* algorithm, which uses travel-time-based path finding instead of the distance, and used the simple additive weighting method for charging stations selection. The performance evaluation results and their analysis, using two representative road network scenarios, proved the effectiveness and feasibility of the proposed scheme.