## 5 System Simulation
### Simulation Results  
Initially we tested the correctness of our protocol in the different topologies and sizes. In the linear network, we simulated 30 nodes with the sink BS as the first node. In this type of topologies, shown in Figure 2, each non-border node has only two neighbors and thus the hop cost and weights do not give any difference in the routing path to reach the BS. Also, precautions should be taken in the availability of bad nodes; since any isolation of a non-border node removes a part of the network. In this case specifically and whenever any node has only one DL node to the BS in general, banning a bad node should be based on the type of misbehavior as the requirements and needs of the network (set by the administrator in the Initialization Block). In other words, a tradeoff should be made between misbehavior's effect on the network and the part to be lost in the network. So if the bad node is sending malicious packets for example rendering the whole network useless the node should be banned at the cost of discarding a part of the network; however for simple cooperation errors, the administrator may choose to tolerate this misbehavior at the benefit of keeping the network alive. Another special type of topologies is the tree topology, shown in Figure 3. In the tree topology, each node also has only one path the sink BS, and thus similar reasoning is done as the linear topology case. The hop cost does not change the routing path and a tradeoff should be taken as when to isolate a node and when to bare its misbehavior. We then simulated a general topology, the grid network for different number of nodes ranging from a simple 5 \(\times\) 5 network to 9 \(\times\) 9, 15 \(\times\) 15, and a large 31 \(\times\) 31 network. In all those topologies, the sink BS is set as the center node and there exists a connection between any two adjacent nodes. We show an example of a 9 \(\times\) 9 grid topology in Figure 4, where the  
Figure 3: The tree topology. Figure 2: The linear topology. green arrows show radio range between the nodes. Initially, the different blocks of CENETRA execute correctly and the BS is able to create shortest paths routing information and distribute such information to the different nodes. Figure 5 shows the network initial routing paths of the different network nodes with hop cost equal to 1. Note that as the time passes and the battery lives of nodes depreciate the paths change to distribute the load in a balanced way and depreciate all nodes equally. Figure 4: The grid topology (9 \(\times\)9). Figure 5: Initial routing paths in the 9 \(\times\)9 grid topology (hop cost = 1). Changing the hop cost in [PERSON]'s algorithm from one to zero gives the possibility to add longer paths from nodes. For hop cost equal to one the BS chooses the most efficient path from the set of shortest paths for each node, while keeping the network relatively balanced. For hop cost equal to zero, the choice depends solely on the frust value (incorporating the battery life and competence) totally neglecting the hop count in the decision. Thus, it chooses the path with the least frust at the expense of increasing the overall communication energy overhead in the network as a whole. Also, with hop cost equal to zero, the routing paths are very dynamic and highly changing every period. Figure 6 shows the routing paths of the 9 \(\times\) 9 network with hop cost equal to zero. In this pass, the BS approximated battery levels of nodes 32 and 50 are very low, of node 42 is 60%, and of node 40 is 70%. It is obvious how the protocol almost fully depleted two nodes while the other two nodes are still good on power. Also the paths are very long and most nodes depend on one BS neighbor (50 nodes are forwarding their packets through node 40!) causing a bottle neck, fast depletion and a higher probability of dropped packets. Consequently, in our tested grid topology, removing the hop cost and depending solely on the frust is not a good option to consider. Figure 7 shows the routing paths with hop cost equal 0.25 and 0.5.