# Investigation of Railway Network Capacity by Means of Dynamic Flows
## 3 Optimization Model for Determining a Network-Wide Capacity
### Mathematical Formulation of the Model
#### 3.3.3 Constraints
 \tag{12}\]  
One station departure (route number \(n\) in direction \(j\)) and one arrival (route number \(n^{\prime}\) from direction \(j^{\prime}\)) must be at least \(\Delta t\) time steps apart. \[ \begin{array}{c}\sum_{k\in K_{n}}\sum_{t^{\prime}=t\ |\ 0\leq t^{\prime}\leq T-\tau^{k}_{ j}}^{t+\Delta t}x_{((i,t^{\prime}),(j,t^{\prime}+\tau^{k}_{j}))}^{k}\\ +\sum_{k\in K_{n^{\prime}}}\sum_{t^{\prime}=t\ |\ \tau^{k}_{j}\leq t^{\prime} \leq T}^{t+\Delta t-1}x_{((i,t^{\prime}),(j,t^{\prime}+\tau^{k}_{j}))}^{k} \leq 1\\ \forall i\in V_{c},\ \forall((j,n,\mu),(j^{\prime},n^{\prime},n^{\prime}))\in C _{i}:\ \mu=a^{\prime}\ \wedge\ \mu^{\prime}=a^{\prime},\ \forall t\in\{0,1,\dots,T\}\end{array}  \tag{13}\]  
Two station departures (route number \(n\) in direction \(j\)) and route number \(n^{\prime}\) in direction \(j^{\prime}\)) must be at least \(\Delta t\) time steps apart. \[ \begin{array}{c}\sum_{k\in K_{n}}\sum_{t^{\prime}=t\ |\ 0\leq t^{\prime}\leq T-\tau^{k}_{ j}}^{t+\Delta t-1}x_{((i,t^{\prime}),(j,t^{\prime}+\tau^{k}_{j}))}^{k}\\ +\sum_{k\in K_{n^{\prime}}}\sum_{t^{\prime}=t\ |\ 0\leq t^{\prime}\leq T-\tau^{k}_{ j^{\prime}}}^{t+\Delta t-1}x_{((i,t^{\prime}),(j,t^{\prime}+\tau^{k}_{j}))}^{k} \leq 1\\ \forall i\in V_{c},\ \forall((j,n,\mu),(j^{\prime},n^{\prime},n^{\prime}))\in C _{i}:\ \mu=n^{\prime}=a^{\prime},\ \forall t\in\{0,1,\dots,T\}\end{array}  \tag{14}\]  
**Capacity of single-track line sections. ** Hour capacity constraints for single-track line sections are respected. The formulation of these constraints assume that one time step corresponds to one minute. \[ \begin{array}{c}\sum_{k\in K_{ij}}\sum_{t^{\prime}=t\ |\ \tau^{k}+\tau^{k}_{ j}\leq T}^{t+60-1}x_{((i,t^{\prime}),(j,t^{\prime}+\tau^{k}_{j}))}^{k}\\ +\sum_{k\in K_{ij}}\sum_{t^{\prime}=t\ |\ t^{\prime}+\tau^{k}_{j}\leq T}^{t+60-1}x_{((i,t^{ \prime}),(i,t^{\prime}+\tau^{k}_{j}))}^{k}\leq u_{ij}\\ \forall(i,j)\in A_{c}:\ s_{ij}=1,\ \forall t\in\{0,1,\dots,T\}\end{array}  \tag{15}\]  
At most one train travels on a single-track line section (in either direction) at a time. \[ \begin{array}{c}\sum_{k\in K_{ij}}\sum_{t^{\prime}=t-\tau^{k}_{ j}+1\ |\ 0\leq t^{\prime}\leq T-\tau^{k}_{j}}^{t+\Delta t}x_{((i,t^{\prime}),(j,t^{\prime}+ \tau^{k}_{j}))}^{k}\\ +\sum_{k\in K_{ji}}\sum_{t^{\prime}=t-\tau^{k}_{j}+1\ |\ 0\leq t^{\prime}\leq T- \tau^{k}_{ji}}^{t+\Delta t}x_{((i,t^{\prime}),(i,t^{\prime}+\tau^{k}_{j}))}^{k} \leq 1\\ \forall(i,j)\in A_{c}:\ s_{ij}=1,\ \forall t\in\{0,1,\dots,T\}\end{array}  \tag{16}\]  
**Capacity of double-track line sections. ** Hourly capacity constraints for double-track line sections are satisfied. The formulation of these constraints assume that one time step corresponds to one minute. \[ \begin{split}&\sum_{k\in K_{ij}}\sum_{t^{\prime}=t\ |\ f^{+}+t\hat{v}_{ij}^{+}\leq T}^{t+\hat{v}_{ij}^{+}\leq T}x_{((i,t^{\prime}),(j,t^{\prime}+\hat{v}_{ij}^{+}))}^{k}\leq u_{ij}\\ &\forall(i,j)\in A_{c}:\ s_{ij}=0,\ \forall t\in\{0,1,\dots,T\} \end{split}  \tag{17}\]  
At most one train enters a double-track line section in one direction within the interval of the average minimum headway time plus the minimum necessary buffer time. \[ \begin{split}&\sum_{k\in K_{ij}}\sum_{t^{\prime}=t\ |\ f^{+}+\hat{v}_{ij}^{+}+\hat{v}_{ij}^{-}\leq T}^{t+\hat{v}_{ij}^{+}+\hat{v}_{ ij}^{-}}x_{((i,t^{\prime}),(j,t^{\prime}+\hat{v}_{ij}^{+}))}^{k}\leq 1\\ &\forall(i,j)\in A_{c}:\ s_{ij}=0,\ \forall t\in\{0,1,\dots,T\} \end{split}  \tag{18}\]