# A Cluster-Based Optimal Computation Offloading Decision Mechanism Using RL in the IIoT Field
## 4 Numerical Results  
To evaluate the performance of our proposed algorithm, the effects of various indicators, such as the task arrival rate per device and cluster type, were tested. For experimental evaluation, we deployed four MECSs and 52 devices in an MEC system, with the locations of these devices randomly distributed in a 250 m \(\times\) 250 m square area. The values of the parameters required for the experiments are reported in Table 1.  
Figure 2 shows the performance comparison according to the task arrival rate per device when the number of devices is 52 and the cluster type is homogeneous. A homogeneous cluster type denotes that the cluster sizes are similar. In Figure 2, there are three methods to compare with the proposed algorithm, _load_QL(0.7)_. The proposed algorithm _load_QL(0.7)_ sets the \(\alpha\) for Q-value computation as reward to 0.7. The first method was _all MEC offloading (AMO)_, which is a method of offloading all tasks to the MECS with the least load. The second was _all D2D offloading (ADO)_, which is a method of offloading all tasks to the device with the least load through D2D communication without executing them locally. The third comparison method, _load_random_, firstly selects the MECS and D2D device with the least load as offloading targets, such as _load_QL_, and then the offloading strategy is randomly determined. This is to show that performance can be improved through an optimized offloading strategy by comparing these three methods. In Figure 2a, when the task arrival rate is 0.8, the performance of the proposed algorithm is approximately 59%, 28.6%, and 18.9% better than those of _AMO_, _ADO_, and _load_random_, respectively. When the task arrival rate is 0.3, the performance of the proposed algorithm is approximately 41.7% and 31.4% better than those of _AMO_ and _load_random_, respectively. However, compared to _ADO_, the task blocking rate of the proposed algorithm is slightly higher. This shows that _ADO_ may perform temporarily better because the system load decreases when the task arrival rate is low. However, observe that simple D2D offloading rapidly increases the load of neighboring devices in the cluster, resulting in a sharp decrease in performance. Figure 2b illustrates the task completion rate within the delay constraints according to the task arrival rate per device. When the task arrival rate is 0.8, the performance of the \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline coverage of BS & 150 m [18] \\ \(B^{cell}(t)\), \(B^{d2d}(t)\) & 10 MHz \\ \(\sigma^{2}\) & \(10^{-10}\) \\ \(p^{cell}_{d,m}(t)\), \(p^{d2d}_{i,j}(t)\) & 0.5 W \\ \(v_{d}(t)\) & [600, 800, 1000] Kbits \\ \(w_{d}(t)\) & 1000 cycles/bit \\ \(f_{d}\) & 2 GHz \\ \(f_{m}\) & 5 GHz \\ \(e\) & \(10^{-27}\) \\ \(\alpha\) & 0.7 \\ time slot duration & 100 ms \\ \(L_{req}\) & 80 ms \\ \(\delta\) & 0.5 \\ \(q^{max}_{q_{max}}\) & 3 \\ \(q^{max}_{q_{min}}\) & 5 \\ \(l^{cell}_{d,m}(t)\) & \(148.1+40*\log_{10}\) distance(km) [19] \\ \(h^{d2d}_{i,j}(t)\) & \(128.1+37.6*\log_{10}\) distance(km) [19] \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. proposed algorithm is approximately 59.3%, 16.5%, and 9.8% better than those of _AMO_, _ADO_, and _load_random_, respectively. When the task arrival rate is 0.3, the performance of the proposed algorithm is approximately 4.9% and 5.6% better than those of _AMO_ and _load_random_, respectively. However, compared to _ADO_, the task completion rate of the proposed algorithm is slightly worse. When the task arrival rate is 0.3, the load of the MECS and D2D devices are low because the number of tasks is small. The comparison algorithms select the MECS or D2D devices for task offloading considering the load. However, only the proposed algorithm(_load_QL(0.7)_) considers the energy consumption of the devices and task execution delay.