# Arithmetic Optimization AOMDV Routing Protocol for FANETs
## 3 AO-AOMDV Routing Protocol
### Route Process
#### 3.4.2 Route Maintenance Process  
There are two methods for routing maintenance. The first method involves a node broadcasting HELLO messages to neighboring nodes within a one-hop distance. If a node does not receive any messages from a specific neighbor within the configured time interval, it considers the link between the current node and that neighbor node to be disconnected. The second method is responding with a route error (RERR) message. When a node's neighbor becomes disconnected or a data packet cannot be transmitted to the destination node, the node sends an RERR to its predecessor node. Upon receiving the RERR, the predecessor node marks the route to this destination node as invalid in the routing table and resets its lifetime. If the lifetime expires, the route to this destination node is removed. In our mechanism, once multiple routes using the AOMDV are received at the source node, we determine the minimum link hold time using Equation (1), obtain the minimum remaining energy based on Equation (4), and calculate the maximum congestion degree using Equation (5). Next, we calculate the fitness value for each route according to Equation (6) and employ an arithmetic optimization (AO) to select the route with the highest fitness value as the most efficient path. The AO is a meta-heuristic optimization algorithm that achieves global optimization based on the distribution characteristics of arithmetic operators. Multiplication and division operations improve the global dispersion of position updates, while addition and subtraction operations improve the accuracy of position updates in local regions, as shown in Algorithm 1. \(Best_{FF}\) represents the maximum fitness value for each available route between the source node and the destination node. ```
Input: N = 10, dim = 3, \(HT(p_{i})\), \(E(p_{i})\), and \(C(p_{i})\) for all possible input routes; Output: \(Best_{FF}\) for all possible input routes; while\(t\leq T\)do  Update the MOA value using \(MOA(t)=Min+t\times\frac{Max-Min}{T},Min=0.2,Max=1\);  Update the MOP value using \(MOP(t)=1-(\frac{t}{T})^{\frac{1}{2}}\); for i = 1 to Ndo for j = 1 to dimdo  Generate a random values between \([0,1]\)(r1,r2 and r3); \(z=((UB-LB)\times\mu+LB)\); if\(r1\geq MOA\)then  Exploration phase; ifr2\(\geq\) 0.5 then  (1) Apply the Division math operator \((D^{\prime\prime}\div\arcsec)\);  Update the solutions' positions by \(New_{p}=Best_{P}\div(MOP+\epsilon)\); else  (2) Apply the Multiplication math operator \((D^{\prime\prime}\times\arcsec)\);  Update the solutions' positions by \(New_{p}=Best_{P}\times MOP\times z\);  end if else  Exploitation phase; ifr3\(\geq\) 0.5 then  (3) Apply the Subtraction math operator \((S^{\prime\prime}-\arcsec)\);  Update the solutions' positions by \(New_{p}=Best_{P}-MOP\times z\); else  (4) Apply the Addition math operator \((A^{\prime\prime}+\arcsec)\);  Update the solutions' positions by \(New_{p}=Best_{P}+MOP\times z\);  end if  end if  end while  end while use Equation (6) and \(New_{p}\) calculate fitness function \(New_{FF}\); if\(New_{FF}>Best_{FF}\)then \(Best_{FF}=New_{FF}\); \(Best_{p}=New_{p}\);  end if \(t=t+1\);  end while
```  
**Algorithm 1**AO Pseudo code  
We can simply summarize the AO into three steps as follows. Step 1, Accelerating function selection optimization strategy through mathematical optimizer. Step 2, Exploration stage, which uses the multiplication strategy and division strategy for a global search to increase solution diversity, enhance the algorithm's global optimization ability, and overcome premature convergence, achieving global exploration and optimization. Step 3, Development stage, which uses the addition strategy and subtraction strategy to reduce solution diversity, which is beneficial for the population to fully exploit the local range and strengthen the algorithm's local optimization ability. For a better understanding of the proposed AO-AOMDV protocol, we summarize the step-by-step process of the AO-AOMDV protocol in the following. 1.