## 5 Joint Optimization of Resource Allocation and Computation-Offloading Decisions
### The Proposed Algorithm JROPSO
until\(t>T_{\max}\) or Fit(t)-Fit(t-\

## 6 Performance Evaluation

### Simulation Settings

Here, we present the simulation results demonstrating the performance of the JROPSO algorithm. We employed the following simulation scenario for most of the simulations unless otherwise noted. We considered the HetNets as comprising of \(M=50\) MDs within a coverage area (\(250\times 250\) m\({}^{2}\)) including six SBSs and one MBS connected to all SBSs. The channel-gain models were assumed to follow the path-loss model according to \(140.7+36.7\)log10(d) [35], where \(d\) (km) is the distance between the MD and the SBS. For the communication model, the noise power was set to \(n_{0}=-100\) dBm [34], and the transmit power of the MD for task offloading to the SBS was set to \(p_{m}=23\) dBm. The data rate of the fiber-optic link was \(\beta=1\) Gbps [18], and we set the number of subcarriers at \(H=12\) and the bandwidth of each sub-channel to \(W=3\) MHz. Additionally, there was no inter-cell interference in the wireless fronthaul. For the computational task, the input data size of the computational tasks was uniformly distributed within the range \([600,1200]\) KB, and the number of CPU cycles required for completing the computational task was randomly generated at between \(C_{m}=[500,1000]\) Megacycles. In terms of computing resources, the CPU speed of the computing resource of the mMEC allocated to each MD was \(f_{0}=3\) GHz, the maximum CPU computing capacity for each sMEC was \(f_{m}^{max}=6\) GHz, and the local computing power of the MDs was randomly assigned from the set \(\{0.5,0.8,1\}\) GHz [34; 39] and \(\alpha=5\times 10^{-27}\)[34; 35]. The weighting parameters of the computational task were set to 0.5 (i.e., \(\lambda_{m}^{t}=\lambda_{m}^{t}=0.5,\forall m\in\mathcal{M}\)). For the PSO algorithm, PSO parameters were set according to a previous study [27]. Briefly, we set \(w=2,c_{1}=2,c_{2}=2\), the size of the particle population (\(K\)) to 30, and the maximum number of iterations (\(T_{\text{max}}\)) to 1000. The simulation results were averaged over a number of Monte Carlo simulations, and MD and SBS locations were randomly and uniformly distributed. ### Simulation Results

To evaluate the performance of the JROPSO algorithm, we compared it with baseline schemes:

* Local Computing Only (LCO): all of the MDs execute their computational tasks locally in the absence of computation offloading. * Without MBS (WMBS): The proposed algorithm JROPSO is implemented without MBS. * Only offloading in a 2-tier system (OF): offloading only to sMECs and mMEC, with computation resource allocation optimized for sMECs. In the first experiment, we verified the convergence of our proposed algorithm in terms of the total computing overhead by the numerical result in Figure 2. In this experiment, we performed in 3 cases of 10 MDs, 30 MDs, and 50 MDs. From Figure 2, we see that the proposed algorithm can converge into a stable solution after a finite number of iterations. In addition, the average iteration for the convergence of the proposed algorithm is approximately linear with the number of MDs. In the second experiment, we determined the percentage of offloading MDs according to the increase in the total number of MDs (Figure 3). Initially, when the number of MDs was small, the percentage of offloading MDs was relatively high; however, as the number of MDs increased, the percentage of offloading MDs decreased. The reason for this is that each MD tends to offload its computational task to the MEC server to save energy consumption and/or completion time. However, a larger number of MDs lead to a high competition for computing resources at the MEC server. Therefore, more MDs are not beneficial from remote computing; thus, some MDs must be executed locally to minimize the total computing overhead. In the third experiment, we evaluated proposed algorithm JROPSO in terms of the total computing overhead of MDs with respect to increases in the number of MDs (Figure 4).