## 4 Performance Analysis
### Simulation Analysis
On the other hand, we can find the improvements brought by the network coding technique by the comparison of the CCS-DTN scheme and the CS-DTN scheme. Using the network coding technology, some of dropped messages have been restored at the destination. What's more, the average end-to-end delay of the CCS-DTN scheme is lower than those of other protocols. By the Clustering scheme, routing discovery has to be performed when messages are forwarded between clusters. While by the CS-DTN  
Figure 6: Impact of Queue Size on Average End-to-End Delay. scheme, there are more retransmissions than that of the CCS-DTN scheme because of the use of network coding technology. From Figure 7, it is clear that the delivery rate declines when the message generation rate becomes higher. The reason is that the nodes have to drop messages as more and more messages are generated in the network and each node has a limited buffer size. But, the change of the delivery rate by the CCS-DTN scheme is lower than those by others schemes. One reason is that by the CCS-DTN scheme messages will be quickly delivered to the destination. Another reason is that by using of the load balancing mechanism, the CCS-DTN scheme can utilize the buffer more efficiently. And the network coding technique has also played a part in improving the delivery rate. Moreover, it is found that the results obtained from the mathematical analysis and the results from simulations have been proved each other to show the consistency. Another change on the network states for the evaluation is the number of nodes. As shown in Figure 8, the average delivery ratio increases with the increase of the number of the nodes. When there are more nodes in the network, the total available buffer in the network will be larger. And there are more selectable relay nodes which can increase the probability of success delivery. However, when the number of the nodes exceeds a certain threshold, it could lead to bottlenecks at some nodes. As a result, the delivery ratio will be stable in a range. Figure 8: Impact of Number of Nodes on Delivery Ratio. Figure 7: Impact of Message Generation Rate (/s). The last simulation is to study the impact of the clustering threshold on the delivery ratio. As mentioned in Section 3, after clustering, the contact probability between any two nodes in a same cluster must be greater than a value which is defined as the clustering threshold. From Figure 9, it is clear that the delivery ratio first increases with the increase of the clustering threshold and then declines when the threshold exceeds a certain value. When the threshold is very small, all nodes will be in one cluster. The delivery ratio is very low. The reason is that there are only limited copies of a message and the contact probability between the source node and the destination node is low. On the other hand, when the threshold is large, all nodes will be grouped into different clusters, some of which may contain only one or two nodes.. By the inter-cluster routing of the CCS-DTN scheme, messages will be gradually transmitted to the nodes with a higher centrality. In this way, many messages will be dropped when there is not enough buffer in the nodes with a higher centrality. Therefore, when the threshold exceeds a certain value, the delivery ratio cannot be high. According to Equation (14), the probability of one node, node \(i\), in its \(H\) is \(P_{H}^{i}=0.645\). Assume that any two nodes, node \(i\) and node \(j\), are in the same \(H\). The probability when they are in \(H\) at the same time is \(P_{H}^{i}*P_{H}^{j}=0.645*0.645=0.416\). That is to say, 0.4 is a right value to be set as the clustering threshold. According to Figure 9, it is obvious that when the clustering threshold is 0.4, the delivery ratio can achieve the highest value. Therefore, the results from the theoretical analysis and those from the simulation are consistent. Based on the above analysis, in general, the proposed CCS-DTN scheme can obtain a better performance in the scenarios under study.