# Optimal Task Offloading Strategy for Vehicular Networks in Mixed Coverage Scenarios
## 5 Simulation and Performance Evaluation
### PPO for Task Offloading Strategy
#### 5.2.2 Performance Evaluation  
Figures 5 and 6 show the historical reward and offloading times of different strategies. It can be observed that through training with the PPO algorithm, as the number of iterations increases, the average offloading delay per iteration gradually decreases and stabilizes. The \"RSU-Local\" collaborative offloading strategy exhibits lower delay compared to unilateral offloading. The main reason is that the real-time changes in the load condition of the offloading targets can affect the offloading delay. By utilizing the PPO-based local and RSU collaborative offloading, the proportion can be adjusted promptly when one side has a heavier load, reducing the offloading delay. The proposed \"Local-BS-RSU\" collaborative offloading strategy in this study achieves the lowest offloading time as it allows for a wider selection of offloading targets. By adjusting the allocation proportion effectively, the offloading delay is minimized, making better use of existing computational resources and exhibiting stronger robustness. A comparison of the proposed offloading strategy with the \"RSU-Local\" collaborative offloading shows an average delay reduction of approximately 5.6%. That means, under the auspices of the aforementioned offloading strategy, vehicular computing platforms are endowed with the capability to process computational tasks with enhanced velocity, facilitating a more rapid response to traffic information, significantly bolstering safety in driving, and providing robust technical support for the execution of more complex vehicular computational tasks. Furthermore, this offloading strategy optimizes resource allocation, achieving an efficient utilization of computational resources, balancing computational load and energy consumption, and enhancing the overall energy efficiency. Figure 7 shows the reward of vehicle offloading strategies under different conditions. The three different cases are the load of offloading target increases (\"load_com\"), the vehicle approaching the covering boundary (\"pos_com\") and the vehicle speed decreasing (\"speed_com\"). It is evident that when the load on the RSU and BS increases while keeping other conditions constant, the offloading delay is most significantly impacted in determining the optimal offloading strategy trained by the PPO algorithm. When vehicles are positioned close to the boundary of the offloading target, to prevent vehicles from exceeding the range during offloading and causing timeouts, the offloading ratio of the RSU and BS in the PPO training decreases, leading to an increase in offloading \begin{table}
\begin{tabular}{l l} \hline
**Parameter** & **Value** \\ \hline Total number of iterations & 300 \\ Iterations per epoch & 10 \\ Rand (exploring factors) & 1/0.1 \\ Batch size & 32 \\ Number of neural network layers & 3 \\ Number of neurons & 512/256 \\ \hline \end{tabular}
\end{table} 
Table 4: _Cont._  
Figure 5: Average reward for different offloading strategies. delay. Furthermore, if the condition of being near the boundary of the offloading target is maintained but only the vehicle speed is set to zero, meaning the vehicle is stationary even when close to the boundary and will not exceed it, the overall offloading delay of the obtained offloading strategy is reduced. Meanwhile, Table 5 shows the average value and standard deviation value of the rewards under different conditions from 100 to 300 epochs, displaying the results of the convergence stage. The standard deviation values do not have much fluctuation, staying within the 200-600 range. That means the strategy trained by PPO has no divergence. The results both indicate that the system model has taken into account the factors affecting vehicle task offloading in mixed coverage scenarios under congested conditions, making the allocation proportion for task offloading more reasonable. Figure 8 shows the performance of the trained model under different conditions.