## 2 Materials and Methods
### Approach to Quantifying Battery Swapping Demand (BSD)  
Before estimating the _BSD_, it is necessary to calculate the state of charge (\(SoC\)) of ETs at the beginning of each time slot [22]. Figure 3a shows the departure time distribution of taxi drivers over a day. Figure 3b shows the percentage of travel distance by taxi per hour. According to multi-day GPS trajectory data, we obtain Figure 3a,b, and the results are consistent with the experience knowledge. Since the end-time distribution of taxi drivers over a day is uneven, we use the dataset to determine the average speed and to calculate  
Figure 2: Probability distributions of daily mileage for different types of ET drivers.  
the end time by summing the average travel time (daily travel mileage \(d_{v}\) divided by the average speed \(u_{a}\)) to the departure time \(t_{v}^{depurture}\), according to Equation (3).  
\[t_{v}^{end}=t_{v}^{depurture}+\frac{d_{v}}{u_{a}} \tag{3}\]  
Given the departure time, end time, and daily mileage of ETs, the energy consumption and \(SoC\) of ETs at each time slot \(t\) can be approximated based on the percentage of travel distance per unit time to the total distance. The \(SoC\) of the ET \(v\) at time slot \(t+1\)\(SoC_{v}(t+1)\) can be expressed as follows:  
\[SoC_{v}(t+1)=SoC_{v}(t)-p(t)\cdot d_{v}\cdot E^{um}/\left(E_{B}\cdot N_{v}^{B}\right) \tag{4}\]  
where \(p(t)\) denotes the percentage of travel distance at time slot \(t\) to the total travel distance, \(d_{v}\) indicates the daily total travel distance of ET \(v\), \(E^{um}\) indicates ET electricity consumption, per kilometer (kWh/km), \(E_{B}\) indicates the battery capacity of one battery block, and \(N_{v}^{B}\) indicates the number of battery blocks that ET \(v\) rents.  
The battery swapping price includes the electricity price and the battery swapping service fee, which is higher than the residential charging price; thus, drivers will choose the battery swapping service when the remaining battery electricity of ETs cannot satisfy the remaining daily travel. Otherwise, they will charge the ET at home to save money. Hence, the battery swapping decision for ET drivers is made according to the following two conditions:  
1. If the remaining battery electricity of the ET cannot meet the remaining daily travel, drivers will choose to swap the battery.
2. The anxiety threshold of \(SoC\) is set at 0.2 (20%) [23]. If the remaining battery electricity drops below the threshold, drivers will choose to swap the battery.  
Therefore, the \(BSD\) of ET \(v\) at the beginning of time slot \(t\)\(BSD_{v}(t)\) is calculated as Equation (5):  
\[BSD_{v}(t)=\left\{\begin{array}{cc}N_{v}^{B},&SoC_{v}(t)\leq SoC_{v,r}(t),& SoC_{v}(t)\leq SoC_{st}\\ 0,&otherwise\end{array}\right.\quad\forall t\in T \tag{5}\]  
where \(SoC_{v,r}(t)\) represents the minimum \(SoC\) required for the remaining travel distance of ET \(v\) at the beginning of time slot \(t\), and \(SoC_{st}\) indicates the anxiety threshold of \(SoC\).  
Finally, we can obtain the new \(BSD\) for the BSS at time slot \(t\) by Equation (6).  
\[N_{BSD,t}^{netv}=\sum_{v=1}^{V}BSD_{v}(t)\quad\forall t\in T \tag{6}\]  
Figure 3: Departure time distribution and percentage of travel distance per hour in this study.