## 4 Mathematical Formulation
### Constraints
#### 4.1.2 Operation Zone and Overtaking Station  
Due to the different commercial speeds of trains, the headway time between consecutive trains may not ensure operational safety. At this time, if overtaking is allowed at a station, the conflict can be solved by overtaking. This is the key to solving the even-headway periodic timetable, i.e., calculating \(t_{s,I_{si}}^{(e)}\) in (8). The necessary and sufficient conditions for train \(J_{si}\) not to be overtaken by train \(J_{si+1}\) at station \(s\) are (_i_) satisfying the minimum departure headway at station \(s\), (_ii_) satisfying the minimum running interval in section \([s,s+1]\), and (_iii_) satisfying the minimum arrival headway at station \(s+1\). Suppose that the planned departure time \(d_{s,I_{si}}^{(0)}\) of train \(J_{si}\) at station \(s\) is given by (11), and use (12) to determine the departure headway constraint at station \(s\) and the arrival headway constraint at station \(s+1\). \[d_{s,I_{si}}^{(0)}=a_{s,I_{si}}+x_{s,I_{si}}t_{s,I_{si}}^{(s*)},\forall s\in \mathcal{S},i\leq I+2n \tag{11}\]  
\[\Delta d_{s,I_{si}}^{(0)}=d_{s,I_{si+1}}^{(0)}-d_{s,I_{si}}^{(0)},\forall s\in \mathcal{S},i<I+2n \tag{12}\]  
The advantage of this method is that, when conditions (_i_) and (_iii_) are satisfied, condition (_ii_) can be ensured because it is assumed that overtaking is only allowed at a station. At any station, the positional relationship of two consecutive trains can be categorized into forty-nine cases, considering whether they stop at, start from, or end at station \(s\) and station \(s+1\), and only five reasonable overtaking situations are considered in this paper, as shown in Figure 9.  
**Case (_i_)**: train \(J_{si}\) and train \(J_{si+1}\) both operate at station \(s\) and \(s+1\), i.e., \(\tau_{s,I_{si}}\tau_{s+1,I_{si}}\)\(\tau_{s,I_{si+1}}\tau_{s+1,I_{si,j+1}}=1\), and only train \(J_{si}\) stops at station \(s\), i.e., \(x_{s,J_{si}}(1-x_{s+1,I_{si}})(1-x_{s,I_{si+1}})\)\((1-x_{s+1,I_{si,j+1}})\)\((1-x_{s+1,I_{si,j+1}})\). Train \(J_{si}\) will be overtaken by train \(J_{si+1}\) with an extra dwell time \(t_{si}^{(e)}=\max\)\(\left(h_{dd},h_{tt}-t^{(0)}\right)\) when \(\Delta d_{s,I_{si}}^{(0)}<\max\)\(\left(h_{dd},h_{tt}+t^{(0)}\right)\). **Case (_ii_)**: train \(J_{si}\) and train \(J_{si+1}\) both operate at stations \(s\) and \(s+1\), and only train \(J_{si}\) stops at stations \(s\) and \(s+1\), i.e., \(x_{s,I_{si}}x_{s+1,I_{si}}(1-x_{s,I_{si,j+1}})(1-x_{s+1,I_{si,j+1}})=1\). Train \(J_{si}\) will be overtaken by train \(J_{si+1}\) with an extra dwell time \(t_{si}^{(e)}=\max\)\(\left(h_{dd},h_{tt}-t^{(0)}-t^{(1)}\right)\) when \(\Delta d_{s,I_{si}}^{(0)}<\max\)\(\left(h_{dd},h_{at}+t^{(0)}+t^{(1)}\right)\). **Case (_iii_)**: train \(J_{si}\) ends at station \(s\) and train \(J_{si+1}\) operates at stations \(s\) and \(s+1\), i.e., \(\tau_{s,I_{si}}(1-\tau_{s+1,I_{si,j}})\tau_{s,I_{si,j+1}}\tau_{s+1,I_{si,j+1}}=1\), and train \(J_{si+1}\) skips station \(s\), i.e., \(x_{s,I_{  
taken by train \(J_{si+1}\) with an extra dwell time \(t_{si}^{(e)}=\max\!\left(h_{dd}^{*},h_{ta}-t^{(0)}-t^{(1)}\right)\) when \(\Delta d_{s,J_{si}}^{(0)}<\max\!\left(h_{dd}h_{at}+t^{(0)}+t^{(1)}\right)\). There is, at most, one overtaking for each train, so we only need to calculate the planned interval \(\Delta d_{s,J_{si}}^{(0)}\) once to obtain \(t_{s,J_{si}}^{(e)}\) for conflict resolution. This process may change the departure order at station \(s\), i.e., the arrival order at station \(s+1\), as shown in (13), where the 0-1 variable \(T_{s,J_{si},J_{si+1}}\) denotes the overtaking state between train \(J_{si}\) and \(J_{si+1}\), and equals 1 if one of the above five cases occurs and 0 otherwise. Equation (13) also includes a situation that changes the train order, that is, where at least one train is in a virtual operation zone and their planned departure interval \(\Delta d_{s,J_{si}}^{(0)}<0\). In this case, there is no actual overtaking between these two consecutive trains, so the departure time will not change, i.e., \(t_{s,J_{si}}^{(e)}=0\). \[\left\{