# Context-Aware Trust and Reputation Routing Protocol for Opportunistic IoT Networks
## 4 Performance Evaluation
This relation is shown in Figure 4, where it is evident that, with an increase in the buffer size, our proposed CATR protocol outperforms the Epidemic, BTRES, and PPHB+ protocols in terms of average latency by 17%, 25%, and 8%, respectively. \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **Values** \\ \hline Simulation area & 4500 \(\times\) 3400 m \\ Simulation time & 100,000 s \\ Movement model & Shortest-path-map-based movement model \\ Interface for communication & Bluetooth \\ Transmission diameter & 20 m \\ Transmission speed & 250 Kbps \\ High-speed interface transmission range & 1500 m \\ High-speed interface transmission speed & 10 Mbps \\ TTL (time to live) & 300 min \\ Message size & 500 Kb to 1 MB \\ Message creation interval & 25 to 35 s \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Simulating parameters. Figure 2: Average latency vs. number of nodes. Figure 5 shows the relation between the message generation interval and average latency, where it is found that with an increase in the interval from 5 to 15 to 45-55 s, the average latency also gradually rises for the studied protocols. However, this value is much lower for our proposed CATR model compared to what is obtained for the other studied models, with CATR performing 17%, 23%, and 9% better than the Epidemic, BTRES, and PPHB+ protocols, respectively. In Figure 6, it is found that as the TTL value increases from 300 to 500, there is a significant improvement in our CATR model in terms of messages dropped. This is due to the fact that a higher value of TTL implies that the message can remain in the network for a longer period of time. In terms of the average number of dropped messages, our CATR scheme is 24%, 12%, and 14% better than the Epidemic, BTRES, and PPHB+ protocols, respectively. Figure 4: Average latency vs. buffer size. Figure 5: Average latency vs. message generation interval. Figure 6: Messages dropped vs. TTL. The relationship between the number of dropped messages and buffer size is shown in Figure 7. It can be observed that when the buffer size is increased from 5 MB to 25 MB, the average number of dropped messages is significantly lower than for Epidemic, BTRES, and PPHB+, improving the performance by 23%, 18%, and 16%, respectively. This is because a node's larger buffer allows it to store a message for longer periods of time, which lowers the amount of messages dropped. The impact of varying the message production interval on the message dropping rate is shown in Figure 8. This rate eventually decreases by 23%, 16%, and 17% compared to Epidemic, BTRES, and PPHB+, respectively, as the message generation interval is increased from 5 to 15 to 45-55. This is because an increase in the message generation interval allows a node to store data packets in its buffer for a longer period of time before any new packet is generated. Figure 9 shows how the number of nodes and hop count are related. It can be shown that for all studied models, the number of hop counts increases as the node count rises from 66 to 186. This is due to the fact that as there are more nodes in the network, there is an increasing number of nodes that are available. However, compared to Epidemic, BTRES, and PPHB+, our proposed CATR model requires a significantly smaller number of hops, improving the performance by 34%, 14%, and 10%, respectively. Figure 8: Messages dropped vs. message generation interval. Figure 7: Messages dropped vs. buffer size. The impact of changing the hop count as the buffer size increases from 5 to 25 MB is depicted in Figure 10. For every model, the hop count progressively drops as a node's buffer size grows. It is explained by the fact that the node can store more and more messages as the buffer size increases, which eventually results in fewer hops. Compared to Epidemic, BTRES, and PPHB+, the proposed CATR's value is significantly lower, which improves its performance by 29%, 10%, and 19%, respectively.