# Hybrid Model-Based Traffic Network Control Using Population Games
## 3 Mathematical Description of a Urban Traffic Network
### Hybrid Urban Traffic System  
The urban traffic network integrates the continuous scheme described in Section 3.1 with the discrete behavior resulting from transitions between different network modes. This integration allows us to model the network as a hybrid system. To illustrate this, consider the network depicted in Figure 1a and its representation by the automaton in Figure 2. In this case, we have four traffic lights, each one with two possible states \(\{0,1\}\), i.e., we have \(2^{4}=16\) possible network configurations. However, since \(s_{1}=\sim s_{2}\) and \(s_{3}=\sim s_{4}\), this number can be reduced to \(2^{2}=4\), which is the number of ovals in the automaton. The set of modes is denoted as \(\Sigma=\{\sigma_{1},\sigma_{2},\sigma_{3},\sigma_{4}\}\). The transitions between states are governed by a threshold condition based on the difference between the green time of individual links (\(g_{i}\)) and the total green time at each node (\(\overline{g}_{i}\)). For instance, the transition from mode \(\sigma_{2}=[1,0,0,1]\) to \(\sigma_{1}=[1,0,1,0]\) is triggered when \(g_{4}\geq\overline{g}_{4}\), i.e., when the green time in link 4 is greater or equal than the sum of green times of links 3 and 4 (\(\overline{g}_{4}=g_{4}+g_{3}\)). In this sense, the switching scheme between modes is dynamic and depends on the variation of green times of links, which changes according to the fitness function used in the control strategies described in Section 4.  
In general, the state vector for this system is  
\[z=(\xi,\sigma)\in\mathbb{R}^{n}\times\Sigma,\]  
where  
\[f_{\sigma}(\xi) = A_{\sigma}\xi\] \[C = \bigcup_{\sigma\in\Sigma}\left(C_{\sigma}\cap\mathcal{O}_{\sigma}\right)\] \[\dot{g}_{\sigma}(\xi) = g_{D}(z)\cup g_{\mathcal{O}}(z)\] \[D = \bigcup_{\sigma\in\Sigma}\left(\left(D_{\sigma}\cap\mathcal{O}_{ \sigma}\right)\cup\left(\left(\mathbb{R}^{n}\times\{\sigma\}\right)\setminus \mathcal{O}_{\sigma}\right)\right)\]  
and  
\[g_{D}(z) = \left\{\begin{array}{ccc}\prod_{\sigma\in\mathcal{(}\xi)}g_{ \sigma}(\xi)&\quad\text{if }z\in D_{\sigma}\cap\mathcal{O}_{\sigma}\\ 0&\quad\text{otherwise}\end{array}\right.\] \[g_{\mathcal{O}}(z) = \left\{\begin{array}{ccc}\prod_{\sigma\in\mathcal{(}\xi)}\xi& \quad\text{if }z\in\left(\mathbb{R}^{n}\times\{\sigma\}\right)\setminus \mathcal{O}_{\sigma}\\ 0&\quad\text{otherwise}\end{array}\right.\]  
\(\mathcal{O}_{\sigma}\) and \(\prod_{\sigma}\) represent the consistency sets and the projectors, respectively [29]. \(C_{\sigma}=\{z:\,g_{i}\in[0,\overline{\xi}_{i}],\mathbf{s}=[s_{1},\ldots,s_{ n}],\sigma\in\sum\}\), and \(D_{\sigma}=\{z:\,g_{i}\geq\overline{\xi}_{i},\mathbf{s}=[s_{1},\ldots,s_{n}],\sigma\in\sum\}\) are subsets \(\in\mathbb{R}^{n}\) that define the system evolution according to \(F\) and \(G\). In the transitions between modes, the changes of \(\xi\) are defined by the map \(g_{\sigma}(\xi)=\left[\mathbf{1},\mathbf{h},y_{\mathbf{g}}(\mathbf{g}),y_{ \mathbf{s}}(\mathbf{g},\sigma),\mathbf{c},\mathbf{o}\right]^{T}\), where  
\[y_{\mathbf{g}}(\mathbf{g})=\ \ \left\{[g_{1},\ldots,g_{n}]^{T}:\,g_{i}\left\{ \begin{array}{ccc}g_{i}&\quad\text{if}&g_{i}\leq\ \ \overline{\xi}_{i}\\ 0&\quad\text{if}&g_{i}\geq\ \overline{\xi}_{i}\\ g_{i},0&\quad\text{if}&g_{i}=\ \overline{\xi}_{i}\end{array}\right\}\right.\]  
and  
\[y_{\mathbf{s}}(\mathbf{g},\sigma)=\left\{[s_{1},\ldots,s_{n}]^{T}:\ \ g_{i}\geq \overline{\xi}_{i},\ \sigma\in\sum\right\}.\]  
Additionally, the changes of modes in the network are determined by  
\[\varphi_{\sigma}(\xi)=\Big{\{}\ \sigma:\ \ g_{i}\geq\overline{\xi}_{i},\sigma \in\sum\ \Big{\}}.\]  
Figure 2: Automaton for urban traffic network in Figure 1a.