## 3 Formulation
### Formulations of Constraints
#### Loading Capacity Constraints  
In the real world, the total number of seats of each train is fixed--the maximum loading capacity. The number of passengers must be less than the maximum loading capacity to avoid a crush and provide good service. The number of passengers on a train changes at every station because of passengers boarding and alighting. Thus, we formulate Constraints (33) and (34) to restrict the number of passengers in the train to be less the maximum loading capacity of train \(k\).  
\[\sum\limits_{r\in S}\sum\limits_{r\leq i}\ \sum\limits_{j\in S}\ \ q_{rj}^{k}\leq C_{k}\ k \in K_{2}\ i\in S. \tag{33}\]  
\[\sum\limits_{r\in S}\ \sum\limits_{r\leq i}\ \sum\limits_{j\in S}\ \rho_{rj}^{{}^{\prime}k}\leq C_{k}\ k \in K_{1}\ i\in S. \tag{34}\]  
In Constraint (33), \(\sum\limits_{r\in S}\ \sum\limits_{r\leq i}\ \sum\limits_{j\in S}\ \rho_{rj}^{k}\) denotes the passengers on the additional train \(k\) through segment \((i,i+1)\); these passengers get on train \(k\) before station \(i\) or at station \(i\) and get off after station \(i\). The capacity-occupancy ratio is an important index of the utilization of transport capacity. The constraints of capacity and occupancy are written as in Constraints (35) and (36). Constraint (35) is used to restrict the capacity and occupancy of additional trains, and Constraint (36) is for existing trains. The left term in Constraint (35) is the total passenger traffic turnover of train \(k\), which is the sum of passenger traffic turnover for each segment. The passenger traffic turnover for each segment is the number of passengers going through each segment, multiplied by the distance of the segment. As for the right term of Constraint (35), \(\delta\) is a coefficient of the capacity-occupancy ratio, and the other items are the maximum loading capacity of train \(k\) multiplied by the total running distance of train \(k\). To make use of the capacity of each train, we guarantee that the capacity-occupancy ratio of each train must be more than a threshold, i.e., \(\delta\). The value of \(\delta\) is less than 1.  
\[\sum\limits_{i\in S/[|S|]}D_{i,i+1}.\sum\limits_{r^{\prime}\in S}\sum\limits_{i \in S^{\prime}}\sum\limits_{j\in S}\ \ q_{rj}^{k}\geq\ \delta\text{-}C_{k}\Bigg{(}\sum\limits_{i\in S}z_{ki}^{T}.D_{i}-\sum\limits_{ i\in S}z_{ki}^{I}.D_{i}\Bigg{)}k\in K_{2}\ i\in S/[|S|]. \tag{35}\]  
\[\sum\limits_{i\in S/[|S|]}D_{i,i+1}.\sum\limits_{r^{\prime}\in S}\sum\limits_{ i\in S}\sum\limits_{j\in S^{\prime}}\ \rho_{rj}^{k}\geq\ \delta\text{-}C_{k}\Bigg{(}\sum\limits_{i\in S}z_{ki}^{T}.D_{i}-\sum\limits_ {i\in S}z_{ki}^{I}.D_{i}\Bigg{)}k\in K_{1}\ i\in S/[|S|]. \tag{36}\]  
Finally, Constraints (37)-(39) guarantee that departure time variables \(D_{ki^{\prime}}^{a}\) arrival time variables \(A_{ki^{\prime}}^{a}\) and the variables of distribution of passenger demand \(q_{ij}^{k}\) are non-negative. In addition, we schedule the arrival time of additional train within time window \([0\ T]\), which is also formulated in Constraint (36).  
\[D_{ki}^{a}\geq 0\ k\in K_{2}\ i\in S. \tag{37}\]  
\[0\leq A_{ki}^{a}\leq T\ k\in K_{2}\ i\in S. \tag{38}\]  
\[q_{ij}^{k}\geq 0\ k\in K_{2}\ i\in S. \tag{39}\]