## 2 System Model
### Device Energy Consumption Estimation  
The battery (with its limited lifetime) is the only source of energy for the devices to operate in the D2D communication for data transmission. The device performs a vital operation such as receiving data packets from the neighboring devices and forwarding data packets toward the destination devices. For this, devices consumed an excessive amount of energy that leads to an energy depletion problem; thereby affecting the routing and network performance. Hence, the energy consumption of the intermediate device plays a significant role in the selection of an optimal route between source and destination devices. The device energy consumption is estimated with the utilization of the energy consumption model for wireless communication [42; 43]. Device energy consumption mainly occurred during the transmission and receiving states of data packets for data transmission. This paper exploits the free space model (\(\lambda^{2}\) power loss) and multi-path fading model (\(\lambda^{4}\) power loss) to calculate the signal transmission distance between the transmitter \((Tx)\) and receiver \((Rx)\) device. Here \(\lambda\) defines the distance between the \(Tx\) and \(Rx\). The free space model is utilized when the distance between \(Tx\) and \(Rx\) is lower than the threshold value (\(d_{0}\)). In contrast, the multi-path fading model is utilized when the distance between \(Tx\) and \(Rx\) is higher than \(d_{0}\). Furthermore, the transmission circuit and power amplification losses also consumed energy during the operation time of the circuit. Therefore, when the \(k\) number of data packets are transmitted in the network, the energy consumption of the devices can be calculated as follows:  
\[E_{Tx}(k,\lambda)=\left\{ \begin{array}{ll}kE_{Tx-dec}+k_{F_{d}}\lambda^{2}& \lambda<d_{0}\\ kE_{Tx-dec}+k_{emp}\lambda^{4}&\lambda>d_{0}\end{array} \right. \tag{1}\]  
\[E_{Rx}(k)=kE_{Rx-dec}, \tag{2}\] \begin{table}
\begin{tabular}{l l} \hline \multicolumn{1}{c}{**Symbol**} & \multicolumn{1}{c}{**Description**} \\ \hline \(D\) and \(L\) & Set of devices and all feasible connection sets of links \\ \hline \(l(x,y)\in L\) & Link between two devices \(x\in D\) and \(y\in D\). \\ \hline \(\lambda\) and \(d_{0}\) & Signal transmission distance and threshold value \\ \hline \(k\) & Number of data packets transmitted \\ \hline \(E_{Tx-dec}\) and \(E_{Rx-dec}\) & Energy consumed per bit by \(Tx\) and \(Rx\) circuits \\ \hline \(\varepsilon_{f}\) and \(\varepsilon_{amp}\) & Power amplification factor of the radio models \\ \hline \(RE_{\max}\) and \(RE\) & Maximum and residual energy of the devices \\ \hline \(DR^{c}_{(x,y)}\) and \(M^{c}_{(x,y)}(t)\) & Drain rate and mobility of relay device c in the path \((x,y)\) \\ \hline \(pos^{c}_{c}(t)\) and \(pos^{c}_{c}(t-t_{0})\) & Current and initial positions of the devices \(c\) in trace time \(T\) \\ \hline \(\theta^{T}_{c}(t)\) and \(\theta^{T}_{c}(t-t_{0})\) & Current and initial directional angle of device \(c\) in trace time \(T\) \\ \hline \(n(T)\) & Number of time samples taken during trace time \(T\) \\ \hline \(p_{f}\) and \(p_{r}\) & Forward and reverse delivery ratio \\ \hline \(D_{(x,y)}\) and \(w^{c}_{(x,y)}(t)\) & Distance of link \((x,y)\) and Backpressure weight on link \((x,y)\) \\ \hline \(S_{p}\) and \(\mu_{(x,y)}\) & Packets size and rate of packets transmission \\ \hline \(w_{i}\) and \(\Gamma_{S(t)}\) & Window size of probe packets and set of data rate transmission \\ \hline Num\((i_{t-1},t_{i})\) & Number of probe packets received at current and previous time window \\ \hline \(w/\tau\) & Number of probe packets sent before the data transmission \\ \hline \(Q^{s}_{n}(t)\) & Number of data packets flow from device \(c\) are backlogged at device \(n\) at time \(t\) \\ \hline \(E[Q(t)]\) & Expected average queue length of the network at a time \(t\). \\ \hline \(\alpha^{c}_{n}(t)\) & Number of exogenous flow \(c\) packets generated at the device \(n\) \\ \hline \end{tabular}
\end{table} 
Table 1: Summary of notations.