# Arithmetic Optimization AOMDV Routing Protocol for FANETs
## 3 AO-AOMDV Routing Protocol
### Route Process
#### 3.4.1 Route Discovery Process  
The route discovery process involves the widespread dissemination of RREQ packets, followed by waiting for the route reply (RREP) packets to be unicast from the destination node back to the source node with a timeout determining the completion of the route discovery process. When a node needs to transmit data to another node, it immediately checks the entries in its routing table. If there is a valid path to the destination node, it forwards the data packet to the next hop. Otherwise, it initiates the route discovery process again. The RREQ packet includes fields such as RREQ ID, Origina  
Figure 1: AOMDV routing protocol.  
Sequence Number, Destination IP Address, Destination Sequence Number, and Hop Count. The combination of the source address and sequence number (SN) allows for the unique identification of RREQ packets.  
When a node receives an RREQ packet, if the routing table does not have an entry for the originator IP address, the current node establishes a reverse path using the sequence number (SN) of the RREQ packet and stores the reverse path entry in its routing table. If the routing table already has an entry for the originator IP address, the SN in the RREQ packet is compared with the SN in the routing table. If the RREQ SN is greater than the SN in the routing table, the existing reverse path entry in the routing table is updated. The RREQ packet is then forwarded by broadcasting it to nearby nodes. If the RREQ SN is not greater, the RREQ packet is discarded. The reverse path entry in the routing table includes the IP address of the receiving node, the source IP address, the hop count to the source node, the source sequence number, and the RREQ source IP address. If the current node is the destination node or an intermediate node with a fresh enough entry, the reverse path is utilized to deliver the RREP to the node that previously received the RREQ. The SN is crucial in avoiding routing loops and determining the freshest entry in the routing table.  
Assume that there is an arbitrary node n and a destination node D in Figure 1. When it is necessary to update the routing table, specifically updating the sequence number of D at position i, the corresponding broadcast hop count is initially set. For the sequence number of D, when any node n initializes the routing broadcast for D, the hop count is updated according to Equation (7), where A represents the broadcast hop count, \(hop_count^{D}nk\) denotes the hop count of the k-th route in the routing table from n to D, that is \((last_count^{D}_{nk},next_count^{D}_{nk},hop_count^{D}_{nk})\in route_list^{D}_ {nk}\).  
\[A^{D}_{n}=\begin{cases}max(hop_count^{D}_{nk}),&n\
eq D\\ 0,&otherwise.\end{cases} \tag{7}\]  
The routing table of nodes will be updated through received routing control packets, as the traditional AOMDV only selects the optimal route based on the minimum hop count without considering node energy or route congestion. Therefore, we employ a fitness function to assess the routing situation and use arithmetic optimization to select the best route, as described in the routing maintenance process.