# Research on Secure Community Opportunity Network Based on Trust Model
## 4 Performance Evaluation  
This study employs THE ONE simulator to conduct experiments on the Secure Community Opportunistic Network (SCTM) routing algorithm based on the trust model. THE ONE simulator, written in Java, is specifically designed for simulating opportunistic networks. The TCR algorithm is evaluated based on three key indicators: network transmission success rate, average transmission delay, and routing overhead. Additionally, traditional routing algorithms, including Direct (direct transmission algorithm), Epdic (Epidemic algorithm), Spray (Spray and Wait algorithm), and the community routing algorithm BubbleRap, were selected for comparative analysis. The experimental setup includes an AMD Ryzen 7 5800H CPU, NVIDIA GeForce RTX 3060 GPU, 16 GB x 4 DDR4 memory, and Windows 10 Home Basic 64 bit operating system. Table 2 illustrates the simulation parameters configured by THE ONE simulator for the experiment. The simulated map used in this study is derived from the actual map of Helsinki within THE ONE simulator. The simulation duration is set to 6 h, covering an area of 4500 m x 3400 m. A total of 1000 nodes are involved in the simulation, utilizing the SHORTESTPATHMAPBASEDMOVEMENT node motion model with movement speeds ranging from 0.8 m/s to 1.8 m/s, and a maximum transmission range of 10 m for each node. The message size varies from 500 Kb to 1 Mb, with a data packet sending interval of 25S to 35S. The Time To Live is set to 300 M, and each message is replicated 10 times. To compare and analyze the performance of five routing algorithms--SCTM, Direct, Epdic, Spray, and BubbleRap--in opportunistic networks, this study will evaluate them based on three key indicators: transmission success rate, average transmission delay, and routing overhead. **Transmission success rate** (\(deliveryratio\)): This parameter denotes the ratio of successfully delivered messages during transmission to the total number of messages generated by the source node within the network. \[deliveryratio=\frac{message_{del}}{message_{cr}}\times 100\% \tag{12}\]  
**Transmission delay** (\(latency\_avg\)): This parameter represents the average transmission time needed for messages to traverse from the source node to the destination node within the network. A smaller value indicates a more robust transmission capability of the routing algorithm. \[latency\_avg=\frac{1}{n}\sum_{i=1}^{n}delivered_{t} \tag{13}\]  
**Routing overhead** (\(overhead\)): This parameter denotes the ratio of messages forwarded by nodes in the network to the total number of successfully transmitted messages. A higher \begin{table}
\begin{tabular}{c c} \hline \hline
**Simulation Parameters** & **Parameter Range** \\ \hline Simulation time & 6 h \\ Simulation area & 4500 m x 3400 m \\ Nodes numbers & 1000 \\ Node motion model & SHORTESTPATHMAPBASEDMOVEMENT \\ Movement speed & 0.8 m/s–1.8 m/s \\ Packet sending speed & 250 Kb/s \\ Maximum transmission range & 10 m \\ Message size & 500 Kb–1 Mb \\ Packet sending interval & 25 s–35 s \\ Time To Live & 300 m \\ Number of message copies & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters. routing overhead implies increased costs for nodes in accomplishing message forwarding and greater resource utilization. \[overhead=\frac{message_{rel}-message_{del}}{message_{del}} \tag{14}\]  
Figure 2 illustrates the correlation between transmission success rate and simulation time for the Direct, Epdic, Spray, BubbleRap, and SCTM routing algorithms. The SCTM algorithm, employing community division and selection of nodes with superior forwarding behavior and higher centrality as next-hop relay nodes, achieves the highest transmission success rate, peaking at approximately 81%. Conversely, the Epdic and BubbleRap algorithms, employing flooding forwarding strategies, experience a decline in transmission success rate over time due to the accumulation of redundant messages in the network, resulting in increased message losses.