# Deep Reinforcement Learning for Energy-Efficient 6G V2X Networks
## 4 Simulations and Results
### Results Evaluation  
The experiment results are organized to compare the optimal versus DRL solutions. We obtained the optimal solutions by solving the resource allocation problem (12)-(19) using the CPLEX optimizer [12] and the DRL solutions by implementing the PPO-based Algorithm 1. We explore the impact of the number of vehicles on the following aspects:  
1. Number of active RSUs;
2. System energy consumption;
3. Energy consumption per active RSU;
4. Proportion of active RSUs. Figure 4 shows the impact of the number of vehicles on the number of RSUs to be turned on for different allowed latencies. The number of active RSUs represents a partial goal of our objective function in (12). The number of activated RSUs depended on the association of the vehicle with the RSUs and RBs required to perform vehicle tasks. Intuitively, as the number of vehicles increased, so did the number of active RSUs. We noticed that the number of active RSUs according to optimal solutions ranged between 2 and 6 to serve 32 to 159 vehicles. We also observed that the number of RSUs turned on according to the DRL solutions ranged from 2.5 to 10 RSUs to serve vehicles ranging from 32 to 159. The number of vehicles increased 5 times, while the number of active RSUs increased 3 and 4 times, implying that optimal and DRL allocations led to a reduction in the number of RSUs that must be turned on and save energy. Figure 5 shows the impact of the number of vehicles on the energy consumption for the maximum tolerable latency range of 20 to 50 ms. The energy consumption of the system represents a partial goal of the objective function in (12). The energy consumed \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Scenario**} & \multirow{2}{*}{\begin{tabular}{c} **Learning** \\ **Rate** \\ \end{tabular} } & \begin{tabular}{c} **Training** \\ **Timesteps** \\ **(k Step)** \\ \end{tabular} & \begin{tabular}{c} **Train** \\ **Duration** \\ **(min)** \\ \end{tabular} & \
\begin{tabular}{c} **Step** \\ **Duration** \\ **(ms)** \\ \end{tabular} &
\begin{tabular}{c} **Model Size** \\ **(MiB)** \\ \end{tabular} \\ \hline
1 & \(5.1\times 10^{-4}\) & 10.2–64.5 & 1.67 & 2.2 & 1.43 \\  & \(1.9\times 10^{-4}\) & 128.6–200.7 & 3.79 & 1.5 & 1.43 \\ \hline
2 & \(1.2\times 10^{-3}\) & 10.8–64.5 & 2.08 & 2.9 & 2.22 \\  & \(9.9\times 10^{-4}\) & 124.4–202.8 & 7.29 & 2.4 & 2.22 \\ \hline
3 & \(3.0\times 10^{-4}\) & 45.7–64.5 & 7.09 & 7.1 & 3.13 \\  & \(3.0\times 10^{-5}\) & 201.6 & 14.9 & 4.4 & 3.13 \\ \hline
4 & \(3.0\times 10^{-4}\) & 65.7 & 17.23 & 15.7 & 4.17 \\  & \(3.0\times 10^{-5}\) & 202.2 & 28.61 & 8.5 & 4.17 \\ \hline
5 & \(3.0\times 10^{-4}\) & 66.9–103.4 & 24.85 & 20.9 & 5.33 \\  & \(3.0\times 10^{-5}\) & 200.6 & 42.02 & 12.6 & 6.60 \\ \hline
6 & \(3.0\times 10^{-4}\) & 67.5 & 52.99 & 47.1 & 6.60 \\  & \(3.0\times 10^{-5}\) & 206.0 & 122.08 & 35.6 & 6.60 \\ \hline
7 & \(3.0\times 10^{-4}\) & 32.5–65.0 & 42.51 & 53.1 & 7.99 \\  & \(3.0\times 10^{-5}\) & 203.2 & 105.88 & 31.3 & 7.99 \\ \hline
8 & \(3.0\times 10^{-5}\) & 201.3 & 283.52 & 84.5 & 9.50 \\ \hline
9 & \(3.0\times 10^{-5}\) & 203.5 & 224.53 & 66.2 & 11.12 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: DRL training details. depended on the number of vehicles and their associations with active RSUs. Intuitively, as the number of vehicles increased, so did the energy consumption. We observed that, to process the tasks of 32 vehicles, the average energy consumption according to optimal and DRL solutions was 2.5 and 3.5 millijoules, respectively. We also noticed that, to process the tasks of 159 vehicles, the average energy consumed according to optimal and DRL solutions was 6.3 and 11.9 millijoules, respectively. The percentage of energy added with the proposed DRL solution ranged between 40% and 88% in the scenarios of 32 and 159 vehicles, respectively. When the number of vehicles increased 5 times, the energy consumption increased 2.5 and 3.5 times for the optimal and DRL solution, respectively.