## 3 Model and Methods
### The Mathematical Model
\begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Definition** \\ \hline \(b_{e,f}^{s}\) & 1, if eastbound train \(e\) departs from station \(s\) before eastbound train \(f\) and 0 otherwise. Defined for \(s\
eq s_{L}\) and \(e<f\). \\ \hline \(b_{w,x}^{s}\) & 1, if westbound train \(w\) departs from station \(s\) before westbound train \(x\) and 0 otherwise. Defined for \(s\
eq s_{F}\) and \(w<x\). \\ \hline \(\hat{c}_{e,w}^{s}\) & 1, if eastbound train \(e\) and westbound train \(w\) meet at station \(s\) (\(s\in S_{1}\)) and 0 otherwise. \\ \hline \(c_{s}^{s,w}\) & 1, if eastbound train \(e\) and westbound train \(w\) meet at station \(s\) (\(s\in S_{2}+[s_{F}]\)) AND train \(e\) enters the station before train \(w\) and 0 otherwise. \\ \hline \(\hat{c}_{s}^{s,w}\) & 1, if eastbound train \(e\) and westbound train \(w\) meet at station \(s\) (\(s\in S_{2}+[s_{L}]\)) AND train \(w\) enters the station before train \(e\) and 0 otherwise. \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Binary decision variables. are thus assigned a higher priority by the company. This is reflected in the weights. The higher the train's priority is, the higher the weight of that train (and contribution of a delay unit of that train to the objective value) is. Note that the weighted delays of the trains are being summed up, not the passengers or the payloads. It is possible to sum up the delays of passengers rather than trains, but this would be appropriate for studies mostly on urban rail lines rather than an intercity line, which is our focus here. Intercity railway lines are typically used by both passenger and freight trains. Future work may include a change in objective function, such as minimizing total weighted knock-on delay time. _Minimum Departure and Arrival Time Constraints:_  
\[d_{e}^{s_{F}}\geq\delta_{e}\forall\;e\in E \tag{2}\]  
\[d_{w}^{s_{L}}\geq\delta_{w}\forall\;w\in W \tag{3}\]  
Constraints (2) and (3) prevent any train from departing from the related terminus before it actually enters the system. _Delay Definition Constraints:_  
\[\tau_{e}\geq a_{e}^{s_{L}}-\alpha_{e},\forall\;e\in E \tag{4}\]  
\[\hat{\tau}_{w}\geq a_{w}^{s_{F}}-\hat{\alpha}_{w},\forall\;w\in W \tag{5}\]  
Because the variables found in the respective left-hand sides of Constraints (4) and (5) define the delay and are nonnegative, if any train arrives earlier than its scheduled arrival time, then delay takes the value zero. By this definition, early arrivals are allowed, but they do not improve the objective value. _Minimum Running Time Constraints:_  
\[a_{e}^{s+1}\geq d_{e}^{s}+T_{e}^{s}\forall\;e\in E,\;s\in S\backslash s_{L} \tag{6}\]  
\[\hat{a}_{w}^{s}\geq\hat{d}_{w}^{s+1}+\hat{T}_{w}^{s}\forall\;w\in W,\;s\in S \backslash s_{L} \tag{7}\]  
Constraints (6) and (7) enforce the minimum running times between the adjacent stations. _Minimum Dwell Time Constraints:_  
\[d_{e}^{s}\geq a_{e}^{s}+\sigma_{e}^{s}\forall\;e\in E,\;s\in S\backslash\{s_{F },s_{L}\} \tag{8}\]  
\[\hat{d}_{w}^{s}\geq\hat{a}_{w}^{s}+\sigma_{w}^{s}\forall\;w\in W,\;s\in S \backslash\{s_{F},s_{L}\} \tag{9}\]  
Constraints (8) and (9) enforce the minimum dwell times of the trains as required by the timetable. In case of either a nontimetabled operation or no scheduled stops at station \(s\), these enforce the train continuities. _Following and Overtaking Constraints for Eastbound Trains:_  
\[d_{e}^{s}\geq d_{f}^{s}+\beta_{e,f}^{s}-M*b_{e,f}^{s}\forall\;e,\;f\;\in\;E,e \;<\;f,\;s\;\in\;S\backslash s_{L} \tag{10}\]  
\[d_{e}^{s_{F}}\geq\delta_{e}\forall\;e\in E \tag{2}\]0  
\[d_{e}^{s_{F}}\geq\delta_{e}\forall\;e\in E \tag{2}\]1  
\[d_{e}^{s_{F}}\geq\delta_{e}\forall\;e\in E \tag{2}\]2  
Constraints (10) and (12) are active if eastbound train \(f\) departs station \(s\) before eastbound train \(e\). Constraint (10) ensures that there is sufficient headway between the two trains in departure.