# Multilayered Network Model for Mobile Network Infrastructure Disruption
## 5 Routing in DRONET Layer
### Initial and Search Stage of DRONET Layer  
The main role of the Initial and search stage is to continuously search for MANET nodes in the desired area. Therefore, we assume that the operating area is known and it can be divided into multiple sub-areas. The size of sub-areas should be picked according to the UAVs antenna coverage perimeter. Another assumption is considering a local entity that is in fact the dock with operational PC and antenna. When the disruption of fixed infrastructure in the area occurs, the dock initiates the Initial and search stage until the disruption is over.  
Dock continuously sends UAV's to all areas. The UAV is looking for MANET node. We assume that all UAVs are equipped with MANET IEEE 802.11 Wi-Fi communication technology and they are capable of discovering MANET nodes in the ground. When the UAV discovers the MANET node, it obtains the Topology info from each node along with GPS positions of all nodes in the network [36]. That information is sent back to the dock, where the clustering algorithm is provided. It is possible to use multiple clustering algorithms, such as simple lowest-ID or highest-connectivity (degree) algorithm [37], or more complex algorithms such as Particle Swarm Optimization (PSO) [38]. The dock returns the result of the clustering algorithm along with the cluster heads selections. The UAV then takes a position of the MANET gateway node and notifies it about cluster head election and nodes participated in its cluster. The MANET gateway node is then responsible for notification of other MANET nodes about its election.  
When multiple clusters are discovered, UAV takes the position of free cluster and dock send another UAVs takes positions of remained clusters. The multiple clusters can occur if the MANET network contains a larger number of nodes. The situation is depicted in Figure 11, where the left upper part contains MANET network that was divided into two clusters, marked by magenta and green colour. The UAV that discovered the network covers one cluster and dock in the middle of the area sends another UAV to cover the second cluster. All steps of Initial and search stage are described by the flowchart in Figure 12.  
The first step includes input in the form of information about the area. Then the area is divided into N subareas based on area size and coverage perimeter of UAV's antenna. Then, all subareas are marked by associated information \(SUBAREAINFO(N)\) as \"not searched\". Algorithms proceed with an endless While loop, which termination is initiated by the ending of disruption scenario. One by one, UAVs are continuously sent to all subareas that are marked either as \"searched\" or \"not searched\" and at the same time as \"uncovered\". Only areas marked as \"covered\" are not searched  
Figure 11: Example of multiple encountered cluster in the area.  
again. This is because even previously searched subareas can exhibit new uncovered MANET nodes or MANET subnets.  
Figure 12: The DRONET initial and search stage flowchart.  
If the MANET nodes are not discovered in the particular subarea, this area is marked as \"searched\" and UAV proceed to another subarea. If the MANET node is discovered, UAV request \(TopologyINFO\), which includes the topology of the network and GPS positions of all nodes in the network, where discovered node participates. TopologyINFO is sent to the dock, where clustering is performed. The results of clustering are sent back to the UAV, which informs nodes about Cluster Head and participation in the cluster.  
The algorithm then proceeds according to resulted clusters. If multiple clusters appear, UAV covers the randomly selected cluster and dock send another UAVs to cover remained clusters. Then, all subareas belonging to covered clusters are marked as \"searched\" and \"covered\".