# A Cluster-Based Optimal Computation Offloading Decision Mechanism Using RL in the IIoT Field
## 4 Numerical Results
Therefore, because the load is less affected when the task arrival rate is 0.3, and the proposed algorithm is affected by the energy consumption of the device, there is a difference in performance compared to _ADO_. In Figure 2c, for _AMO_, only the energy consumption during data transmission from the devices to MECS, and not the computation energy consumption of the MECS, is considered to calculate the total energy consumption. This is because the energy consumption we focus on is the device energy consumption. Therefore, because the computational energy of the MECS is excluded, the energy consumption seems relatively small. When the task arrival rate is 0.8, the performance regarding the energy consumption of devices is approximately 21.15% and 11.22% better than those of _ADO_ and _load_random_, respectively. In Figure 2d, _AMO_ shows a relatively low throughput trend because the task blocking rate in MECS increases as the task arrival rate increases. When the task arrival rate is 0.8, the throughput of the proposed algorithm is approximately 13.5% and 8.8% better than those of _ADO_ and _load_random_, respectively. Compared to _ADO_, the proposed algorithm achieves better throughput because the blocking rate is low and completion rate is high when the task arrival rate increases. Since Figure 2 shows a performance comparison according to the system architecture, there seems to be no significant difference in performance between _load_random_ and _load_QL(0.7)_. However, through Figure 3, the performance difference among the methods in the same system architecture will be shown. As a result, through Figure 2, _load_random_ and _load_QL(0.7)_ considering both MEC and D2D communication showed better performance in terms of task throughput, task completion rate, task blocking rate, and energy than _AMO_ and _ADO_ considering only MEC or D2D communication. Figure 3 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. In Figure 3, the comparison methods are described as follows. The first was _dist_QL_, which is a method for selecting the nearest D2D device and MECS as the offloading targets with the distance from the device which originally generated the task. The second was _random_QL_, which is a method that randomly selects the MECS and D2D device as offloading targets. Both _dist_QL_ and _random_QL_ use the Q-learning algorithm in the same way as the proposed algorithm to determine the optimal offloading strategy, after selecting offloading targets. The methods were compared with the proposed algorithm (_load_QL_), with the proposed algorithm used with different weight values, \(\alpha\), for Q-value computation with _load_QL(0.6)_, _load_QL(0.7)_, and _load_QL(0.9)_. The proposed algorithm may set \(\alpha\) differently according to the application requirements in terms of the task execution delay and energy. Therefore, different \(\alpha\) values (0.6, 0.7, and 0.9) were used for performance comparison of the proposed algorithm _load_QL_, whilethe average value of the performance when different \(\alpha\) values were used for comparison with other methods was used. The performance comparison among these methods was to analyze the performance in selecting an offloading target MECS and D2D device. The _dist_QL_ and _random_QL_ methods were compared as different MECS and D2D device selection methods. In addition, we compared the performance of _load_random_ as the method that does not use Q-learning for the offloading strategy decision method. In Figure 3a, when the task arrival rate is 0.8, the average performance of the proposed algorithm(_load_QL_) is approximately 55% better than those of _dist_QL_ and _random_QL_. When the task arrival rate is 0.3, the average performance of the proposed algorithm is approximately 63.2% and 60.1% better than those of _dist_QL_ and _random_QL_, respectively.