Keywords

1 Introduction

The transition to a fleet of eBuses will require a considerable up-front investment in the charging infrastructure. The actual cost of a charging station varies depending on the desired charging infrastructure. The starting cost is now estimated at €10K with additional fees proportional to the required power, e.g., €10K for a fast charging point with approximately 600 kW capacity as well as substantial upgrades and cabling costs that can certainly increase the total cost [9]. The daily power consumption of an eBus depends on multiple factors, such as bus type, weight, weather, and road conditions. A standard double-decker working 12 h daily consumes approx. 1.5 kWh per kilometer. However, the power consumption might increase or decrease due to multiple factors.

Range anxiety is one of the main concerns for transitioning to a clean and sustainable bus transportation network. Nowadays, eBuses can travel approx. up to 200–300 KM on a full charge and the charging time varies depending on the technology from a couple of minutes (e.g., with fast-charging stations) to hours (e.g., with slow overnight charging). Therefore, the charging infrastructure must be implemented in a way that the charging time and limited driving range will not impact the quality of service of the transportation system. In this paper, we propose an iterated local search to efficiently tackle the charging location problem, i.e., finding the optimal location of charging stations while satisfying certain properties of the transportation system.

This paper is organized as follows: Sect. 2 describes previous work on the charging location problem for electric vehicles. Section 3 formally describes the charging location problem. Section 4 presents our new meta-heuristic solution. Section 5 presents our empirical evaluation. Finally, Sect. 6 presents some concluding remarks.

2 Related Work

A considerable amount of work has been devoted to the charging location problem for light-duty vehicles (e.g., personal use cars) rather than heavy-duty vehicles (e.g., buses). We remark that public buses operate daily schedules for a given set of routes and buses consume more energy than cars. In this line, in [4, 5, 14] the authors propose a set of heuristic solutions to identify suitable charging stations for electric vehicles, so that the vehicles can reach their destinations without running out of power. [15] takes into account a cost model for the charging location problem by considering different technologies, bio-diesel, bio-gas, and electric to assign a type of bus to each route.

In another line of work, the Green Vehicle Routing Problem (Green VRP) is an extension of the traditional VRP [3]. This extension aims at finding the optimal routes traveled by the fleet of vehicles to visit a set of customers while taking into account certain refueling constraints. We recall that we aim at transitioning to eBuses while maintaining the same service. [2] outlines numerous variations of the VRP for electric vehicles.

Closer to our research, [12] considered a fleet of vehicles, each one with well-defined routes within a network. This work proposes 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. As the author suggests this work could be adapted to a bus transportation system by considering timetables, however, he neglects them in his validation carried out over random-generated networks.

[13] proposes a MIP model for the eBus charging location problem with fixed routes but without taking into consideration certain operational constraints, e.g., fixed timetables or overlapping constraints to prevent multiple buses using the same charging unit at the same time. In [10] the authors take into account the impact of timetables of the original routes by allowing charging when the buses are not moving (dwelling times), e.g., during the rest time of the drivers, therefore, the authors keep the original timetables. Instead, in this paper, we propose a more flexible approach to allow small enough deviations in the original timetable leading to a more general version of the problem. [1] provides more details of the described behavior of the charging location problem.

3 The Charging Location Problem

Conceived in the context of a transition to eBuses, the charging location problem aims to identify, within the set of stations, the locations for installing the minimum number of electrical chargers. These electrical chargers must allow a fleet of eBuses to keep the operation of the system with minimal disruptions (deviations) from the original timetables. In this context, we assume that the charging stations are able to recharge the buses during their normal operation, i.e., in the time between the arrival and departure of the buses in the stations.

Figure 1 outlines an instance of the system for a single bus. In this example, we assume that the bus visits 12 stations. For each station we have three timestamps, i.e., actual arrival time (left), expected arrival time (middle), and departure time (right). In order to reduce the disruptions in the transition from regular diesel buses to eBuses, we fix a maximum deviation time \(\mu \) from the original timetables (2 min in this example). Therefore, eBuses are not allowed to arrive more than \(\mu \) minutes after (or before) the timetabled stop. We also associate each trip between two stations with the required time and power to complete the trip. The number of points sitting below each charging station denotes the amount of power (in kWh) gained at the charging station (yellow stations in this example), e.g., in station 5 the bus gains 2 kWh units of power.

Fig. 1.
figure 1

Example of a solution to the problem for a single bus

Hereafter, we formally describe the charging location problem. Table 1 outlines terms and variables commonly used through the paper.

Table 1. Description of variables and constants.

A public bus transportation system is composed of a set of buses \(\mathcal{B}\) traveling across a set of stations ST, where each bus follows a sequence of ordered stops \(S_b\) visited in a workday. Thus, each stop \(s_{bi} \in S_b\) has associated a station and a timetable that the bus should comply with (\(st_{bi}\) and \(T_{bi}\)).

We build our formulation of the charging location problem on top of a previous MIP model [1]. The objective function (1) is to minimize the number of installed chargers. Constraints 25 ensure buses are not running out of energy during their trips, by maintaining the battery within safe levels. Furthermore, Constraints 69 are in charge of the scheduling of the buses, which must stay within a reasonable deviation time \(\varDelta t\) of \(\mu \) with respect to the original timetables. Constraint 10 enforces a minimum reasonable charging time.

$$\begin{aligned}&min \sum ^{}_{c \in ST} x_{c} \end{aligned}$$
(1)
$$\begin{aligned}&C_{min} \le c_{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}} \end{aligned}$$
(2)
$$\begin{aligned}&c_{bi} + e_{bi} \le C_{max}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}} \end{aligned}$$
(3)
$$\begin{aligned}&c_{bi} \le c_{bj} + e_{bj} - D_{ji}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}, j\,=\,i-1}\end{aligned}$$
(4)
$$\begin{aligned}&\alpha \cdot ct_{bi} \ge e_{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}, j\,=\,i-1}\end{aligned}$$
(5)
$$\begin{aligned}&t_{bi} \ge t_{bj} + ct_{bj} - T_{ji}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}, j\,=\,i-1}\end{aligned}$$
(6)
$$\begin{aligned}&\varDelta t_{bi} \ge t_{bi} - \tau _{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}}\end{aligned}$$
(7)
$$\begin{aligned}&\varDelta t_{bi} \ge \tau _{bi} - t_{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}}\end{aligned}$$
(8)
$$\begin{aligned}&\varDelta t_{bi} \le \mu&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}}\end{aligned}$$
(9)
$$\begin{aligned}&ct_{bi} \ge \psi \cdot x_{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}} \end{aligned}$$
(10)
$$\begin{aligned}&x_{st_{bi}} \ge x_{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}} \end{aligned}$$
(11)
$$\begin{aligned}&\beta \cdot x_{bi} \ge ct_{bi}&\forall _{b \in B} \forall _{s_i \in \mathcal{S}_b \setminus \{s_0\}} \end{aligned}$$
(12)
$$\begin{aligned}&Z_{bdij} \le x_{bi}&\forall _{b, d \in B | b \ne d} \forall _{s_i \in \mathcal{S}_b}, \forall _{s_j \in \mathcal{S}_d | st_{bi}\,=\,st} \end{aligned}$$
(13)
$$\begin{aligned}&Z_{bdij} \le x_{dj}&\forall _{b, d \in B | b \ne d} \forall _{s_i \in \mathcal{S}_b}, \forall _{s_j \in \mathcal{S}_d | st_{bi}\,=\,st} \end{aligned}$$
(14)
$$\begin{aligned}&x_{bi} + x_{dj} \le Z_{bdij} + 1&\forall _{b, d \in B | b \ne d} \forall _{s_i \in \mathcal{S}_b}, \forall _{s_j \in \mathcal{S}_d | st_{bi}\,=\,st} \end{aligned}$$
(15)
$$\begin{aligned}&t_{bi} \ge t_{dj} + ct_{dj} - M z_{bdi}&\forall _{b, d \in B | b \ne d} \forall _{s_i \in \mathcal{S}_b}, \forall _{s_j \in \mathcal{S}_d | st_{bi}\,=\,st} \end{aligned}$$
(16)
$$\begin{aligned}&t_{dj} \ge t_{bi} + ct_{bi} - M z_{dbj}&\forall _{b, d \in B | b \ne d} \forall _{s_i \in \mathcal{S}_b}, \forall _{s_j \in \mathcal{S}_d | st_{bi}\,=\,st} \end{aligned}$$
(17)
$$\begin{aligned}&z_{bdi} + z_{dbj} - (1-Z_{bdij}) \le 1&\forall _{b, d \in B | b \ne d} \forall _{s_i \in \mathcal{S}_b}, \forall _{s_j \in \mathcal{S}_d | st_{bi}\,=\,st} \end{aligned}$$
(18)

Constraint 11 determines the selected charging stations. Constraint 12 prevents overheating by limiting charging time. Finally, Constraints 1318 prevent multiple buses from using the same charger at the same time. We refer the reader to [1] for more details of the MIP formulation.

4 The Iterated Local Search

Iterated Local Search (ILS) is a popular meta-heursitic technique to solve complex combinatorial optimization problems [7, 11]. Generally speaking, the algorithm produces a single-transformation chain of solutions that iteratively improves the objective function. First, in a local search phase, the algorithm tries to improve an initial solution by performing small changes, until a local minimum (\(s*\)) is reached. Then, in a perturbation phase, the algorithm performs random changes to the current incumbent solution (\(s*\)) to escape difficult regions of the search (e.g., a plateau), and to produce a perturbed solution (\(s'\)). Next, the perturbed solution (\(s'\)) is given as an input for a new local search phase that generates a new local minimum (\(s''\)). Finally, an acceptance criterion decides which will be the new incumbent solution (\(s*\)) to continually repeat the process from the perturbation phase. The idea is that the algorithm will primarily prefer the best solution between \(s*\) and \(s''\). However, in order to diversify the search, the algorithm selects the most recent local minimum (\(s''\)) with a certain probability. In this paper, unless stated otherwise, we use a 5% probability to update the incumbent solution.

In the context of the charging location problem, we define an open station as a location (i.e., bus station) with an installed charging unit iff at least one bus is relying on the station to recharge the battery. Therefore, during the local search phase, we aim at closing as many open stations as possible. Alternatively, during the perturbation phase, we aim at diversifying the search by randomly opening stations.

Initial Solution

We propose a simple greedy algorithm to compute an initial solution. We assume that the fleet of eBuses start operations with full capacity. The algorithm commands a given bus b to recharge the battery at a given stop \(s_{bj} \in S_{b}\) if there is not enough power to reach the next stop \(s_{bj+1}\). Furthermore, b will recharge the battery of the bus with, at least, the minimum required power to reach \(s_{bj+1}\). We note that considering that b starts with full capacity, all the stations on the path of the bus might be open once the bus depletes its initial charge.

Furthermore, if b is expected to arrive at \(s_{bj+1}\) before the allowed scheduled time (see Constraints 79), then b uses this additional time (dwell time) to recharge the battery and get additional power. The algorithm repeats this process for each bus \(b \in \mathcal {B}\) in lexicographical order. Additionally, whenever we get an overlapping conflict (i.e., two buses are attempting to use the charging station at the same time, see Constraints 1318), we delay the arrival time of the current bus until the charging station is available.

Let us illustrate the process to compute the initial solution with Fig. 1. We assume that the initial capacity of the bus is enough to reach station 5, at this point the bus needs to recharge the battery with at least 2 kWh; otherwise, the eBus runs out of battery before reaching station 6. Therefore, the bus arrives at station 5 at 8:43 and recharges the battery for 2 min to leave the station at 8:45. Then, the bus arrives at station 6 at 8:47 to recharge the battery again for 1 min. The algorithm repeats the same process until arriving at station 9 at 8:55. Here, our greedy algorithm initially recharges the bus for 3 min (enough to reach station 10), however, by doing so, the bus would arrive at the next station at 9:02, 3 min ahead of the earliest allowed time. We recall the bus is constrained to arrive at station 10 at 9:05. This additional time is known as dwell. Therefore, our greedy construction of the initial solution uses this time to provide extra power (6 kWh). Consequently, station 10 remains closed as the bus does not need to use the station to reach station 11.

Local Search

The main purpose of the local search (Algorithm 1), given a solution s with a set of opened stations (stations - line 1), is to close as many as it can. Thus, the algorithm repeatedly attempts close open stations in a certain order. The selection of an open station (SelectStation), which is a function itself, is passed as a parameter. In particular, we explore two different selection strategies: Random selects a station uniformly at random and MinActivity selects the station with the fewest number of scheduled recharges.

figure a

Lines 4–15 form the core of the local search algorithm. Lines 5–8 select and attempt to close the station. Line 9 removes the selected station from the candidate set. After exhausting the list of candidate open stations we verify whether the algorithm reached a local minimum (Lines 10–12). Otherwise, we repeat the process with the remaining open stations in the solution. Let us recall that stations that could not be closed at a certain point of the execution may become closable after modifying the schedule of nearby stations.

The amount of charged energy remains constant during the whole process, and it is set to the minimum required amount. Therefore, when the algorithm closes or opens a charging station, it redistributes or borrows energy to/from the neighboring stations. The proportion of energy going/coming to/from previous and following stations is random.

The CloseStation operator (Algorithm 2) attempts to stop all charging activity of the buses in a given installed charging station. Therefore, in order to ensure the operation of the system, we redistribute the energy provided by the closing station towards adjacent open stations. We refer to these adjacent stations as previous and next open charging stations.

For instance, Fig. 2 represents two different bus routes (the blue and the green one). Both routes are sharing two locations but only one charging station in location 6. Thus, the charging stations are highlighted in yellow. Furthermore, the small points near the charging stations depict units of energy delivered to each bus. Figure 2a shows the green bus recharging three units of energy at charging station 6 while the blue bus gets one unit of energy at charging station 2. In Fig. 2b, when closing the charging station 6, the three units of energy provided by the charging station 6 to the green bus are redistributed as follows: two-thirds to the next station and one-third to the previous station where the bus was recharging in the original solution. This proportion is decided uniformly at randomly for each stop. In this particular example, the energy is evenly reallocated for the blue bus. Figure 2c outlines the resulting state of the solution after completing the close operation.

figure b
Fig. 2.
figure 2

Example of the close operation applied to station 6 (Color figure online)

Algorithm 2 (CloseStation) checks whether a charging station can be closed or not under certain circumstances and apply the operation. To this end, FeasibleCloseStop verifies if a given bus b can keep operating once the power gotten from recharging at \(s_{bi}\) is moved to the Previous and the Next open stations in the path of b. CloseStop completes the close operations and updates the arrival times, charging times, and the capacity of the batteries of the buses as prescribed by the FeasibleCloseStop algorithm. Taking this into account, CloseStation indicates whether the operation is successful for the entire fleet of buses relying on the input charging station, i.e., the system is capable of redistributing the power provided by the station without violating the operational constraints. We remark that the close operation might be performed partially as once the algorithm finds a non-closable stop, it might have already closed multiple stops for certain buses. We decided not to undo partial closes as it increases the complexity of the operation.

figure c

FeasibileCloseStop (Algorithm 3) verifies if the power provided by the m-th station in the path of b can be redistributed to adjacent stations. To this end, Line 1 calculates an ordered set with the open stations in the path of b. Line 2 calculates \(\rho \) the proportion of energy that goes to the next open stop (1-\(\rho \) goes to the previous one). Lines 3 and 4 define some variables that verify the feasibility of the constraints. Lines 5 and 6 calculate the index of the next (n) and previous (k) charging stations in the path of the bus. We remark that the next and previous charging stations are not always the same as we constantly open and close stations.

Lines 7–15 verify the feasibility of re-distributing energy to n. ne denotes the actual amount of power that b gains at n. nct denotes the additional time that the bus needs to gain the extra power at n. Lines 10–11 check whether the current capacity of the battery is enough to reach n and the new charging time is within the limits. Lines 12–15 check the overlapping constraints and prevent multiple buses of using the same charging station at the same time. We mark that in this scenario there is no need to check for potential time delays as the bus arrives at n earlier than expected.

Lines 16–26 verify the feasibility of re-distributing energy backwards to k. Whereas the risk of running out of power is inexistent the bus could experiment delays in the timetable. The new extra charging time at k could potential delay all the arrival times of the bus in the stations between the closing station and the previous charger. Let us define pct and max\(\varDelta _{bi}\) (Lines 18 and 19). pct denotes the additional time that the bus needs to gain the power at k and max\(\varDelta _{bi}\) denotes the maximum delay a bus is currently experiencing during the trip between the previous station and the closing one. Line 20 ensures that the extra time spent in the previous charger is not disrupting the timetables beyond the threshold \(\mu \). Besides checking a battery overflow in Line 21, there is no need to further inspect that the energy is within the limits. Line 22 checks that the charging time is within the limit. Lines 23–26 check for overlapping charging events.

Let us illustrate the verification process with Fig. 2, and let us assume that the bus recharges one unit of power per minute. Firstly, we recall that the close operation acts on a single bus stop at a time. Thus, the sequence of open stops of the green bus (Algorithm 3 - line 1) includes the stops of the bus at stations 3, 6, and 7. Furthermore, since the selected stop corresponds to the stop at station 6 in that new sequence, the previous and next functions return the stops at stations 3 and 7 respectively.

Now, let us consider the first case to transfer energy towards the previous open stop at stop 3. In the current solution (before the operation) the bus departs from station 3 with at least 1 unit of power. After the close operation, the bus departs with an additional unit of power (we depict this behavior in Fig. 2c). Thus, it is impossible to run out of power during the trip between stations 3 and 6. On the other hand, in the new solution, the bus is spending more time recharging at station 3. This extra time introduces a delay when arriving at station 4, 5, and 6. Therefore, it is paramount to check that the delay of a minute is not violating the maximum allowed disruption time (in the timetable) in any of those stops (checking the most delayed timetable is enough).

Similarly, it can be seen graphically that the amount of power available for traveling between stations 6 and 7 is reduced after applying the operation. Therefore, we must ensure that the trip can be completed. Lastly, since the bus is saving two recharging minutes before departing from station 6, there is no way the bus is delayed when arriving at 7.

Perturbation

The perturbation phase aims at escaping from difficult regions (i.e., local minimum) while maintaining an appropriate balance between diversification and intensification. The operator iteratively tries to open a given station st by attempting to recharge the battery of certain buses while stopping at the station. To this end, we randomly redistribute the gained power at adjacent charging stations of st (i.e., Next and Previous). Thus, we label st as open iff at least one bus relies on the station to recharge the bus. We attempt to open an additional percentage of the opened stations of the incumbent solution, which determines the level of perturbation.

Let us illustrate the process of opening a station with Fig. 2 by looking at the example the other way around. Then Fig. 2c denotes the incumbent solution and attempting to open station 6. Furthermore, let us assume that the yellow arrows in Fig. 2b are pointing in the opposite direction. In this context, the blue bus will attempt to transfer a random portion of the gained power at stations 9 and 2 into station 6. Therefore, in order to open station 6 (blue bus), it is important to verify that the redistribution of the power lost at station 2 leaves the bus with enough power to complete the trip between stations 2 and 6 and that any potential delay (derived from charging at station 6) is not impacting the quality of service.

5 Evaluation

In this paper we use a real dataset with the operations of three Irish cities, i.e., Limerick, Cork, and Dublin.Footnote 1 We implemented the MIP model with CPLEX 12.10 and conducted our experiments on a 2.5 GHz Intel Xeon W-2175 processor with 64 GB of memory running Ubuntu 18.04.5. We used CPLEX with its default parameters, including the parallel optimizer with 12 threads and two time limits (10 and 120 min). Furthermore, we executed our ILS algorithm on each instance 10 times (each time with a different random seed) and reported the median number of open stations (out of the 10 executions) with a 10-minute timeout. All series of experiments had a standard deviation of less than 1.

Table 2 outlines the performance of our ILS algorithm with two selection strategies (i.e., Random and MinActivity). We recall that MinActivity attempts to close the open station with the fewest number of charging events. The first column displays the number of buses and the total number of bus stops per city. We simulate multiple scenarios varying the \(C_{max}\) value and timetable disruptions (i.e., max \(\mu \)). Moreover, in all our experiments, we establish that the charging rate is 1 kWh per minute (i.e., \(\alpha \) = 1), and the buses consume 1 kWh per km. Additionally, we limit the charging time per cycle of the buses (\(\beta \)) to the time needed to recharge the batteries to up to 80% of the max. capacity. Furthermore, we set the level of perturbation to 20% after trying other values (10% and 40%) that did not suggest a significant difference. Bold numbers indicate the method was able to find the optimal solution, whereas the highlighted cells point out the method with the best performance. Lastly, it is worth noticing that we generate initial solutions for Cork and Limerick with up to 455 charging stations, whereas for Dublin we need 1666 stations. Also, the number of local minima found during an execution varies in the order of tens of thousands for Dublin, hundreds of thousands for Cork, and millions for Limerick.

In these experiments we observe that our ILS algorithm finds the optimal solution for small-size (i.e., Limerick) and mid-size instances (i.e., Cork) with \(C_{max}\) = 180 kWh and 200 kWh. Notably, ILS dominates the performance for the remaining instances with at least the same performance as CPLEX with 12 times more computational resources.

Table 2. Empirical evaluation for Limerick, Cork, and Dublin. Bold numbers denote the optimal solution and highlighted cells outline the best performance.

Furthermore, it is remarkable that CPLEX is unable to find reasonable solutions, within 10 min, for 6 instances (out of 10) for our Cork and Dublin datasets. Interestingly, CPLEX with 120 min recommends the installation of more than two hundred of charging units for one of the most constrained instances (i.e., Cork with 120 kWh and max \(\mu \) = 4), whereas our ILS algorithm quickly computes a solution with only 6 charging units, Similarly, our ILS algorithm finds a solution with approx. 40% fewer stations (15 vs. 28 charging stations) for the most constrained Dublin dataset, i.e., 200 kWh with max \(\mu \) = 6. Finally, in general our MinActivity selection strategy performs slightly better than Random. We attribute this to the fact that this heuristic favors stations where the close operator is more likely to succeed.

6 Conclusions

In this paper we have proposed an efficient ILS algorithm to tackle the Charging Location Problem for eBuses. Our proposed algorithm relies on two simple operations, i.e., opening and closing charging stations in a given solution. Furthermore, our approach assumes that the eBuses recharge a constant amount of energy during a workday, therefore, the energy is locally distributed (e.g., when closing a station), among the adjacent stations of the ones affected by the operators. The effectiveness is demonstrated by experimenting with a set of real instances from three Irish cities (i.e., Limerick, Cork, and Dublin). We compared our algorithm against a MIP-based solution and our ILS solution is notably better than CPLEX in terms of the number of installed charging stations, generating results with up to 40% fewer stations in less than 10% of the time for some of the most difficult instances.

In the future, we plan to extend our ILS with robustness to tackle the Charging Location Problem, so that the system is resilient to failures in the transportation network. Also, we plan to perform an extensive parameter tuning using tools like ParamILS [8] or Calibra [6].