## 7 Results and Discussions
### AI Predictive Model  
Currently, statistical, and artificial intelligence (AI) techniques are increasingly being used in combination with numerical models to generate more accurate predictions in various areas. In the context of queuing theory, one of the most widely used AI techniques is linear regression (LR) prediction [46; 47; 48]. LR is a data analysis technique that predicts the value of unknown data by using another related and known data value. It mathematically models the unknown or dependent variable and the known or independent variable as a linear equation [49; 50; 51; 43]. The regression model consists of an approach to model the relationship between a dependent scalar variable \"Y\" and one or more explanatory variables named \"X\" and then to plot a line that will indicate the trend of a set of continuous data, whose formula is:  
\[Y=mX+b\]  
where Y is the result, X is the variable, m is the slope (or coefficient) of the line, and b is the constant or also known as the \"point of intersection with the Y-axis\" on the graph (when X = 0). In the context of queuing theory, linear regression can be used to predict variables related to the performance of a queuing system, such as average waiting time as a function of independent variables such as customer arrival rate and server capacity, among others. Figure 12: Simulated arrival times compared to vehicle completion times at 300 p.m. on 15 January 2021. By applying linear regression to data collected from a queuing system, more accurate estimates and forecasts of system behavior and performance can be obtained [34; 52; 53]. Linear regression is just one of many statistical and AI tools that can be used in combination with queuing theory to analyze and optimize the performance of queuing systems. These techniques provide a solid foundation for understanding and making informed decisions about traffic management, urban planning, and other areas related to congestion and vehicle flow in cities [31; 38; 54; 55]. The predictive models are obtained using simple linear regression using the demand data of each traffic flow intensity from 3:00 p.m. to 6:00 p.m. provided by Autoridad de Transito y Transporte Terrestre of Panama (ATTT) [56]. Table 4 shows the data used to train the model. The demand of the model variables w, x, y and z is obtained by applying simple linear regression on the data set that constitutes the traffic flow intensity demand for each hour. The variables used for the intensity are:  
I\({}_{15\text{H}}\)--traffic flow intensity demand at 3:00 p.m. (15 h)  
I\({}_{16\text{H}}\)--traffic flow intensity demand at 4:00 p.m. (16 h)  
I\({}_{17\text{H}}\)--traffic flow intensity demand at 5:00 p.m. (17 h)  
I\({}_{18\text{H}}\)--traffic flow intensity demand at 6:00 p.m. (18 h)  
The models for each intensity are as follows:  
\[\text{w}=\text{i}_{1}+\text{m}_{1}\text{I}_{15\text{H}}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Date** & **3:00 p.m.** & **4:00 p.m.** & **5:00 p.m.** & **6:00 p.m.** \\ \hline  
\hline \hline \end{tabular}
\end{table} 
Table 4: Maximum demand from traffic flow intensity by hours. \[ \begin{split}\text{x}&=\text{i}_{2}+\text{m}_{2}\text{I}_{16 \text{H}}\\ \text{y}&=\text{i}_{3}+\text{m}_{3}\text{I}_{17 \text{H}}\\ \text{z}&=\text{i}_{4}+\text{m}_{4}\text{I}_{18 \text{H}}\end{split} \]  
where \(\text{i}_{1}\), \(\text{m}_{1}\), \(\text{i}_{2}\), \(\text{m}_{2}\), \(\text{i}_{3}\), \(\text{m}_{3}\), \(\text{i}_{4}\), and \(\text{m}_{4}\) are the coefficients of the linear regressions of the intensities. Predictive models are obtained using simple linear regression and the demand values of each intensity. These data were stored in Pandas DataFrame and were programmed using Python [27; 39; 57; 58; 59; 60; 61]. During the training of the models, 80% of the data for training and 20% of the data for testing were used. Tables 5-8 and Figures 13-16 show the values resulting from the model training for each intensity.