## 3 Multi-Type Bus Operating Organization Energy Consumption Optimization Model
### Model Establishment
#### 3.2.3 Constraint Conditions  
To ensure the original service level of the route, meeting the accurate matching between the transport capacity in the processes of replacing fuel buses with electric buses, while considering the mileage and charging time of electric buses, we establish constraints conditions from the aspect of the bus operating service level including the vehicle full load capacity, departure interval, road capacity, mileage of electric buses and charging time. The specific conditions are as follows:  
1. The constraints of the full load rate  
\[\beta_{\text{min}}\leq\beta_{gh}\leq\beta_{\text{max}} \tag{5}\]  
\[\beta_{gh}=\frac{q_{gh}}{N_{g}C}=\frac{q_{gh}d_{g}}{N_{g}H_{g}}\]  
In the formula, \(\beta_{gh}\) is the cross-section full load rate of the \(h\) section in a \(g\) time period of the research route, \(q_{gh}\) is the cross-section passenger flow of the \(h\) section in a \(g\) time period of the research route, \(N_{g}\) is the number of passengers on board of the \(h\) section in a \(g\) time period of the research route, \(d_{g}\) is the departure interval in a \(g\) time period of the research route, with the unit of minute, \(C\) is number of vehicles that passed the section \(h\) in a \(g\) time period, \(H_{g}\) is the duration of the \(g\) period, with the unit of minute, \(N_{0}\) is the standard passenger capacity of the pure electric buses. 2. The constraint of departure interval  
If the departure interval is too short, the energy consumption will increase that will result in the resource waste. If the departure interval is too long, the waiting time of passengers will be longer, and the full load rate will increase, then the service level decreases. Therefore, we comprehensively consider the acceptability of enterprises and passengers to the departure interval and refer to the Beijing bus departure interval which is less than 5 min in the peaking period and less than 15 min in the low peak period. We widen the constraints of departure frequency within a certain range and set the following constraint conditions:  
\[4\leq f\leq 60 \tag{6}\]  
3. The constraints of mileage and charging time windows  
\[\sum_{p\in\Omega}a_{ip}\theta_{p}=1\;i\in A_{task} \tag{7}\]  
\(\alpha_{ip}\) is a variable either zero or one, indicating whether the bus order chain \(P\) contains the arc \(i\). If it does, \(\alpha_{ip}\) equals to one, or \(\alpha_{ip}\) equals to zero. \[\sum_{p\in\Omega}s_{dp}\theta_{p}=\sum_{p\in\Omega}e_{dp}\theta_{p}\leq capacityd \quad\forall d\in D \tag{8}\]  
\(s_{dp}\) is a variable either zero or one, representing whether the bus order chain \(P\) departs from the parking lot D or not. \(e_{dp}\) is a variable either zero or one, representing whether the bus order chain \(P\) stops at the parking lot d. \(D\) represents the parking yard set. \(capacityd\) is the capacity of the parking yard \(\forall d\in D\). \(V_{d}^{k}\) is the vehicle set of type \(k\in K\) departing from the parking yard \(d\in D\). \[\sum_{i}l_{i}a_{ip}\leq DD_{k}\forall p\in\Omega\quad i\in A_{task}\quad j\in A \tag{9}\]  
\(DD_{k}\) represents the maximum mileage of type \(k\in K\) bus. \(l_{i}\) is the mileage of arc \(i\), and if the arc \(i\) is the waiting arc, \(l_{i}=0\), otherwise, it equals the distance between the two stations. \[a_{ip}artime_{i}\leq a_{ip}deptime_{j}\;i<j,\forall p\in\Omega \tag{10}\]  
\(artime_{i}\) represents the arrival time of arc \(i\). \(deptime_{i}\) represents the departing time of arc \(i\). \[s_{dp}e_{dp}y_{i}\theta_{p}\in\left\{0,1\right\}p\in\Omega,d\in D,i\in A_{task} \tag{11}\]  
\(y_{i}\) is the variable ranging either zero or one, indicating whether the bus returns to the parking yard to charge after completing the task \(i\) (assuming that the bus can only be charged at the yard). If the bus needs to be charged, \(y_{i}\) equals to one, and the corresponding entry time is \(\alpha_{i}+t_{ei}+ST_{k}\). \(ST_{k}\) is the charging time of the bus, which is 30 min in the paper.