## 2 Materials and Methods
### Battery Swapping Station (BSS) Configuration Optimization Model
#### 2.5.1 ET Battery Blocks State-Transition Equations  
At any time slot \(t\), there are three states of the battery blocks in a BSS according to \(SoC\) and the charging behavior characteristics:  
* Battery blocks in fully charged state (\(F\)-state) are available for battery swapping service;
* Battery blocks in the charging pile are in charging state (\(C\)-state);
* Battery blocks unloaded from ETs in the awaiting-charging inventory are in waiting-charging state (\(W\)-state). During the entire operating horizon, the battery in the three states can maintain the original state or transfer to other states, and the state-transition relationship is shown in Figure 4. \begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Definition** \\ \hline Sets & \\ \(T\) & Set of discrete time slots, \(T=\{1,\ 2,\ \ldots,|T|\ \}\) \\ Indices & \\ \(t\) & Index of time slot, \(t\in T\) \\ \(F\) & Fully charged state of battery \\ \(C\) & Charging state of battery \\ \(W\) & Waiting-charged state of battery \\ Parameters & \\ \(c_{B}\) & Unit capacity cost of the ET battery block (USD/kWh) \\ \(E_{B}\) & Rated capacity of a block battery (\(k\)Wh) \\ \(r\) & Discount rate \\ \(L_{B}\) & Life cycle of a block battery (year) \\ \(c_{Bm}\) & Annual operation and maintenance costs of the unit capacity of batteries (USD/kWh/year) \\ \(c_{t}\) & Electricity price at time slot \(t\) (USD/kWh) \\ \(N_{BSD,t}^{new}\) & Number of new \(BSD\) at time slot \(t\) \\ \(P_{c}\) & Rated power of a charging pile (\(k\)W) \\ \(T_{full}\) & Depleted battery fully charged time (h) \\ \(SoC_{end}\) & \(SoC\) of batteries in \(F\)-state (\%) \\ \(SoC_{ini}\) & \(SoC\) of batteries in \(W\)-state (\%) \\ \(N_{CP}\) & Number of charging piles \\ \hline Variables & \\ \(N_{B}\) & Total number of stock batter blocks in BSS \\ \(N_{F,f}\), \(N_{C,t}\), \(N_{W,t}\) & Number of battery blocks in \(F\), \(C\) and \(W\) states at the beginning of time slot \(t\) \\ \(N_{C,t^{\prime}}^{b}\), \(N_{C,t}^{c}\) & Number of battery blocks that begin and finish charging at time slot \(t\) \\ \(N_{BSD,t}^{total}\) & Total number of \(BSD\) at time slot \(t\) \\ \(N_{BSD,t}^{new\|}\) & Total number of \(BSD\) satisfied at time slot \(t\) \\ \(N_{Q,t}\) & Total number of unsatisfied \(BSD\) at time slot \(t\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The parameters in the optimization model. \(N_{W,t}\), \(N_{C,t}\), and \(N_{F,t}\) represent the number of battery blocks in three states at the beginning of time slot \(t\), respectively. According to Figure 4, the number of battery blocks in the \(F\)-state at the beginning of time slot \(t+1\) depends on the number of battery blocks in the \(F\)-state, the number of finishing charging battery blocks, and the number of battery blocks swapped at time slot \(t\). The conservation of states can be calculated as per Equation (7). \[N_{F,t+1}=N_{F,t}+N_{C,t}^{f}-N_{BSD,t}^{real} \tag{7}\]  
Similarly, we can calculate the number of battery blocks in the \(W\)-state and \(C\)-state at the beginning of time slot \(t+1\) by Equations (8) and (9). \[N_{W,t+1}=N_{W,t}+N_{BSD,t}^{real}-N_{C,t}^{b} \tag{8}\]  
\[N_{C,t+1}=N_{C,t}+N_{C,t}^{b}-N_{C,t}^{f} \tag{9}\]  
where \(N_{BSD,t}^{real}\) is the total number of battery blocks swapped by BSS at the time slot \(t\). \(N_{C,t}^{b}\) and \(N_{C,t}^{f}\) are the number of battery blocks beginning and finishing charging, respectively. Because it is possible that the available battery blocks in \(F\)-state can only meet part of the \(BSD\) at time slot \(t+1\). The total number of \(BSD\), the total number of \(BSD\) being satisfied, and the total number of unsatisfied \(BSD\) at time slot \(t+1\), are defined as follows:  
\[N_{BSD,t+1}^{total}=N_{BSD,t+1}^{new}+N_{Q,t} \tag{10}\]  
\[N_{BSD,t+1}^{real}=min\Big{(}N_{F,t+1}+N_{C,t+1}^{f},\ N_{BSD,t+1}^{total} \Big{)} \tag{11}\]  
\[N_{Q,t+1}=N_{BSD,t+1}^{total}-N_{BSD,t+1}^{real} \tag{12}\]  
Beginning and finishing charging are boundary states that belong to the \(C\)-state.