## 7 Simulation Results
\begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Value** \\ \hline Entry 1 & data \\ Cell radius & 500 m \\ CUs number & 20 \\ D2D pairs number & 2–38 \\ Transmitter to receiver distance & 10–100 m \\ Total Bandwidth & 5 MHz \\ Noise power & \(-\)174 dBm// Hz \\ Sub-channel bandwidth & 240 KHz \\ D2D transmitter power & 0–23 dBm \\ gNB transmitting power & 35 dBm \\ SINR threshold & 3 dBm \\ Shadowing standard deviation & 8 dB \\ Circuit power & 0.1 watt \\ CU transmitting power & 23 dBm \\ Discount factor & 0.9 \\ Learning rate & 0.2 \\ Epsilon & 0.2 \\ \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. the channel conditions and interferences established by the CUs or other D2D pairs inside the cell. Figure 5 compares the sum data rate of the SD-scheme to benchmark algorithms with various numbers of D2D pairs. The increment in the sum data rate is proportional to the D2D pair increase. It is clear that the [24,30] approaches outperform the proposed scheme in terms of sum data rate since these approaches employ maximum transmission power which results in reducing EE in the system. Moreover, in comparison to the benchmark schemes, the SD-scheme provides a higher sum data rate. The reason is that optimizing mode selection and channel assignment mitigates the effects of co-tier interference resulting from spectrum sharing between CUs and other D2D pairs. Consequently, the sum data rate of the network is enhanced accordingly. Clearly, the sum data rates increase slightly when the number of D2D pairs is between 25 and 40, due to the second reuse of the CUs\({}^{\prime}\) spectrum that increases the interference in the network. Furthermore, the suggested strategy enhances network performance by effectively balancing the utilization of resources and interference mitigation. Figure 4: Total power saving versus number of D2D pairs [17,23,24,29,30]. Figure 3: EE versus number of D2D pairs [17,23,24,29,30]. Table 3 provides an overview of performance values, particularly EE, total power savings, and sum data rate, to elucidate the benefits of the SD-scheme over the C-scheme. The findings clearly indicate that the SD-scheme achieves better performance based on elevated EE, total power savings, and sum data rate, demonstrating its efficacy in resource allocation for D2D communications within cellular networks. Figure 6 shows the SE evaluation of the SD-scheme with the benchmark schemes in relation to the D2D pair numbers. The term SE rises incrementally with the number of D2D pairs since the sub-channel reuse indicator improves correspondingly with the increase in D2D pairs. Consequently, the co-tier interferences among shared channels of CUs increase. The SD-scheme demonstrates superior efficiency relative to other approaches. This approach demonstrated better SE when the number of D2D pairs ranged from 2 to 25, related to the minimal interference across the shared channels during the single reuse of the CUs' uplink channel. Moreover, the SE decreases in cases where there are 25-40 D2D pairs due to multiple times reusing the uplink spectrum of CU resources. When the transmitted power of the D2D pair is set to the maximum value, an increased data rate and SE are obtained due to a strong signal which results in increasing the interference and decreasing EE accordingly. The significant efficacy of the proposed strategy is attributed to its adaptive resource allocation mechanism, which responds flexibly to changing network situations. This flexibility ensures potential improvements in SE, which is especially important in heavily loaded D2D environments where interference management is critical. Figure 5: Sum data rate versus the number of D2D pairs [17; 23; 24; 29; 30]. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{ \begin{tabular}{c} **No. of** \\ **Pairs** \\ \end{tabular}