# Stochastic Model Predictive Control for Urban Traffic Networks
## 5 Simulation Results
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Uncertain Variable**} \\ \cline{2-7}  & \multicolumn{3}{c}{\(\boldsymbol{d_{1}}\)} & \multicolumn{3}{c}{\(\boldsymbol{e_{7}}\)} \\ \cline{2-7}  & \(16128\) & \(0\) & \(-1152\) & \(108\) & \(-108\) & \(-54\) \\ \(\Sigma_{1}\) & \(0\) & \(6912\) & \(-5760\) & \(\Sigma_{2}\) & \(-108\) & \(216\) & \(108\) \\  & \(-1152\) & \(-5760\) & \(10368\) & \(-54\) & \(108\) & \(162\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Covariance matrix of uncertain demand and disturbance. the model \(M_{1}\) are the same as those of the proposed stochastic MPC model. Except for the chance constraints (as defined in Equation (12)) being replaced by the deterministic constraints (as defined in Equation (11)), the rest constraints of the model \(M_{2}\) are the same as those of the proposed stochastic MPC model. For each control step, based on the mean value and the covariance matrix of \(d_{1}\) (and those of \(e_{1}\)) we generate 6000 input-output data with Algorithm 1. Then, by using these input-output data and the MATLAB neural network toolbox, we train a feedforward neural network (14 input neurons, one hidden layer with 18 neurons, seven output neurons) for each control step. The mean squared error of the neural network is smaller than 0.003. The population size and the maximal generation of GA is set to 50 and 1000, respectively. Selection rate 0.8 and mutation rate 0.1 are adopted. In addition, the two genetic algorithms (GAs) (which are used by MPC-HIA and MPC-GA) has the same configuration parameters. It should be noted that all of our simulations are implemented on a personal computer with 32 GB memory and 3.4 GHz, Intel(R) Core CPU i7-6700 processor in the Matlab R2016a environment. Figure 5 illustrates the queue length of link \(X_{1}\) and that of link \(X_{7}\) at each control step. It can be found that, in terms of the queue length of the link \(X_{1}\), for the first three control steps, MPC-HIA can achieve a little better (or close) performance than MPC-GA (or MPC-SQP). Beginning with the fourth step, MPC-HIA performs much better than both MPC-SQP and MPC-GA. In addition, in terms of the queue length of the link \(X_{7}\), MPC-HIA can achieve better performance than both MPC-SQP and MPC-GA at each control step. This may be because, compared with the deterministic MPC models \(M_{1}\) (MPC-SQP) and \(M_{2}\) (MPC-GA), the proposed stochastic MPC model (MPC-HIA) has better ability to handle uncertainties of the test network. More importantly, one can see clearly that the queue length of \(X_{1}\) and that of \(X_{7}\) achieved by MPC-HIA are always below the maximum allowable queue length (a preset value that is proportional to the length of the link) of link \(X_{1}\) and that of \(X_{7}\) during the entire simulation period. The reason for this is that we have imposed two chance constraints on the queue length of the link \(X_{1}\) and that of the \(X_{7}\) in the proposed stochastic model MPC-HIA. However, starting with the fourth control step, the queue length of \(X_{1}\) and that of \(X_{7}\) obtained by MPC-SQP go beyond the upper bound of the allowable queue length. It should be noted that the upper bound of the (or the maximum) allowable queue length is a preset value, which is proportional to the length of the link. Aiming to avoid the occurrence of queue spill-back, the upper bound of the queue length of \(X_{1}\) (or \(X_{7}\)) is set equal to 90% of the link length of \(X_{1}\) (or \(X_{7}\)). As shown in Figure 5, the upper bounds of \(X_{1}\) and \(X_{7}\) are set to 108 (vehicles) and 126 (vehicles), respectively. Another observation on the queue length curves as shown in Figure 5 is that the queue length of \(X_{1}\) (or \(X_{7}\)) achieved by MPC-SQP continuously increase and go beyond the upper bound since the fourth control step. Especially for the link \(X_{7}\), the queue length started to mushroom from the third control step onward. These are perhaps caused by two reasons.