## 6 Results and Discussions
### Simulation of the Monitoring and Control of Parking Lots in the North of a City
#### 6.2.4 Selecting the Level of Service in a Parking Lot System
\begin{table}
\begin{tabular}{c c c c c c c c} \hline  & \multicolumn{4}{c}{**Simulator 1**} & \multicolumn{4}{c}{**Simulator 2**} \\  & \multicolumn{4}{c}{**Total Number of Sensors/Actuators = 1084**} & \multicolumn{4}{c}{**Total Number of Sensors/Actuators = 456**} \\  & \multicolumn{4}{c}{**(P1; P2; P3; P4; P5; P6; P7; P8; P9; P10; P11; P12; P13; P14; P15)**} & \multicolumn{4}{c}{**(P16; P17; P18; P19; P20; P21; P22; P23; P24)**} \\ \cline{2-9} T (h) & \multicolumn{4}{c}{**Total Number of Messages**} & \multicolumn{4}{c}{**Average of Execution Time in the Simulator**} & \multicolumn{4}{c}{**Total Number of Messages**} & \multicolumn{4}{c}{**Average of Execution Time in the Simulator**} \\  & \multicolumn{4}{c}{**Sent to Broker**} & \multicolumn{4}{c}{**(min)**} & \multicolumn{4}{c}{**Arrivals**} & \multicolumn{4}{c}{**Departures**} & \multicolumn{4}{c}{**Total**} & \multicolumn{4}{c}{**(min)**} \\ \cline{2-9}  & \multicolumn{4}{c}{**Arrivals**} & \multicolumn{4}{c}{**Departures**} & \multicolumn{4}{c}{**Total**} & \multicolumn{4}{c}{**(min)**} & \multicolumn{4}{c}{**Arrivals**} & \multicolumn{4}{c}{**Departures**} & \multicolumn{4}{c}{**Total**} & \multicolumn{4}{c}{**(min)**} \\ \hline
100 & 29,482 & 28,610 & 58,092 & 25.62 & 15,296 & 14,849 & 30,145 & 13.34 \\
200 & 59,417 & 58,566 & 117,983 & 41.37 & 30,230 & 29,776 & 60,006 & 24.75 \\
300 & 89,252 & 88,358 & 177,610 & 62.06 & 45,228 & 44,772 & 90,000 & 37.96 \\
400 & 118,661 & 117,774 & 236,435 & 79.19 & 59,646 & 59,194 & 118,840 & 47.06 \\
500 & 148,068 & 147,111 & 295,179 & 105.64 & 74,892 & 74,436 & 149,328 & 67.31 \\
600 & 178,255 & 177,319 & 355,574 & 126.00 & 90,463 & 90,007 & 180,470 & 79.08 \\
700 & 207,914 & 207,007 & 414,921 & 135.52 & 105,113 & 104,657 & 209,770 & 84.22 \\
800 & 237,594 & 236,695 & 474,289 & 156.16 & 120,078 & 119,627 & 239,705 & 95.72 \\
900 & 267,082 & 266,189 & 533,271 & 169.40 & 134,243 & 133,789 & 268,032 & 103.87 \\
1000 & 297,954 & 297,066 & 595,020 & 194.35 & 149,982 & 149,529 & 299,511 & 120.23 \\ \hline \end{tabular}
\end{table} 
Table 14: Simulation of T hours of operation of parking lots in the north of Madrid. Figure 26: Modular and hierarchical distribution to model an IoT parking system for the north of Madrid. for the north of the city we had:  
\[Z=Y_{\text{simulator-1}}+Y_{\text{simulator-2}}=894.04\times x+1599.4, \tag{3}\]  
\[=\alpha\times x+\beta, \tag{4}\]  
here \(\alpha\) is the sending rate of MQTT messages to the cloud platform:  
\[\alpha=0.248\text{ messages per second}\]  
Furthermore, we can express the relationship between the effective arrival rate and the vehicle departure rate for the m parking lots in the north of the city from M/M/c/N queuing system using the following expression:  
\[\alpha\ =\ \sum_{\text{m}=1}^{24}\left\{\left(\lambda_{\text{eff}}\ +\ \mu\ \times\ \varphi\right)_{\text{m}}\right\} \tag{5}\]  
here \(\lambda_{\text{eff}}\), \(\mu\), and \(\varphi\) son are characteristics of each parking lot;  
\(\lambda_{\text{eff}}\): average of the effective arrival rate;  
\(\mu\): average departure rate;  
\(\varphi\): average number of occupied parking spaces. These proofs of concept were relevant to verify the rate of sending messages from the north of the city to the cloud platform. Taking advantage of the speed of tests through simulation, we can estimate the data loads that the system could be subjected to.