Robust eBuses Charging Location Problem

The implementation of a sustainable and efficient electric bus (eBus) transportation network requires addressing multiple concerns, such as limited driving range and battery charging/discharging time. Currently, eBuses can travel between 200 to 300 km on a single charge, and fast charging stations can fully recharge a battery in a matter of minutes. However, a failure in a charging station might negatively impact the operation of the system with unnecessary delays for the users. Taking this into account, we propose and implement a model for the Robust eBuses Charging Location problem that takes into account potential vulnerabilities of the transportation system. Our model incorporates a protection mechanism that allows eBuses to reach a backup charging station in case the regular one is down. We propose a MIP model to tackle this problem with minimal disruptions in the regular operation of the eBuses. Furthermore, we also present a Large Neighbourhood Search framework to efficiently tackle the problem. Our empirical evaluation suggests that our framework can operate a robust service with a small number of charging stations for three Irish cities and our Large Neighbourhood Search approach largely outperforms a popular commercial MIP solver.


I. INTRODUCTION
T HE EUROPEAN Green Deal is a set of policy initiatives brought forward by the European Commission (EU) to make Europe a climate-neutral continent in 2050 [1]. Following this initiative, the EU has put in place legislation to reduce emissions by at least 40% (from 1990 levels) by 2030 [2]. In this line, many European countries are taking the initiative of implementing a transition of the public bus transportation network to electric buses (eBuses).
Driving anxiety or limited driving range is one of the main issues for transitioning from diesel to electric buses. The distance range capabilities of eBuses vary among different models and manufacturers [3], starting from ABB's Trolleybus with 38 km, passing through New Flyer's 200-300 km, up to BYD's 548 km model. 1 However, the bus transportation networks in urban cities operate fixed routes The review of this article was arranged by Associate Editor Francesco Corman.
1. In this paper, we assume that eBuses consume 1 kWh per km. and strict timetables. Therefore, in order to properly operate the system, eBuses must recharge their batteries a few times during a workday. For this reason, the charging infrastructure must be properly placed in a way that the charging time and limited driving range will not impact the quality of service.
In this paper, we assume that the buses start operations with full energy capacity (e.g., with slow over-night charging). Then, during the day, while the eBuses are doing their services, they must dedicate some time to recharge their batteries in fast-charging stations before their battery level is too low. We aim at optimising the placement of fast-charging units in the current location of bus stations. The fewer fastcharging stations are installed, the better, because of their associated cost.
In 2019, a high-level expert group on Artificial Intelligence (AI) in EU presented ethics guidelines for trustworthy AI. One of the specific key requirements is "technical robustness and safety: AI systems need to be resilient and secure. They need to be safe, ensuring a fallback plan in case something goes wrong, as well as being accurate, reliable, and reproducible. That is the only way to ensure that also unintentional harm can be minimized and prevented" [4].
The above-mentioned requirement is a clear motivation for analyzing the vulnerabilities of the eBus transportation network; a complex system vulnerable to failures and disruptions due to unexpected events, e.g., traffic congestion, accidents, and power outages. A major disruption in the transportation network could affect the regular service of thousands of customers. Therefore, protecting the network from such unexpected events is an important requirement in the implementation of an eBus fleet.
In this paper, we handle a challenging scenario in which any fast charger might experience a failure during a workday. This failure might impact the regular operational service of the transportation system as some eBuses rely on the station to recharge their batteries. Furthermore, the damaged charger might also cause delays (or other types of disruptions) to other eBuses in the network originated by the affected eBuses.
For this reason, we propose the Robust Charging Location Problem (RCLP). This version of the problem enables eBuses to reach two charging stations, so that whenever the primary charging station fails and is not available, the affected buses will have enough power to reach a backup charging station. However, simply allowing two separated charging stations is not enough as recharging buses in a backup station might impact the operational schedule of other eBuses in the fleet. Therefore, we propose a robust proactive model that allows a charging station failure without impacting the operation of the service. Figure 1 describes our proposed robust framework. Let us assume that the example operates two eBuses (i.e., b 1 and b 2 ); two routes with 17 stations; three primary chargers (i.e., pc 1 , pc 2 , and pc 3 ); and four backup chargers (i.e., bc 1 , bc 2 , bc 3 , and bc 4 ). On a regular workday, b 1 relies on pc 1 and pc 2 to recharge its battery, whereas b 2 relies on pc 2 and pc 3 to gain power. However, in the event of a failure, b 1 (resp. b 2 ) rely on bc 1 and bc 2 (resp. bc 3 and bc 4 ) to operate without disruptions.
We remark that the proposed framework supports simultaneous failures at the same time. Nevertheless, failures must not occur in the primary and immediate subsequent backup charger of a given bus. We note that the same charger might act as a primary one for certain eBuses and a backup for others. The goal of the RCLP is to identify the solution with the minimum number of charging stations.
In this paper, we present the design and implementation of a novel model for the RCLP. Our model allows a smooth transition to an electric transportation network in urban cities that minimizes the number of chargers and ensures a feasible backup charging option in case of failures in the system. Furthermore, due to the inherent complexity of the problem, we also propose a Large Neighbourhood Search (LNS) framework to efficiently tackle the problem. Notably, our LNS framework reduces the required charging infrastructure by up to 97% when compared to a popular commercial MIP solver.
The paper is organized as follows: Section II describes related work related. Section III outlines the main components of dynamic and robust systems. Section IV describes and formalizes the charging location problem. Section V extends the model to deal with robustness. Section VI outlines the proposed LNS framework to efficiently tackle the problem. Section VII describes our dataset for three Irish cities, i.e., Galway, Limerick, and Cork. Section VIII evaluates our models with and without robustness. Section IX presents some conclusions and future work.

II. RELATED WORK
The origin of the contemporary charging station location problems can be tracked to the facility location problem [5], which has existed and been applied for more than a hundred years in the design of transportation systems [6]. The simplest version of this problem aims to select the best among a candidate set of points to optimize some objective. Thus, several of the earliest approaches evolved to adapt to the introduction of electric vehicles and the complexities that come with them [7]. Considering only the research related to transportation networks, [8] proposed categorizing the charging-stations-location literature based on the modeling approach, which produced three groups: node-based, path-based, and tour-based approaches.
In general, in order to plan and design the charging infrastructure for a transition, researchers feed their models with the publicly available information (i.e., data on the daily operations of the vehicles). Both the node and the path-based approaches aim at covering the transportation network with the aggregated data to simplify the complexity of the problem, e.g., transitioning to electric vehicles for an entire city. In the node-based approaches, the available data is aggregated in nodes that demand a specific amount of energy. It is assumed that the system must satisfy the demand by placing charging stations to serve the customers within the area. Hence, the tackled problems in this group are mainly related to the classic facility location problem. For instance, in [9], [10], [11] the authors propose a set of heuristic solutions to identify suitable charging stations for electric vehicles, so that the vehicles can reach their destination without running out of batteries.
Furthermore, within this category, we can find papers with three different well-defined types of objectives. First, minimizing the number of charging stations while satisfying the demand of the customers [12], [13]. Second, maximizing the covered demand with a given number of charging stations [14], [15], [16]. And third, minimizing the traveled distance between the customers, within a given area, and a given number of charging stations [17], [18].
Alternatively, the path-based approach aggregates the user data as flows of vehicles defined for origin-destination trips (traffic data). Thus, the objective is to capture the maximum flow by installing charging stations along the path. These flows are usually modeled as the edge values of a weighted graph. The idea of capturing traffic flow was initially presented in [19], and further works [20], [21] extended it to deal with the complexities of the electric transportation systems.
Since we model a bus transportation network, our work would fall into the tour-based approach group. There, user data is available in the form of individual agents that drive across the network. Therefore, the models deal with the whole routes of these vehicles, considering details such as the battery level or time-traveling at particular points of the routes. Unlike the first two groups, these approaches require a higher amount and quality of data, so they are less common. For example, [22] analyzed the driving patterns of some citizens in Chicago and Seattle in the United States, which reveal that most trips made were short enough to be within the driving range of standard electric vehicles. However, for those vehicles traveling longer distances, they formulated a charging location problem through a MIP model. The model proposes a set of candidate locations for the charging stations, which are scattered around the cities and are not necessarily within the routes of the vehicles. Consequently, they compute the distance the vehicles should deviate themselves to reach these potential locations. In conclusion, given a fixed number of available charging stations, their objective is to locate them by minimizing the distance traveled by the vehicles to recharge.
Closer to our research, [23] considered a fleet of vehicles, each one with a well-defined route within a network, including cyclic sequences of stops. Furthermore, the author presented a MIP model whose objective was to minimize the cost of the charging stations, which had to be located into a subset of the stops. The model was incrementally extended with redundant constraints in order to improve its performance. As the author suggests, his approach could be adapted to a bus transportation system by considering timetables. However, he neglects them in his validation carried out over random-generated networks.
There exist tour-based approaches centered specifically on public bus transportation systems. In general, given a set of fixed routes, their objective is to place charging stations at selected bus stops such that some cost is minimized. However, these works mainly differ in where they focus in order to produce a realistic model. For instance, in the model of [24] the cost of installing a charging station varies depending on the selected bus stop. Specifically, they choose among multiple charging station technologies, which have different charging rates. Thus, stations with a higher charging rate are more expensive.
Reference [25] goes beyond in the way of computing the cost of the system installation by taking into account more variables. By considering three engine technologies (biodiesel, biogas, and electric), their model assigns a type of bus to each route. Therefore, it includes not only the cost of buying the different vehicles but their operational cost over a fixed period of time. These additional costs involve, for example, the required fuel and the charging station maintenance for the electric buses. Moreover, the model of [25] optimizes the tradeoff between the financial system's cost and the CO2 emissions produced by it. Similarly, [26] studies the traditional charging location problem with a unified objective function taking into consideration the cost of installing the facilities, transportation costs derived from completing the trips, and the electricity price at different times of the day. In a similar context, [27] proposed a slightly simpler objective for the model to balance the "environment equity and the capital investment". That model extends [28] aiming at developing a system for a partial replacement of the entire diesel-engine fleet for a mixed-one. Furthermore, [29] proposed a detailed cost function to aggregate a variety of components of the charging location problem (e.g., economy, technology, and environment) to optimize the long-term impact of eBuses in Nanjing (China).
Lastly, the model of [30] chooses among different battery capacities, so that, the authors study the tradeoff between the number of charging stations and the overall cost of the system. The bigger the size of the batteries, which are more expensive, the fewer the number of required charging stations. Further, the authors fed the model with the output of a simulation and estimated the energy consumption of each trip based on traffic, weather, and other information. Additionally, they modeled the nonlinear charging process of batteries.
Our focus is to model other complexities of a public bus transportation system that have not been studied in the literature. First, it is important to have a consistent charging schedule, which prevents the occupation of chargers already in use. Although [27] and [28] allow simultaneous charges in the same location by installing multiple chargers in a single charging station, in some circumstances, making the buses wait could be more cost-effective. Therefore, our model includes a group of non-overlapping constraints, which essentially prevents two buses from charging simultaneously in the same charger. Outside of the tour-based works, [31] proposed a queuing model for a taxi network that considers the construction of waiting places within the charging stations. They show that making vehicles wait for vacant chargers decreases the number of required chargers significantly.
Second, the transition to an electric-based bus system could impact the timetables of the original routes due to the addition of the charging times in the schedule. Reference [30] address this issue by allowing charging operations only during dwelling times as prescribed in the original route schedule. In other words, the timetable schedule is kept intact. Alternatively, we propose a more flexible approach, allowing small enough variations in the original timetable, leading to a relaxed version of the problem. In [32], the authors proposed a simplified model that integrates the described behaviour of the charging location problem and then tackled it using Local Search [33].
In [34], the authors propose a robust framework for the charging location problem with dynamic energy consumptions. In this work, the authors assume that the energy required to complete a trip might vary due to uncertain events, e.g., traffic or road conditions. Therefore, the solution approach defines an energy consumption interval with the minimum and maximum required power to complete a given trip. Similarly, [35], [36] propose a robust framework to optimise the charging infrastructure and fleet size with uncertainty in the supply and demand of power to operate the fleet. We remark that these two papers are fundamentally different from our work as the authors assume that the charging stations must always be available to recharge the fleet of eBuses within certain intervals. In this work, we assume that the charging stations might be unavailable at any time in a workday.
Finally, to the best of our knowledge, there is no related work that formulates a robust system for a public electric transportation network, which can recover from charging stations failures. In [37], the authors present an analytical model for an already constructed node-based charging system, which computes the probabilities that vehicles cannot find available charging stations. The model considers that these vehicles try to access predefined alternative charging stations when they find their preferred ones occupied. Thus, that model is useful for evaluating a robust system rather than designing one.
In another line of work, the Electric Vehicle Scheduling Problem (EVSP) extends from the classic VSP [38]. In the EVSP, the goal is to assign electric vehicles to a set of trips with predefined departures and arrival times. Both the CLP and the EVSP must generate vehicle charging schedules with predefined timetables. However, in CLP, we assume welldefined routes for each vehicle, whereas the EVSP aims at finding optimal routes. Furthermore, a model for CLP delivers an optimal location for fast charging stations, whereas EVSP assumes that the charging infrastructure is already available. Thus, the CLP fits in the strategic phase of a bus transportation planning process, wherein the result will last years or decades [39]. Alternatively, the EVSP falls into the tactical planning phase that might be revised more frequently (e.g., monthly). In [39] the authors recap several variations of the VSP for electric vehicles, including the Electric Bus Scheduling Problem [40], [41]. Moreover, [42] tackles the charging scheduling problem for eBuses while optimizing the use of renewable energies.
We would like to remark that our model is useful for transitioning to eBuses from a transportation system with well-defined routes and timetables. Then, in summary, the main contributions of this model include: (1) the generation of new timetables that guarantee minor enough disruptions with respect to the original ones, but, at the same time, allow us both introducing charging times for the eBuses and preventing overlapping events during those times over the same chargers; (2) a robust framework that prevents the transportation system from degrading its operation in case of a charging station failure; and (3) an effective LNS framework to tackle the robust charging location problem.

III. DYNAMISM AND ROBUSTNESS
In real applications, such as the transition to eBuses, the environment associated with the problem is dynamic. For instance, as previously mentioned, the transportation system is susceptible to failures and disruptions due to unexpected events, e.g., traffic congestion, accidents, power outages, etc. In dynamic environments, a solution that holds for the original problem can become invalid after changes occur in the problem.
Currently, there are two main approaches to deal with these situations: reactive and proactive. Using reactive approaches entails resolving the problem after the solution is invalidated due to unexpected changes, this involves additional (and probably unavailable) resources, e.g., computational time. Besides, in many real applications, such as the one treated in this paper, there is not enough time for recomputing solutions. For instance, in the eBus transportation network, having to recompute a solution from scratch would involve time, delaying and perturbing the regular service of the system. Furthermore, the new solutions might involve the installation of additional chargers, an impractical and inoperative alternative.
Due to the above-mentioned disadvantages, in this paper, we develop a proactive approach, which offers resistance to possible future alterations of the problem. Proactive approaches anticipate potential unexpected events in the original problem. Thus, we use prior knowledge about the dynamism of the system to avoid or minimize their impact in the original solution. Generally speaking, proactive approaches that involve some degree of robustness are either flexible or stable. These concepts are similar and sometimes have been incorrectly interpreted in the literature [43].
In [44], the authors define the most robust solution within a set of solutions as the one with the highest likelihood of remaining a solution after a given set of possible changes. In the literature, many approaches assume that the problem has associated information about future possible disruptions (e.g., specific probabilities of failure, etc.). However, as mentioned in [45] in real applications this specific information is typically (completely/partially) unknown. For this reason, for the robust charging location problem and under the assumption that the chargers have an equal likelihood of failing, we define: Definition 1: The most robust solution for the charging location in eBuses is the solution that can remain valid after, at least, a single charger failure.
Hereafter, we present a MIP model that searches for the most robust solution. This solution is highly beneficial for the eBus transportation network as it ensures that the service and scheduled timetables will be satisfied even if any of the fast-chargers fail.

IV. THE CHARGING LOCATION PROBLEM
The bus network is a composition of several routes and buses connecting different parts of the city. Each route consists of a predefined sequence of stations and a single bus may serve multiple routes during the day with certain operational constraints. The objective of the Charging Location Problem (CLP) is to identify the minimum number of charging stations for a set of identical eBuses. We remark that this problem is known to be NP-hard [11], [46], [47].
Let b ∈ B be a set of eBuses, S b be a sequence of ordered stops s bj ∈ S b indicating the traveling path of b in a workday. This path might include cycles, namely a bus can visit the same station several times. For instance, in Figure 2, a bus is traveling from station A to station E, stopping at B, C, and D. Then, it could continue by either traveling backwards (green line) or directly restarting its tour from station A. Consequently, multiple stops might occur at the same station (e.g., stops 1 and 9 or stops 1 and 6 occur at station A).
Each scheduled stop s bj is associated with a pair (st bj , t bj ) where st bj represents the j-th station in the path of b and t bj denotes the timetabled arrival time (given by the original timetable of the buses). Furthermore, in order to ensure a smooth transition to eBuses, let μ define the maximum deviation time between the expected arrival time and the actual arrival time with eBuses.
In this paper, we assume a spherical earth projected to a plane for computing the distance between a pair of GPS coordinates corresponding to two consecutive stops in a bus route [48]. In this context, we assume that the buses consume a kilowatt-hour (kWh) of power per km, and the time needed to complete the segment is proportional to the distance and the speed of the eBus.
In the following, we describe the CLP. It is worth noticing that we use the definitions and notions of [32], [33] to model this problem. Tables 1 and 2 outline terms commonly used in the description of the model.

A. BATTERY CAPACITY CONSTRAINTS
Constraint (1) sets the minimum energy levels at all times and ensures that the buses will have enough power to complete the predefined trip. Manufacturers recommend maintaining  To produce a more realistic model, we include a security margin time between charges SM that is set to 1 minute. Consequently, we include Constraint (6) since two consecutive stops could occur at the same station. This situation arises because buses may finish a trip at one station and depart later from the same place, so we assume two different stops.
Constraints (7) and (8) calculate the deviation time ( t bi ) from the original bus timetable at each bus stop. The deviation time is equal to the absolute value of the difference between the expected and the actual arrival time. Furthermore, we force the deviation time to be less than or equal to a given threshold μ in Constraint (9) in order to avoid significant timetable disruptions.
Constraint (10) enforces reasonable charging times starting from an amount of time ψ. Unless otherwise stated, we use ψ = 1 indicating that the minimum charging time is one minute.

C. INSTALLING CHARGING UNITS
The following set of constraints indicates whether a charging unit will be required at a given station i. Additionally, manufacturers recommend avoiding fast charging a battery for more than a given threshold (e.g., 80% of the capacity) to reduce overheating and potential damages in the lifetime of the batteries [49]. Taking this into consideration, Constraints (11) regulates the maximum charging time per charging cycle to up β minutes when x bi is equal to one. In addition, Constraint (12) ensures that a bus can only charge at a given station only if a charger has been installed in such station.

D. NON-OVERLAPPING CONSTRAINTS
The following set of constraints ensures admissible schedules with non-overlapping charging times, i.e., the charging time in the same station for any pair of buses cannot overlap. Then, if a charger is occupied, the other buses must wait until it is released. Let Z bdij be a Boolean variable denoting whether buses b and d are using the same charging station or not (bus b in its i-th stop and bus d in its j-th stop). Considering a station st bi = st dj , Constraints (13) and (14) fix the value of Z bdij to zero if any of the buses b or d do not charge in this station. In the same way, Constraint (15) fixes the value of Z bdij to one only if both buses b and d charge in this station.
Only if Z bdij is equal to one, Constraints (16), (17), and (18) ensure that the two buses are not using the same charging station at the same time. If z bdi is equal to zero, the bus b charges after the bus d. Otherwise, if z dbj is equal to zero, the bus d charges after the bus b. Thus, either z bdi or z dbj must be zero when Z bdij is equal to one. Moreover, the security margin SM, defined for Constraint (6), further constrains the feasible charging times of the buses. We assume that M is an arbitrarily large constant.

E. MINIMUM REQUIRED RE-CHARGED ENERGY
To improve the performance of our model, we added a redundant constraint that establishes a lower bound in the amount of electricity each bus has to charge during its route. Thus, Constraint (19) computes the required electricity for each route through parameter D ij , taking into account both the starting full energy capacity of the battery and its allowed minimum level.

F. OBJECTIVE FUNCTION
As indicated above, the objective of the CLP problem is to minimize the number of charging stations due to the associated cost of installing fast charging stations. Equation (20) describes the objective function, we iterate over the set of stations st ∈ ST to access all x i variables.

V. MODEL WITH ROBUSTNESS
In this section, we present our model for the RCLP. Note that this is an extension of the previous model described in Section IV.
In Section III, we defined a robust transportation network as a system that can recover from, at least, a single failure at any of the fast-charging stations, and independently of the total number of failures. Therefore, here we differentiate between primary (or regular) and backup charging stations. Primary charging stations should be used under normal operating conditions, and backup stations will replace the primary ones in case of failure.
To accomplish a robust system, we create a backup route for each bus, and this new route will provide the necessary energy to safely arrive at a primary station. Additionally, since the new route is defined per bus, a charging station might be a primary station for some buses while it is a backup station for others.
A complete failure at any station should not negatively impact the regular operations of the system, i.e., the timetables nor the driving range of the buses should not be negatively impacted as a result of the failure.

A. NOTATION
In order to model parallel backup routes, we need to define a copy of the variables associated with the buses as described in Section IV. We denote these backup route variables with the same names as the original ones but appending an apostrophe ( ) at the end, which stands for backup. Then, the parallel backup route variables are: c bi , e bi , ct bi , t bi , t bi , x bi , z bdi , z dbj and Z bdij .

B. MATHEMATICAL MODEL
In this section, we present the new set of constraints required to model the robust charging location solution.
Firstly, we add the new constraints that are purely for creating a backup route. These constraints are just a copy of the constraints that are defined for the primary route (but using the new backup variables). We name these constraints as: [(1)',. . . , (18)']. We omit this part for simplicity.
Note that the objective function of the robust problem remains the same, minimizing the number of installed chargers. As mentioned, the installed chargers must include the primary and backup chargers (this is modeled by the constraint (12) and (12)').
After adding the constraints associated purely with the backup route, we must introduce the constraints for deciding where to place the backup chargers. In addition, we have to allow switches between primary and backup routes. The switches from primary to backup routes allow the buses to recharge in the event of a failure, and the switches between the backup to the primary routes allow the buses to return to the original route once the disruption has been fixed by recharging in the backup charger. Furthermore, we have to control the non-overlapping between both routes (primary and backup), so that when a failure in the primary charging station happens, the switch to the backup route does not interfere with the primary route of another bus. Hereafter, we introduce the new constraints according to their topics.

C. BACKUP CHARGERS
We need to ensure that the buses are not using the same charging station for both routes (i.e., primary and backup) in the path of the buses. Taking this into account, we introduce Constraint (21), which forces the backup variables, i.e., x bi to be zero if the primary variable x bi equals to one, only when the corresponding stations of both stops are the same. This constraint prevents a station already used by the primary route from being used as a backup on the same stop or later. Likewise, a station that works as a backup can only be used in subsequent stops by the primary route. Thus, we ensure a charging station cannot be the backup of itself. Figure 3 illustrates this behaviour. Blue rectangles denote the primary charging stations, and blue batteries represent the charging levels of an eBus in the primary route. Whereas the red dashed rectangles represent the chargers in the parallel backup route, and the red batteries represent the charge levels of a eBus in the backup route. The lightning represents the battery charging. Note that the primary route is intended for the primary charging stations, and the backup one is intended for backup charging stations for a given eBus.

D. SWITCHING FROM PRIMARY TO BACKUP ROUTE
We also need to ensure that the buses can switch from the primary to the backup route at any time (in case of a failure in the primary charging station). Therefore, in order to maintain a proper service without interruptions, the backup route must be reachable under certain conditions, i.e., arrival time and the capacity of the batteries. Our robust model guarantees that a bus on the primary route will have neither energy deficit nor time delays that could inhibit it from switching to the parallel backup route.
Thus, a bus following the primary route must always arrive at a primary charging station with enough capacity to reach the backup route, and thereby ensuring that it can reach the next backup charging station without the energy provided at the primary charging station. We guarantee the route switching (from primary to backup) at the arrival time to the primary charging stations since it is the critical last moment in which a bus can notice a failure in the chargers, taking into account such a failure can occur at any time. This behaviour is attained by constraint (22). Figure 4 is a similar figure as Figure 3 but it specifies the time constraints rather than the charge constraints.
Constraint (23) ensures that the actual arrival time at a primary station must be less than or equal to the arrival time to the station in the backup route. This is represented in Figure 4 in the nodes 4 and 7.
Constraints (22) and (23) help to prevent the model of placing the backup charger before the primary station. On the contrary, we force the backup stations to be located after the primary ones, allowing then the buses to react and reach the next backup station in case of a failure in the primary one.
In Figure 3, it can be observed that when the bus is in the primary route (in blue) and arrives to station 4, its power must be greater than or equal to the power in the backup route (in red). This ensures that if station 4 is unavailable, then the bus will have enough energy to reach station 5 to recharge the battery in the backup charger (by switching the route, represented with a green arrow).
In the same line as our previous constraint, Constraint (23) ensures that the buses will not experience time delays. Figure 4 shows an example of a bus arriving at 9:05 at station 4, the bus can switch to the backup route and still reach station 5 at 9:10 without delay. Furthermore, the bus can reach the next primary charging unit (i.e., station 7) as originally expected.
Note that both constraints only must be satisfied in the primary charging stations (if x bi is equal to one).

E. SWITCHING FROM BACKUP TO PRIMARY ROUTE
eBuses can equally operate on the primary and backup routes. However, in order to provide a robust solution with the ability to overcome additional unexpected events, we assume that the driver of the eBus switches back to the primary route as soon as possible. By returning to the primary route, we provide an additional protection mechanism as there will be backup chargers available to protect the system from subsequent failures in the system. Figure 3 shows this route swapping behaviour with the green arrow from node 5 to node 6. We ensure that the system is robust to, at least, a single failure at anytime during a workday. The behaviour of route switching is represented in Figure 3 with a green arrow from node 5 to node 6.
In order to achieve the above-mentioned behaviour, we must ensure that when the buses leave a backup charger, their battery level is greater than or equal to the level of the battery in the primary route at the same station. Then, the buses will have enough battery to switch back to the primary route after using a backup station. Constraint (24) ensures that the battery levels at the arrival of the following station after leaving a backup station (when x bj is equal to one). This can be observed in node 6 of Figure 3.
Likewise, we must include a time constraint to ensure that the backup route will not affect the regular operational time of the buses (i.e., satisfying the time disruption constraint). Constraint (25) indicates that the arrival time of a bus, after completing the segment st bj , st bi , is consistent with the expected arrival time of the primary route after refueling in the backup station (x bj ), this way the buses will safely return to the primary route. This constraint is illustrated in Figure 4 in the nodes 5 to 6 (see green arrow).

F. NON-OVERLAPPING BETWEEN PRIMARY AND BACKUP ROUTES
In addition to the non-overlapping constraints for the primary and backup routes (Constraints [13][14][15][16][17][18] and their backup version [13'-18'], see Section IV-D) we must ensure that the buses do not overlap in a charging station that is used for some buses in the primary route and for other buses in the backup route. Then, if a charger is occupied (for primary/backup route), the other buses (in the other type of route) must wait until it is released.
The new non-overlapping constraints between primary and backup routes are defined in Constraints [26][27][28][29][30][31]. Note that we use the double apostrophe for the variables z and Z because the single apostrophe was already used for the overlapping constraints related only to the backup route, while these constraints represent a mixture between primary and backup. Then, Z bdij is a Boolean variable denoting whether bus b in backup mode and bus d in primary mode are using the same charging station or not (bus b in its i-th stop and bus d in its j-th stop). Then, only if Z bdij the bus b in backup mode must be forced to charge before/after the bus d in primary mode. If z bdi is equal to zero, the bus b (in backup mode) charges after the bus d (in primary mode). Instead, if z dbj is equal to zero, the bus d (in primary mode) charges after the bus b (in backup mode).

VI. LNS FOR THE RCLP
LNS [50], [51] is a popular meta-heuristic approach to tackle combinatorial problems. Generally speaking, LNS starts with an initial solution and iteratively decomposes the problem by destroying and repairing it to create new relaxed subproblems. The destroy operation aims at removing portions of a given problem instance, e.g., deleting buses, and the if |s| < |s best | or s best = nil then 8: s best := s 9: end if 10: end if 11: end while 12: return s best repair operation aims at reconstructing, e.g., adding buses, in a given instance. Furthermore, we use CPLEX to solve relaxed instances of the problem.
Algorithm 1 depicts the pseudocode of our LNS algorithm to tackle the Robust Charging Location Problem. Line 1 aims at computing an initial partial solution by using CPLEX to solve the relaxed problem without robustness; we remark that this partial solution might not be a valid one for the robust problem. In particular, we explore the following two destroy operations to create a relaxed instance I of the original one I: • random-destroy: removes, uniformly at random, a percentage (ω) of the buses of I; • line-destroy: I includes all buses from the busiest route line in I, i.e., the one with the largest number of buses.
Lines 3-11 form the core of the algorithm by iteratively improving the solution. Line 4 gradually solves and repairs the current solution by exploring the neighborhood of I = destroy(I). Consequently, the algorithm accepts a new solution (Line 5), iff, s is a valid solution for the problem with robustness. Lines 6-9 keep track of the best solution found so far.
Algorithm 2 outlines the repair algorithm. Lines 3-9 successively repair the relaxed instance (I ⊆ I) by exploiting the incumbent solution to solve it with CPLEX. In this paper, we propose the following two neighbour operators to repair a relaxed instance: • random-repair: adds, uniformly at random, a percentage (ω ) of the remaining buses into the instance, i.e., I \I ; • line-repair: adds all the buses from the busiest route line in I \ I .
We remark that in both cases the neighbour operator returns nil if I * = I. Furthermore, we use random-repair with random-destroy and route-repair with route-destroy. In the same vein as the previous algorithm, we only accept a new solution, iff, s * is a valid solution for I with robustness. Finally, the solve-RCLP function (Algorithm 2) uses CPLEX to solve I * employing the input solution using the following two options: • chargers: pre-defines the charging stations before invoking CPLEX, i.e., ∀ st∈s * x st = 1, so that the new solution will have at least |s * | chargers. However, we allow CPLEX to recompute the charging schedule of the fleet of buses in I * . • chargers and schedule: pre-defines the charging stations (as the previous approach) and the charging schedule of the buses in s * . Therefore, this option aims at finding the best solution for neighbour(I * ) \ I * . It is worth noticing that the first time we attempt to solve a relaxed instance, i.e., Line 4solve-RCLP with I * =destroy(I), we invoke CPLEX with s * as a warm solution to supply the solver with hints of the solution rather that pre-defining the values of the variables. This allows the exploration of better solutions for the entire problem. Otherwise, the LSN algorithm would be unable to improve s best after the first iteration of the main loop in Algorithm 1.

VII. DATASET
In this section, we describe our reference instances for our empirical evaluation. In particular, we collected real data on the current operations of the public bus transportation system for three Irish cities, i.e., Cork (11 lines), Galway (6 lines), and Limerick (7 lines). 2 These systems are structured over multiple route lines, each one denoting a route between two or more terminal stops over which a bus regularly travels. Nevertheless, since there are various timetables in a single route line, every line needs several buses to be covered. Table 3 describes the number of route lines per city, roughly proportional to the size of the city. This table also shows the total number of buses and bus stations for each city.
Moreover, Figures 5 and 6 present the number of stations and the number of stops per route line in these three cities. Thus, besides having more route lines, each line of Cork has more stations and stops in general. Accordingly, our 2. Available at https://buseireann.ie/ Cork city dataset is considerably bigger than our Galway and Limerick ones. In particular, we would like to remark that seven lines in Cork include more than 60 stations, while only two lines in Galway and Limerick involve more than 60 stations. We recall that the current locations of bus stations for embarking and disembarking passengers represent the potential set of locations of fast chargers. Therefore, some fast chargers might be located at the intersection of several route lines. Figure 7 displays the distributions of bus stations located at the intersection of two or more route lines. In particular, we note that 31 (Galway), 23 (Limerick), and 63 (Cork) stations are located at the intersection of two route lines.
In a similar vein, the Cork dataset consistently has more stops to supply the demand for each route than the Galway and Limerick datasets. It can be observed that two lines (i.e., 208 and 220) include more than 4000 stops, while Limerick only includes a single line with about 4000 stops. Figure 8 depicts the distribution of traveled kms for each bus for our reference cities. On average, the buses travel 147 km, 120 km, and 128 km respectively for Cork, Limerick, and Galway. The overall distances range from 2.2 km to 221 km (Galway), from 8.6 km to 355.7 km for Limerick, and from 8.1 km to 330.2 km (Cork).
Finally, Figure 9 depicts the distribution of the distances (in km) per segment (i.e., distance between two consecutive stops) for each city. Although most segment lengths are less than one km, the model could face a challenge by dealing with a significant number of longer segments, usually located along rural areas. However, the longest segments of 25 km do not represent a risk for the feasibility of the instances with regard to the battery sizes.

VIII. EVALUATION
In this paper, we use the above-mentioned dataset to simulate different scenarios for the transition to electric buses in three Irish cities. We performed all our experiments on a 2.5 GHz Intel Xeon W-2175 processor with 64 GB of memory running the Ubuntu 18.04.5 Linux distribution and CPLEX 22.1. Additionally, we consistently executed four concurrent experiments in the machine, using 4-threads for each experiment. Furthermore, we use CPLEX with its default parameters and a 12-hour time-limit for each instance.   Table 4 reports the number of chargers and the execution time for the CLP with and without robustness with CPLEX for our three reference cities. Underlined numbers indicate that the robust model was able to prove optimality within the time limit of 12 hours. It might be noted that for some instances we report 0 mins. due to the execution time was less than 0.05 minutes. We assume that the charging rate is 10kWh per minute (i.e., α=10) and the buses consume 1 kWh per km. Additionally, we conducted experiments varying the size of the batteries (C max ), i.e., 160 kWh, 180 kWh, 200 kWh, and 220kWh. The deviation time goes from μ=4 to μ=6 minutes. Furthermore, we limit the charging time per cycle of the buses (β) to the time needed to recharge the batteries to up to 80% of the maximum capacity. Finally, it is important to remark that we fed the robust experiments summarized in this table with the output of the non-robust ones. This way, we create a warm start solution using the primary charging stations (x variables) of the non-robust solution. Generally speaking, we have observed that these warm solutions consistently helped to improve the quality of the solutions.
All our results exhibit a tradeoff between the number of installed charging stations and the battery sizes. Specifically, for the non-robust version of the problem (when an optimal solution is always found), we observe reductions from 25% to 66% in the number of chargers when increasing the battery size from 160 kWh to 220 kWh. The variation is more relevant in the robust scenario, in which the experiments performed with 220 kWh always produced realistic or reasonable solutions with less than 15 chargers, whereas the commercial solver was unable to find reasonable solutions for the majority of the instances with 160 kWh.
As expected, relaxing the battery size positively impacts the performance. However, relaxing the timetable disruption time (μ) from 4 to 6 minutes seems to have a mixed impact on the performance of the solver. For instance, for the CLP in Cork with 160 kWh, the execution time was reduced by half when relaxing μ. Moreover, for the RCLP in Limerick with 160 kWh, we went from having a solution with 113 chargers to only 9 chargers with larger disruption times.
Alternatively, for the RCLP in Cork with 200 kWh, the solver computes a poor solution with 86 chargers with μ=6 minutes, whereas it finds a solution with 28 chargers with μ=4 minutes. We attribute this phenomenon to the fact that increasing the disruption time consistently increases the number of potential overlapping events between pairs of buses. In particular, the number of these events grows in the order of O(n 2 ) with regard to the number of stops in the worst-case scenario. Thus, relaxing the problem by increasing the maximum deviation times does not necessarily improve the performance.
When moving from the CLP to the RCLP, CPLEX requires a considerable increase in computational effort (see Table 4). However, we remark that the charging infrastructure is likely to remain unchanged for years and bus operators might need several days or weeks to identify suitable places for the charging stations [39]. In this context, our model is designed to be executed only once in order to define the charging infrastructure. Furthermore, as pointed out in Table 4, CPLEX needs to, at least, double the number of charging stations for our Galway and Limerick Instances. We also note that the solver recommends some solutions with hundreds of charging stations. Thus, the decision to implement a robust system will depend on the particular needs of the bus operator, especially regarding its budget.
Let us now switch our attention to the LNS meta-heuristic framework (Table 5). In these experiments, we explore the following three parameter configurations: • LNS-L-C: implements the line-destroy/repair algorithm and the chargers option of the solve-RCLP function. • LNS-R-C: implements the random-destroy/repair algorithm and the chargers option of the solve-RCLP function. • LNS-R-CR: implements the random-destroy/repair algorithm and the chargers and schedule option of the solve-RCLP function. We use ω = 50% for the destroy operation in LNS-R-C and LNC-R-CS to randomly remove half of the buses in the destroy phase, and ω = 25% to incrementally repair relaxed instances. Additionally, we use a 1-hour time-limit to solve relaxed instances with CPLEX and the same 12-hour time-limit as in our previous experiments to solve individual instances. We remark that CPLEX needed, on average, only 1.5 minutes to solve relaxed instances for our largest dataset of Cork city.
As can be observed, LNS-R-C outperforms LNS-L-C. We attribute this to the stochastic component of the algorithm and the incremental reconstruction of the relaxed instances. Furthermore, LNS-R-CR consistently outperforms CPLEX and the other two LNS versions. We attribute the outstanding performance of LNS-R-CR to the exploitation of the incumbent solution to include the location of the charging stations as well as the schedules.
As pointed out above, CPLEX computes unrealistic solutions with hundreds of charging stations for five out of twenty-four experiments. Alternatively, our LNS framework is capable of computing solutions with 8 to 21 charging stations for the same five instances. It is worth noticing that our best LNS configuration considerably outperforms CPLEX for our large-size instances and compute solutions with at least the same quality for the remaining instances. Figure 10 shows the relative performance improvement of our LNS algorithm against CPLEX. We compute the performance improvement as follows: where S CPLEX and S LNS denote the solution of CPLEX and our best LSN algorithm to solve a given instance I. As can be seen LNS dominates CPLEX, producing solutions with up 97% fewer charging stations for the Cork dataset with C max =180 kWh and μ=4 minutes. We remark that CPLEX was unable to calculate a feasible solution with C max =160 kWh and μ=4 minutes, therefore we calculate the performance improvement assuming that there is a charging station at every bus stop. We also would like to point out that our LNS algorithm generates better solutions with up to 43% and 87% fewer charging stations for Galway and Limerick. Figures 11, 12, and 13 show the cumulative distribution of the charging times per charging event for our CPLEX and LNS-R-CS experiments with μ=6 minutes. This figure shows the number of charging events (y-axis) whose charging time is less than or equal to a specific number (x-axis). For instance, for the CPLEX primary route in Limerick with a 160 kWh battery (Figure 12(a)), roughly 10 out of 30 charging events last up to 2 minutes. Thus, as expected, it can be observed that the number of charging events per station increases as we reduce the capacity of the batteries. Furthermore, we would like to highlight the close correlation between the number of charging events in the primary route and its backup one since the mirroring behavior between the two routes is an important component for robustness.

IX. CONCLUSION AND FUTURE WORK
In this paper, we have studied the charging location problem for eBuses and extended our model to provide a degree of robustness to protect the system from failures in any of the charging stations. A major failure in a charging station would have an impact on the transportation system and might delay or completely stop the regular operation of certain buses. For this reason, our robust model is capable of providing the same quality of service with and without interruptions by creating alternative routes to backup charging stations. Additionally, due to the complexity of the problem, we also proposed a LNS framework to efficiently tackle the problem. As expected, the number of charging units increases as we decrease the capacity of batteries (C max ). CPLEX is able to tackle the problem for small-size instances. However, it struggles to find reasonable solutions for the remaining instances. Notably, our LNS framework is capable of efficiently solving all our instances with different parameters, i.e., battery capacities and deviation times, requiring fewer charging stations than CPLEX. In particular, for our hardest instances with a deviation time of 6 minutes, our LNS framework finds a solution with 43%, 93%, and 87% fewer charging stations for respectively Galway, Limerick, and Cork with C max = 160 kWh.
In the future, we plan to study a multi-objective approach to provide a tradeoff between the level of robustness and the size of the batteries, while reducing the deviation time. Furthermore, we plan to extend our notion of robustness with the one proposed in [34] to deal with uncertainty in the energy consumption and arrival times of the eBuses.