**5. Evaluation Results**

For performance evaluation, we compare the proposed algorithm, EE-CCA, with the following four schemes: (1) ALL where IoT devices always offload all of the tasks; (2) HALF where IoT devices always offload half of the task; (3) NON where IoT devices do not offload any task (i.e., process their tasks by themselves); and (4) RAND where IoT devices randomly offload their tasks at each decision epoch. For pair comparison, IoT devices are paired based on the solution of the optimization problem in Section IV-G. Meanwhile, the objective of this paper is to minimize the energy outage probability while maintaining the probability that the task is completed before their deadline above a certain level. Therefore, the average energy outage probability, *ζE*, and the average probabilities that the task of IoT device *i* and *j* are completed before their deadline, *η<sup>i</sup>* and *ηj*, are used as performance measures of the EE-CCA. Note that *<sup>η</sup><sup>i</sup>* and *<sup>η</sup><sup>j</sup>* can be calculated by 1 − *<sup>ξ</sup><sup>T</sup> <sup>i</sup>* and 1 − *<sup>ξ</sup><sup>T</sup> <sup>j</sup>* , respectively.

To improve the reliability of the simulation results, we have conducted over 10,000 simulation runs with different seed values independently. The default number of IoT devices is set to 6. The other default parameter settings are summarized in Table 2, where [*a b*] denotes a random value between *a* and *b*.


**Table 2.** Default parameter settings.

## *5.1. Effect of the Harvesting Probability*

Figure 4 shows the effect of the harvesting probability *p<sup>H</sup> <sup>j</sup>* of IoT device *j* on the average energy outage probability and the average probabilities that tasks of IoT devices *i* and *j* are completed before their deadlines. As shown in Figure 4, it can be found that the EE-CCA can reduce significantly the energy outage probability of IoT devices (see Figure 4a). For example, when *P<sup>H</sup> <sup>i</sup>* is 0.1, EE-CCA can reduce the energy outage probability by 78% compared to RAND. while maintaining the probability that the task is completed before the deadline (i.e., 0.99) (see Figure 4b,c). This is because IoT devices in the EE-CCA decide whether to offload some parts of the task to the opponent with the consideration of the energy harvesting probability, the task occurrence rate, and the current energy levels of IoT devices. For example, IoT device does not offload its task to the partner when the current energy level of the partner is low and predicted to be decreased due to low harvesting probability and high task occurrence rate.

**Figure 4.** Effect of the harvesting probability. (**a**) average energy outage probability; (**b**) average probability that the task of IoT device *i* is completed before the deadline; (**c**) average probability that the task of IoT device *j* is completed before the deadline.

From Figure 4a, it can be shown that the average energy outage probabilities of all schemes decrease as *p<sup>H</sup> <sup>j</sup>* increases. This is because a high battery level of IoT device *j* can be maintained regardless of whether to offload or not when *p<sup>H</sup> <sup>j</sup>* is high. Meanwhile, from Figure 4b,c, it can be seen that the probabilities that tasks of IoT devices *i* and *j* are completed before their deadlines increases with the increase of *pH* except specific cases (i.e., NON in Figure 4b and ALL in Figure 4c). This is because the tasks can be completed only when IoT devices have sufficient energy. In other words, IoT devices cannot complete their tasks within the deadline if they cannot harvest sufficiently energy. On the other hand, in NON, IoT device *i* does not offload its task to IoT device *j*. Therefore, the harvesting probability *p<sup>H</sup> <sup>j</sup>* of IoT device *j* does not affect the probability *η<sup>i</sup>* that the task of IoT device *i* is completed within the deadline. Similarly, in ALL, all tasks of IoT device *j* are processed in IoT device *i*, and thus *η<sup>j</sup>* is not affected by *p<sup>H</sup> j* .
