# Distributed Edge Computing to Assist Ultra-Low-Latency VANET Applications
## 4 Latency-Aware Offloading Algorithm for Multilevel MEC VANET System
### Annotation
It was also clear that with the increase of distance between RSU stations, the value of packet delivery time is increased. However, it was decreased with the increase of car mobility. Figure 6: Packet delivery time with the distance between RSU stations for scenario (B). Figure 7: The rate of data offloaded to the backhaul network for scenario (B). The shortest packet delivery time was for cars moving at 60 km/h, and it was twice the delivery time attained for packets for cars moving at 30 km/h. Figure 9 introduces the results for scenario C in terms of data offloaded to the backhaul network. Results indicate the same attribute as in the previous two scenarios. Also, the data offloaded to the backhaul network in this case was higher than that of the previous two scenarios; this is because of the higher flow rate considered in this scenario. ### Performance Evaluation of the Proposed Offloading Algorithm

The proposed offloading algorithm is implemented for the proposed system and simulated over a reliable simulation environment for different simulation cases. The system is simulated over the Matlab environment, with the simulation parameters introduced in Table 6.

The considered tasks were heterogeneous in terms of size, and equivalent to the workload of real images, web pages and text messages. Two simulation scenarios are considered. The first scenario, scenario (I), was introduced to check the effect of the QoS latency on the proposed offloading \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline F\({}_{\text{GBU}}\) & \(\varepsilon\) (1.0, 2.0) GHz \\ F\({}_{\text{Micro-cloud}}\) & \(\varepsilon\) (2.0, 4.0) GHz \\ F\({}_{\text{Mini-cloud}}\) & \(\varepsilon\) (3.0, 6.0) GHz \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Simulation parameters for evaluating offloading algorithm. Figure 8: Packet delivery time for with the distance between RSU stations for scenario (C). Figure 9: The rate of data offloaded to the backhaul network for scenario (C). model. In this scenario, three cases were considered; in each case a certain value for the QoS latency was assumed. The second scenario is scenario (II), which was introduced to compare the proposed offloading algorithm with the local execution and traditional offloading systems. Scenario (I): Table 7 indicates values for QoS latency, Q, for the considered fifty tasks, arranged as a five group of tasks. Figures 10-14 provide the average latency for handling the considered tasks, for the three considered values of QoS latency. As the QoS latency, Q, increases, the opportunity for offloading and unloading OBU resources increases. Scenario (II): In this scenario, we considered three main systems for evaluation our proposed system. The first system, system A, represents the local execution, where no edge servers are deployed and no offloading processes are considered. The second system, system B, represents the VANET system with one level of offloading. This system deploys only one type of edge servers connected to RSUs and cellular base stations. The third system, system C, represents the proposed system. Figure 15 indicates the percentage of blocked tasks of each system, for the three values of the QoS latency, Q. The proposed system achieved higher efficiency in terms of blocking tasks, since it provides resources near to users without loading OBUs. Figure 14: The average latency of handling the fifth group of tasks. Figure 12: The average latency of handling the third group of tasks. Figure 13: The average latency of handling the fourth group of tasks. ## 6 System Realization

In this part, the proposed system with the comprised algorithms is realized. The system was constructed with RSUs impeded to traffic lights on the roads. The use of these devices in the aggregate will give the possibility of unloading road traffic and allow emergency services to travel without traffic jams. Screens of the conducted real system and involved hardware are presented in Figures 16 and 17. Figure 16: Developed model.