# Research on Queue Equilibrium Control Algorithm of Urban Traffic Based on Game Theory
## 2 Queuing-Length Model  
In this section, the store-and-forward mode of the intersection will be proposed to prepare for the design of an in-queue vehicle number equilibrium control strategy. The store-and-forward model of traffic networks was first proposed in 1963 and is still widely used in traffic signal control [19; 20]. The mathematical queuing-length model of each direction at the cycle-changeable intersection is as follows:  
\[d_{i}^{j}(k+1)=d_{i}^{j}(k)+C(k)q_{i}^{j}(k)-S_{i}^{j}g_{i}(k) \tag{1}\]  
where \(i=1,\ldots,N\) represents the \(i\)th phase of the intersection, and \(N=4\) represents there are four phases at the intersection; \(j=1,\ldots,M\) indicates the \(j\)th direction of the intersection, \(M=4\) represents there are four directions at the intersection, \(C(k)\) indicates the \(k\)th cycle of the intersection signal control, and \(d_{i}^{j}(k)\) represents the in-queue vehicle number (pcu) of the \(k\)th cycle of the \(i\)th phase at the \(j\)th direction during the time period \([(k-1)C(k),kC(k)]\). \(q_{i}^{j}(k)\) represents the vehicle arrival rate (veh/s) of the intersection in phase \(i\), direction \(j\), and cycle \(k\); \(S_{i}^{j}\) means the saturation flow rate (pcu/s) of phase \(i\) at direction \(j\); \(g_{i}(k)\) indicates the effective green time (s) of the \(k\)th cycle of the \(i\)th phase.  
To define the maximum queuing length of the specific phase at a single intersection, which is the maximum value of the queuing length at each direction in the same phase, the equation can be listed as follows:  
\[D_{i}(k)=\max\Bigl{\{}d_{i}^{j}(k),d_{i}^{j+2}(k),0\Bigr{\}} \tag{2}\]  
where direction \(j\) and direction \(j+2\) belong to phase \(i\). The third item 0 is to prevent negative values of the queue length during the calculation process, which is inconsistent with the actual situation.  
The mathematical queuing-length model of the cycle-changeable intersection is as follows:  
\[D_{i}(k+1)=D_{i}(k)+C(k)q_{i}^{*}(k)-S_{i}^{*}g_{i}(k) \tag{3}\]where \(D_{i}(k)\) represents the in-queue vehicle number (pcu) of the \(i\)th phase and the \(k\)th cycle during \([(k-1)C(k),KC(k)]\); \(q_{i}^{*}(k)\) means the vehicle arrival rate (pcu/s) in the \(k\)th cycle of the longest queue direction in phase \(i\) of the intersection; \(S_{i}^{*}\) indicates the saturation flow rate (pcu/s) of the longest queue direction in phase \(i\) of the intersection \(j\).  
The green time of each phase and the signal cycle at the intersection should be satisfied by the following constraints:  
\[C(k)=\sum_{i=1}^{N}g_{i}(k)+t_{L} \tag{4}\]  
where \(t_{L}\) indicates the lost time.  
To avoid a too long or too short green time, the maximum and minimum green times need to be set. Therefore, the constraints for green time and the signal cycle in the \(i\)th phase and \(k\)th cycle of the intersection are defined as:  
\[\overline{g}_{i}(k)=\begin{cases}\min\{g_{i}(k),g_{\max}\}&g_{i}(k)>g_{\max} \\ g_{i}(k)&g_{\min}\leq g_{i}(k)\leq g_{\max}\\ \max\{g_{i}(k),g_{\min}\}&g_{i}(k)<g_{\min}\end{cases} \tag{5}\]  
\[C(k)=\sum_{i=1}^{N}\overline{g}_{i}(k)+t_{L} \tag{6}\]  
The queue length model with a green time constraint at a single intersection is considered as follows:  
\[D_{i}(k+1)=D_{i}(k)+C(k)q_{i}^{*}(k)-S_{i}^{*}\overline{g}_{i}(k) \tag{7}\]