## 2 Materials and Methods
### Constraints
#### 2.3.4 Loop Integer Constraint  
The loop integer constraint is used to describe the coordination relationship between two adjacent intersections. For the outbound direction, according to Figure 4, the loop integer constraint can be formulated as:  
\[\theta_{i}+r_{i,p}^{\rm S,L}+w_{i,m,p}^{\rm S}+t_{i,m,p}z=\theta_{i+1}+k_{i+1,m,p}+r_{i+1,p}^{\rm E,L}+w_{i+1,m,p}^{\rm E}\;i=1,2,\ldots,N-1;m=1,2,3;p=1,2,3,4, \tag{10}\]  
where \(\theta_{i}\) (\(\theta_{i+1}\)) represents the time from the initial time at intersection \(i\) (\(i+1\)) to the beginning of the green time for west-east through movements, \(r_{i,p}^{\rm S,L}\) (\(r_{i+1,p}^{\rm E,L}\)) represents the total red time on the left of the green wave bandwidth for coordinated path \(p\) at the starting intersection \(i\) (ending intersection \(i+1\)), \(t_{i,m,p}\) represents the travel time for the coordinated path \(p\) of traffic mode \(m\) between intersections \(i\) and \(i+1\), and \(k_{i+1,m,p}\) is an integer variable. Note that if a bus stops on the coordinated path \(p\), its travel time includes the dwell time. Similarly, constraint (10) can be updated as:  
\[\theta_{i}+r_{i,p}^{\rm S,L}+w_{i,m,p}^{\rm S}+t_{i,m,p}z\leq\theta_{i+1}+k_{i +1,m,p}+r_{i+1,p}^{\rm E,L}+w_{i+1,m,p}^{\rm E}+M\big{(}1-x_{i,m,p}\big{)}\;i=1,2,\ldots,N-1;m=1,2,3;p=1,2,3,4, \tag{11}\]  
\[\theta_{i}+r_{i,p}^{\rm S,L}+w_{i,m,p}^{\rm S}+t_{i,m,p}z\geq\theta_{i+1}+k_{i +1,m,p}+r_{i+1,p}^{\rm E,L}+w_{i+1,m,p}^{\rm E}-M\big{(}1-x_{i,m,p}\big{)}\;i=1,2,\ldots,N-1;m=1,2,3;p=1,2,3,4. \tag{12}\]  
In Equation (10), the values of \(r_{i,p}^{\rm S,L}\) or \(r_{i+1,p}^{\rm E,L}\) are closely related to the phase sequences (see Figure 3) and the coordinated paths. In this paper, 0/1 variables are introduced to establish a connection between the phase sequences and the coordinated paths, aiming to achieve simultaneous optimization of both. The expressions for \(r_{i,p}^{\rm{S,L}}\) and \(r_{i+1,p}^{\rm{E,L}}\) are as follows:  
\[r_{i,p}^{\rm{S,L}}=\sum_{u=1}^{4}y_{i,u,v}g_{i,u}, \tag{13}\]  
\[r_{i+1,p}^{\rm{E,L}}=\sum_{u=1}^{4}y_{i+1,u,v}g_{i+1,u}, \tag{14}\]  
where \(g_{i,u}\) (\(g_{i+1,u}\)) represents the green time of phase \(u\) at intersection \(i\) (intersection \(i+1\)), and \(y_{i,u,v}\) (\(y_{i+1,u,v}\)) represents the sequence between phase \(v\) that the coordinated path \(p\) passes through and phase \(u\) at intersection \(i\) (intersection \(i+1\)). If phase \(u\) is before phase \(v\) at intersection \(i\) (intersection \(i+1\)), \(y_{i,u,v}\) (\(y_{i+1,u,v}\)) equals \(1\); otherwise, \(y_{i,u,v}\) (\(y_{i+1,u,v}\)) equals \(0\). For the inbound direction, according to Figure 4, the loop integer constraint can be formulated as:  
\[\theta_{i}+\overline{n}_{i,m,\overline{p}}-\overline{r}_{i,\overline{p}}^{\rm{ E,R}}-\overline{w}_{i,m,\overline{p}}^{\rm{E}}=\theta_{i+1}-\overline{r}_{i+1, \overline{p}}^{\rm{S,R}}-\overline{w}_{i+1,m,\overline{p}}^{\rm{S}}+ \overline{t}_{i,m,\overline{p}}z\ i=1,2,\ldots,N-1;m=1,2,3;\overline{p}=1,2,3,4, \tag{15}\]  
where \(\overline{r}_{i,\overline{p}}^{\rm{E,R}}\) (\(\overline{r}_{i+1,\overline{p}}^{\rm{S,R}}\)) represents the total red time on the right of the green wave bandwidth for the coordinated path \(\overline{p}\) at the ending intersection \(i\) (starting intersection \(i+1\)), \(\overline{t}_{i,m,\overline{p}}\) represents the travel time for the coordinated path \(\overline{p}\) of traffic mode \(m\) between intersections \(i\) and \(i+1\), and \(\overline{n}_{i,m,\overline{p}}\) is an integer variable. Note that if a bus stops on the coordinated path \(\overline{p}\), its travel time includes the dwell time.