# Table 2 Energy efficient subnet resource allocation algorithm

EESRA: Energy efficient subnet resource allocation algorithm
Input:
$$I_{\max }$$: the upper limit of the iterations number; $$\Delta$$:infinitesimal threshold;
q: intermediate energy efficiency; j: iteration counter;
Output:
$$\varvec{\mathcal { P }}^{*}, \varvec{\rho }^{*}, \varvec{\mathcal {S}}^{*}$$: the solution of resource allocation policy for $$CoLink_{ij}$$
$$q^{*}, U_{(i j)}^{*}, U_{T P(i j)}^{*}$$: optimal energy efficiency, throughput and power consumption
for $$CoLink_{ij}$$,
1:    $$q \leftarrow 0, j \leftarrow 0$$
2:    while $$j \le I_{\max }$$ do
3:       Solve the problem (17) with given q to obtain the resource allocation policy
$$\left\{ \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right\}$$ and $$F\left( \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right)$$
4:       if $$F\left( \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right) < \Delta$$ then
5:          return $$\left\{ \varvec{\mathcal { P }}^{*}, \varvec{\rho }^{*}, \varvec{\mathcal {S}}^{*}\right\} = \left\{ \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right\}$$ and $$q^{*}=\frac{U_{(ij)}^{*}}{U_{T P(ij)}^{*}},$$
$$U_{(ij)}^{*}=U_{(ij)}\left( \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right)$$, $$U_{T P(i j)}^{*}=U_{T P(i j)}\left( \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right)$$
6:       else
7:          $$q=\frac{U_{(i j)}\left( \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right) }{U_{T P(i j)}\left( \varvec{\mathcal { P }}^{\prime }, \varvec{\rho }^{\prime }, \varvec{\mathcal {S}}^{\prime }\right) }$$ and $$j=j+1$$
8:       end if
9:    end while