# Collaborative Trajectories Optimization for Tram and Connected Vehicles at Signalized Intersection
## 3 Mathematical Model
### Constraints  
The tram operation status and TSP information constraints are as follows:  
\[\left\{\begin{array}{l}v_{\text{max}}^{\text{(int)}}\leqslant v_{\text{cost }}^{\text{(E)}}\leqslant v_{\text{crusive}}\leqslant v_{\text{max}}^{\text{( sec)}}\\ S_{3}\leqslant L_{\text{g}}-S_{1}-S_{4}\end{array}\right. \tag{20}\]  
\[\left\{\begin{array}{l}T_{k\alpha}\leqslant\mu_{k\alpha}\delta_{\text{max}} ^{\text{(\alpha)}}\\ T_{k\beta}\leqslant\mu_{k\beta}\delta_{\text{max}}^{\text{(\beta)}}\\ T_{k\gamma}\leqslant\mu_{k\gamma}\delta_{\text{max}}^{\text{(\gamma)}}\end{array}\right. \tag{21}\]  
\[\left\{\begin{array}{l}t_{k\beta}^{\text{(S)}}-t_{k}^{\text{(GE)}}\geqslant \kappa_{\text{min}}\\ t_{k+1}^{\text{(GS)}}-t_{k\beta}^{\text{(E)}}\geqslant\kappa_{\text{min}}\end{array}\right. \tag{22}\]  
\[t_{\text{MIN}}^{\text{(S)}}\in\left[t_{k\beta}^{\text{(S)}},t_{k\beta}^{\text{ (E)}}\right]\Big{|}\Big{|}t_{k\text{IV}}^{\text{(S)}}\in\left[t_{k\beta}^{ \text{(S)}},t_{k\beta}^{\text{(E)}}\right] \tag{23}\]  
where \(v_{\text{max}}^{\text{(int)}}\) and \(v_{\text{max}}^{\text{(sec)}}\) are the maximum speed of the tram in the intersection and running sections; \(S_{1}\), \(S_{3}\) and \(S_{4}\) are the distance traveled with traction, coast and braking, respectively; \(v_{\text{crusive}}\) represents the cruising speed of the tram; \(v_{\text{cost}}^{\text{(E)}}\) represents the end speed of a tram in coast mode; \(T_{k\alpha}\), \(T_{k\beta}\) and \(T_{k\gamma}\) are the duration of the green extension, phase insertion and early green schemes in cycle \(k\), respectively; \(\mu_{k}\) is a 0-1 variable that determines whether cycle \(k\) implements the TSP, where the value is 1 if implemented and 0 if not; \(\delta_{\text{max}}\) is the maximum duration of TSP; \(t_{k\beta}^{\text{(S)}}\) and \(t_{k\beta}^{\text{(E)}}\) are the beginning and the end of the phase insertion; \(t_{k}^{\text{(GE)}}\) is the end of the original green light phase of the tram; \(t_{k+1}^{\text{(GS)}}\) is the beginning of the green light phase of the tram in cycle \(k+1\); \(\kappa_{\text{min}}\) is the minimum interval for phase insertion; \(t_{\text{MIN}}^{\text{(S)}}\) and \(t_{k\text{IV}}^{\text{(S)}}\) are the beginning of the third and fourth phases, respectively.  
Equation (20) is the constraint of the train running-state information. Equation (21) is the duration constraint of three TSPs for trans. Equation (22) is the constraint of the phase insertion interval, where the first line represents the minimum interval between the beginning time of the tram phase insertion and the other represents the minimum interval between the end time of phase insertion and the beginning time of the next cycle's original green light phase. Equation (23) is a phase protection constraint to prevent phase insertion, which divides the green light period of the inserted phase into two parts. This kind of unreasonable phase insertion would lead to a decrease in intersection safety and use efficiency. Therefore, the phase insertion period must contain the beginning of phase three or phase four.