# Distributed Edge Computing to Assist Ultra-Low-Latency VANET Applications
## 4 Latency-Aware Offloading Algorithm for Multilevel MEC VANET System
### Annotation
\[T_{ex\text{-}Micro\text{-}cloud}=\frac{N_{CYC}}{R_{Micro\text{-}cloud}}, \qquad R_{Micro\text{-}cloud}\in f_{Micro\text{-}cloud} \tag{4}\]

Then, the total time required to handle the task at the micro-cloud edge server, \(T_{\text{-}Micro\text{-}cloud}\), is calculated as following:

\[T_{\text{-}Micro\text{-}cloud}=T_{ex\text{-}Micro\text{-}cloud}+\ T_{Tx}+T_{ Rx} \tag{5}\]

\[T_{Tx}=t_{trans}+T_{pro} \tag{6}\]

Finally, the decision engine decides whether to accept the offloading request or reject it, by calculating the decision variable of accepting offloading, as following:

\[D_{\text{T-}Micro\text{-}cloud\text{-}ac\text{-}off}=I(T_{\text{T-}Micro \text{-}cloud},\tau)=\left\{ \begin{array}{ll}1?&\text{IF}\ \ (T_{\text{T-}Micro\text{-}cloud}\ \leq\ \tau)\\ 0?&\text{IF}\ \ (T_{\text{T-}Micro\text{-}cloud}\ >\ \tau)\end{array} \right. \tag{7}\]

For a positive decision, the micro-cloud edge sever sends a corresponding message to the OBU to set for the offloading process. If the micro-cloud edge server cannot handle the offloading request, it forwards the request message to the corresponding mini-cloud edge server. The decision engine of the mini-cloud edge server receives the request message and extracts the task information to process the request. Based on the current available resources of mini-cloud edge server, the decision engine calculates the total time required to handle the task, as following:

\[T_{ex\text{-}Mini\text{-}cloud}=\frac{N_{CYC}}{R_{Mini\text{-}cloud}},\qquad R _{Mini\text{-}cloud}\in f_{Mini\text{-}cloud} \tag{8}\]

\[T_{\text{T-}Mini\text{-}cloud}=T_{ex\text{-}Mini\text{-}cloud}+T_{Tx}+T_{Rx} \tag{9}\]

Then, the decision of accepting or rejecting offloading request is calculated as following:

\[D_{\text{T-}Mini\text{-}cloud\text{-}ac\text{-}off}=I(T_{\text{T-}Mini\text{ -}cloud},\tau)=\left\{ \begin{array}{ll}1?&\text{IF}\ \ (T_{\text{T-}Mini\text{-}cloud}\ \leq\ \tau)\\ 0?&\text{IF}\ \ (T_{\text{T-}Mini\text{-}cloud}\ >\ \tau)\end{array} \right. \tag{10}\]

For a positive decision, the mini-cloud edge server accepts the offloading request and the offloading process starts. For the negative decision of offloading, the task is blocked. ## 5 Experimental Results and Performance Evaluation

In this part, the performance of the proposed VANET system and the introduced latency-aware offloading algorithm is evaluated. The proposed system was experimentally tested over a real hardware to validate the system. Furthermore, the system was simulated for high density VANET network to evaluate the performance of the offloading scheme. ### Evaluation of the Proposed System Structure

The analysis of the results from the full-scale experiment to identify key indicators for the VANET was based on a traffic dump recorded on the radio interface of one of the devices. The traffic was recorded using the utility built into the device. The experiment was performed in an open space, and the maximum removal of network elements from each other was 300 m. Based on the tests performed,the set of considered Wave Short Message Protocol (WSMP) package parameters, which were sufficient for statistical analysis, are indicated in Table 2.

The total packet size was 255 bytes. The data presented above were obtained from the test results of a segment of the transport self-organizing network and will be used in the future for modeling and calculating the RSU load. The key parameters of the functioning segment of the VANET model are presented in Table 3.