# Train Service Design for Rail Transit Cross-Line Operation Applying Virtual Coupling
## 3 Mathematical Model
### Objective Function
#### 3.1.1 Passenger Travel Costs
\forall m\
eq n \tag{12}\]  
Case 1d: Passengers traveling on line 2, excluding those whose OD is within zone V (see Figure 3b). The resistance time for type-1\(d\) passengers \(RT_{1d}\), in-vehicle time for type-1\(d\) passengers \(TT_{1d}\), and additional VC time for type-1\(d\) passengers \(VT_{1d}\) can be calculated as follows:  
\[RT_{1d}=(\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{\text{IV},V}}q^{ m,n}+\sum\limits_{m\in S_{\text{IV},V}}\sum\limits_{n\in S_{\text{IV}}}q^{m,n}) \cdot\dfrac{30}{f_{2}}\quad\forall m\
eq n \tag{13}\]  
\[TT_{1d}=(\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{\text{IV},V}}q^{ m,n}+\sum\limits_{m\in S_{\text{IV},V}}\sum\limits_{n\in S_{\text{IV}}}q^{m,n}) \cdot t^{m,n}\quad\forall m\
eq n \tag{14}\]  
\[VT_{1d}= \begin{cases}(\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{ \text{IV}}}q^{m,n}+\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{\text{IV} }}q^{m,n}-\sum\limits_{m\in S_{\text{V}}}q^{m,n}-\sum\limits_{n\in S_{\text{V} }}q^{a,n})\cdot t^{vc}\cdot\dfrac{f_{3}}{f_{2}+f_{3}}&f_{2}\geq f_{3}\\ (\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{\text{IV}}}q^{m,n}+\sum \limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{\text{V}}}\sum\limits_{n\in S_{ \text{V}}}q^{m,n}-\sum\limits_{m\in S_{\text{V}}}q^{m,n}-\sum\limits_{n\in S_{ \text{V}}}q^{a,n})\cdot t^{vc}\cdot\dfrac{f_{2}}{f_{2}+f_{3}}&f_{2}<f_{3}\end{cases}  \forall m\
eq n \tag{15}\]  
Case 1e: The OD of these passengers both in zone IV. The resistance time for type-1\(e\) passengers \(RT_{1e}\), in-vehicle time for type-1\(e\) passengers \(TT_{1e}\), and additional VC time for type-1\(e\) passengers \(VT_{1e}\) can be calculated as follows:  
\[ \begin{cases}RT_{1e}=\sum\limits_{m,n\in S_{\text{IV}}}q^{m,n}\cdot\dfrac{30}{f_ {2}}&f_{2}\geq f_{3}\\ RT_{1e}=\sum\limits_{m,n\in S_{\text{IV}}}q^{m,n}\cdot\dfrac{30}{f_{3}}&f_{2}<f_{3 }\end{cases} \forall m\
eq n \tag{16}\]\[TT_{1e}=\sum\limits_{m,n\in S_{\text{IV}}}q^{m,n}\cdot t^{m,n}\quad\forall m\
eq n \tag{17}\]  
\[VT_{1e}= \begin{cases}(\sum\limits_{n\in S_{\text{IV}}}q^{a,n}+\sum\limits_{n\in S _{\text{IV}}}q^{tra,n})\cdot t^{vc}\cdot\dfrac{f_{3}}{f_{2}+f_{3}}&f_{2}\geq f_ {3}\\ (\sum\limits_{n\in S_{\text{IV}}}q^{a,n}+\sum\limits_{n\in S_{\text{IV}}}q^{tra,n})\cdot t^{vc}\cdot\dfrac{f_{2}}{f_{2}+f_{3}}&f_{2}<f_{3}\end{cases} \forall m\
eq n \tag{18}\]  
(2) The travel costs of the transfer passengers  
Case 2a: Passengers that need to transfer and the OD within zones I, III, and IV (see Figure 4a). For instance, consider passengers traveling from zone I to zone IV: these passengers must first take train 1 in zone I to reach the transfer station, then board either train 2 or train 3 to complete their travel to zone IV. \(RT_{2a}^{m,n}\) of Case 2a passengers is affected by frequency of train 1, train 2, and train 3, i.e., \(f_{1}\), \(f_{2}\),\(f_{3}\). Thus, the resistance time for type-\(2a\) passengers \(RT_{2a}\), in-vehicle time for type-\(2a\) passengers \(TT_{2a}\), and additional VC time for type-\(2a\) passengers \(VT_{2a}\) can be calculated as follows. For type-\(2a\) passengers, additional VC time is required at the transfer station for train 1 and train 3. Furthermore, some passengers require additional VC time at station \(a\) for train 2 and train 3. Consequently, the calculation is divided into two components, as represented in Equations (22) and (23). \[ \begin{cases}RT_{2a}=(\sum\limits_{m\in S_{\text{III}},\text{III}}\sum\limits_{n \in S_{\text{IV}}}q^{m,n}+\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S _{\text{III}}}q^{m,n})\cdot(\dfrac{30}{f_{1}}+\dfrac{30}{f_{2}})+t_{walk}&f_{2} \geq f_{3}\\ RT_{2a}=(\sum\limits_{m\in S_{\text{III}},\text{III}}\sum\limits_{n\in S_{ \text{IV}}}q^{m,n}+\sum\limits_{m\in S_{\text{IV}}}\sum\limits_{n\in S_{\text{III }}}q^{m,n})\cdot(\dfrac{30}{f_{1}}+\dfrac{30}{f_{3}})+t_{walk}&f_{2}<f_{3} \end{cases}