## 4 Experiments and Results
### Topologies after Deployment and Self-Healing  
Figures 7 and 8 show a network with geographic routing in an environment with and without obstacles, respectively, for a decreasing number of living nodes. The proposed algorithm returns a homogeneous distribution of nodes in a grid-like structure. The grid is not fully symmetrical nor equally spaced, because there is no global directive to move one way or another. The initial positions of the nodes after deployment are simply the result of all interacting forces when balance is reached (Figures 7a and 8a). As time passes, nodes start to die, and the grid starts to shrink. As soon as there are not enough nodes to cover the full test environment, remaining living nodes tend to conform a circular structure around the sink node due to its attraction force (Figures 7b-e and 8b-e). It can be observed that nodes close to the sink node tend to die earlier than the rest. This is coherent with a closer neighbor routing algorithm, where nodes close to the destination one reroute most of the traffic. Dead nodes become obstacles. Since \(f_{71}(r_{i,j})\) is lower than \(f_{72}(r_{i,j})\), living nodes can move closer to dead nodes than to other living nodes. However, at some point, dead nodes might act as a barrier around the sink node for living nodes (Figures 7d,e and 8d,e). In our simulations, this issue was not important because the distance of this barrier to the sink node is lower than the communication range (Figure 7e). If the barrier actually kept outside nodes out of range, it might be necessary to add additional battery-dependent forces to move dying nodes out of the way.  
Figure 7: Network configuration when: (**a**) 0%; (**b**) 12.5%; (**c**) 25%; (**d**) 50% and (**e**) 70% of the nodes are dead (figures are scaled 1:10 m).  
One of the main advantages of the proposed algorithm is that it naturally adapts to the structure of the environment. Since nodes operate only on reactive forces, any obstacle in the way simply acts as a repulsor, and nodes seamlessly arrange themselves around it (Figure 8a-e). Obstacles may have some impact on how the network evolves during self-healing, since rearrangement is not optimized at any stage. However, deployment differences in nodes with and without obstacles are not significant. Figure 9 shows the deployment areas after initial balance and after 70% of the nodes are dead in the environment without and with obstacles for the simulations in Figures 7 and 8. We can observe that there are some differences in the boundaries, but nodes are mostly located within the same areas.  
Figures 10 and 11 show a deployed network with hierarchical routing in the same environment with and without obstacles. If we compare geographic and hierarchical routing network deployment in the same environments (Figures 7 and 8), it is obvious that the coverage area is lower in hierarchical mode. In this case, no node barrier appears around the sink node, because dead nodes are more randomly distributed. In this case, nodes die in the expected order: L1 nodes fail before L0 nodes, and then, they are replaced by role swapping L0 nodes (see Section 2.2, Figure 1). In hierarchical deployment, the proposed algorithm also adapts naturally to environments with obstacles (Figure 11). Since hierarchical networks keep a (minimum) structure, differences in node areas with and without obstacles (Figure 12) are larger than in the previous case (Figure 9), mostly in areas close to obstacles. However, covered areas are basically the same.