# A Cluster-Based Optimal Computation Offloading Decision Mechanism Using RL in the IIoT Field
## 4 Numerical Results
Figure 3: Performance comparison according to task arrival rate per device and the method of selecting the MECS and D2D device and determining offloading strategy decision: (**a**) task blocking rate; (**b**) task completion rate within delay constraints; (**c**) total energy consumption (_J_); (**d**) throughput. Figure 2: Performance comparison according to task arrival rate per device and the system architecture: (**a**) task blocking rate; (**b**) task completion rate within delay constraints; (**c**) total energy consumption (_J_); (**d**) throughput. Figure 4 demonstrates the performance comparison according to the cluster types when the number of devices is 52 and task arrival rate is 0.8. In the cluster type, _hetero_ indicates that in the given environment clusters with different sizes are arranged, while _homo_ refers to an environment in which same-sized clusters are arranged. Figure 4 shows the performance of different cluster types when using different target MECS and D2D device selection methods with the same optimal offloading strategy. When the cluster type is _homo_, detailed performance comparison was already conducted as shown in Figure 3. In Figure 4a, when the cluster type is _hetero_, the average performance of the proposed algorithm _load_QL_ is approximately 53.4% and 54.7% better than those of _dist_QL_ and _random_QL_, respectively. In Figure 4b, when the cluster type is _hetero_, the performance of the proposed algorithm is approximately 38.28% and 39.9% better than those of _dist_QL_ and _random_QL_, respectively. Even if the cluster type is _hetero_, the performance of the proposed algorithm is still better than those of _dist_QL_ and _random_QL_. Since the proposed algorithm considers the load of the MECS and D2D device when it selects the offloading target, it shows better performance by properly distributing the load on the system. In Figure 4c, when the cluster type is _hetero_, the average value reported regarding the proposed algorithm is higher than those of _dist_QL_ and _random_QL_, respectively. The reason is that there are more blocked tasks of _dist_QL_ and _random_QL_ than that of the proposed algorithm, as shown in Figure 4a, hence, the number of computed tasks is smaller and the total energy of task computing is lower. Similarly, in Figure 4d, when the cluster type is _hetero_, the proposed algorithm performs approximately 29.3% and 31.87% better compared to _dist_QL_ and _random_QL_, respectively. This is because the proposed algorithm has a lower blocking rate and a higher task completion rate than other algorithms. Figure 4: Performance comparison according to cluster types when using different target MECS and D2D device selection methods with the same optimal offloading strategy (the number of devices is 52 and task arrival rate is 0.8): (**a**) task blocking rate; (**b**) task completion rate within delay constraints; (**c**) total energy consumption(\(\eta\)); (**d**) throughput. Figure 5 shows the performance when the methods of determining the offloading target are the same based on load and the methods of selecting the optimal offloading strategy are different. In Figure 5a, when the cluster type is _hetero_, the average performance of the proposed algorithm is approximately 35.2% better than _load_random_. In Figure 5b, when the cluster type is _hetero_, the average performance of the proposed algorithm is approximately 19.4% better than _load_random_. In addition, it can be seen that the larger the weight used on the latency side when calculating the reward in learning, the better the task blocking rate or task completion rate within delay constraints. In Figure 5c, the performance of the proposed algorithm is higher than that of _load_random_. The reason is that there are more blocked tasks when _load_random_ is used, as shown in Figure 5a. As a result, the number of computed tasks is smaller and the total energy consumption decreases.