## 6 Simulation and Analysis
### Validation of the Analytical Model  
In Sub-Section 5.3, we set up an analytical model to calculate the mean file round-trip delay \(EC_{K}\) and the corresponding energy consumption \(ED_{K}\). To validate the accuracy of this model, we varied the parameters \(\left[M_{r},T_{s,r},T_{w,z}\right]_{r=1}^{K}\) and assessed numerically the fit between the theoretical and simulation results. Meanwhile, we also investigated the impact of each parameter on the \(EC_{K}\) and \(ED_{K}\). To simplify the analysis, we restricted the value of parameters \(M_{r},T_{s,i},T_{w,z}\) to be constant, that is, \(M_{r}=M,T_{s,i}=T_{s}\), \(T_{w,z}=T_{w}\) over all cycles \(i=1\),2,...,\(K\). The parameters we varied were \(M\), \(T_{s}\), and \(T_{w}\). When analyzing the impact of one parameter, we set the other two fixed. Figures 2-4 show the evolution of the mean file round-trip delay and the corresponding energy consumption against each of the parameters \(M\), \(T_{s}\), and \(T_{w}\), both from the analytical model derived in Section 5 and simulations. Figure 2 presents the mean file round-trip delay and the corresponding energy consumption against \(M\). \(M\) is the number of independent coded packets disseminated by the source, which means the redundancy added in the network. We can see that with the increase of \(M\), the file round-trip delay decreased, while the corresponding energy consumption increased. For the coding-based transport scheme in ON, the more coded packets the destination received, the more likely it was to decode the file, and the more energy it would consume to forward those packets. Furthermore, a good match between the analysis and simulation curves could be observed, which validates the accuracy of our model. In addition, it can be seen from the figure that the fit between the analytical model and simulations improved when \(M\) increased. For the given \(T_{s}\) and \(T_{w}\), a lower value of \(M\) led to a longer delivery delay, which meant a larger number of cycles, resulting in a bigger inaccuracy in delay and energy consumption. Figure 2: \(T_{s}=30\), \(T_{w}=20\). (**a**) Mean file round-trip delay against \(M\); (**b**) energy consumption against \(M\). Figure 3 shows the mean file round-trip delay and the corresponding energy consumption against \(T_{s}\). \(T_{s}\) is the time in which coded packets are allowed to spread as soon as they have been sent out by the source node. With a larger \(T_{s}\), the destination can grab the needed number of independent packets more rapidly, which need more forwarding operations. As a result, the file round-trip delay decreased and the corresponding energy consumption increased with the increase of \(T_{s}\). Similar with Figure 2, a good match between analysis and simulation curves can also be observed in Figure 3a,b, which can validate the accuracy of our model. It also can be seen from the figure that the fit between the analytical model and simulations improved when \(T_{s}\) increased, because for the given \(M\) and \(T_{w}\), a larger \(T_{s}\) could reduce the duration of cycles, and a lower cycle duration would lead to higher accuracy in the theoretical results. Figure 4 shows the mean file round-trip delay and the corresponding energy consumption against \(T_{w}\). With the increase of \(T_{w}\), the file round-trip delay decreased first and then increased; while the energy consumption first dropped rapidly, and then slowed down. This trend can be explained as follows: \(T_{w}\) controlled the time period that the source waited for ACKs instead of controlling the packets' spreading. If \(T_{w}\) was too low, the cycle ended before the latest ACK could reach the source, so more cycles were needed to transfer files, and the delay and energy consumption were large. A moderate increase in \(T_{w}\) could be helpful to alleviate this situation and reduce time delay and energy consumption. But if \(T_{w}\) continued to increase, the network wasted too much time waiting. However,  
Figure 4: \(M=10\), \(T_{s}=30\).