# An Optimized Load Balancing Using Firefly Algorithm in Flying Ad-Hoc Network
## 4 Results and Discussion
Furthermore, such wireless communication may be used to enable multi-node communications and other applications if a data packet needs to be delivered to another node that is outside of the range. In the network, the node with name 26 and node 30 are described as the root nodes mentioned in Figure 3.  
Figure 1: Initialization of flying nodes. Figure 2: Source node and destination node. In such a case, each node selects a random destination, then travels with a random velocity and pauses at the destination. When the stop time expires, the node chooses a random destination with a random velocity and a similar pause duration based on set probability. Furthermore, the root node sends a Route Reply Packet (RRP) to the next neighbor node as shown in Figure 4. A few entries of statistical data from the source node to the destination with appropriate time are shown in Figure 5 below. Figure 4: Root node sends a Route Reply Packet. Figure 3: Root nodes in the network. In the simulation, a large number of flying nodes with defined direction or speed changes are used. We investigated various degrees of flying node density, velocity, and network activity from source to destination during the simulation. Furthermore, in Figure 6, the source node starts sending data to the furthest node, accordingly, to identify the traffic in the entire network. Then, the source node multicast route request packets (Figure 7) and the root node again sends a Route Reply Packet to the next neighbor node (Figure 8). The neighbor node's data with the exact distance value are shown in Table 4 below. Finally, the source node starts sending data to the next proceeding nodes to achieve the target for traffic balance in-network as shown in Figure 9.  
Different performance metrics (parameters) are to be taken further in this research work such as delay analysis, fuel emission analysis, packet delivery ratio analysis, and throughput analysis of flying nodes. There is a comparison between two routing protocols such as GPMOR and Greedy Perimeter Stateless Routing (GPSR). Figure 8: After multicasting, root node again sends a Route Reply Packet. Figure 7: Source node multicast route request packets. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Source** & **Neighbor** & **SX-Pos** & **SY-Pos** & **Distance (d)** \\ \hline
0 & 2 & \(-247\) & 358 & 161 \\ \hline  
\hline \end{tabular}
\end{table} 
Table 4: Neighbor data with a distance value. Figure 9: Appropriate load balancing between source to destination. Delay: The average time it takes for data packets to move across the network from the source flying node to the destination flying node is referred to as delay. The delay of a communications network is a significant design and performance aspect. The processing and transmission delays of a network link are all included in end-to-end delays. Figure 10 depicts the working of a network in terms of end-to-end delay when the number of UAVs, speed, and area magnitudes are varied. The X-axis depicts the time in m/s, while the Y-axis denotes the delay in seconds. The end-to-end delay decreased with the number of UAV nodes. This is because packets are more likely to be routed rather than captured in the suspension buffer. Once the delay for each of these measures was compared, GPSR (purple bar) had the longest delay, even when the region was smaller. This was because when a route request was given, the destination answered to every RREQs that it received, making determining the least populated route take longer. When compared to the GPSR protocol, GPMOR had the shortest delay. Fuel Emission: In fuel emission, to accomplish connection dependability and the quantity of stored fuel in terms of energy and input buffer, the system chooses a route based on the present processing status of a node. Figure 11 shows that GPSR released more fuel than the GPMOR technique. Several requirements must be satisfied, such as the minimum fuel necessary to process packets in kilobytes. The current processing state of nodes calculated in terms of fuel and input buffer.