# A Family of ACO Routing Protocols for Mobile Ad Hoc Networks
## 3 AntOR-Based Protocol
### AntOR Phases
#### 3.2.1 Route Setup
The regular pheromone update process is as follows:  
The estimate \(c_{i}^{d}\) commented on previously is calculated according to Equation (4), that is it comes to be the sum of the time estimates that it takes to reach the next hop at each node of the list \(P\):  
\[c_{i}^{d}=\sum_{i=1}^{n-1}\hat{T}_{i\to i+1} \tag{4}\]  
The value of the local estimate \(\hat{T}_{i\to i+1}\) is defined as the product of two terms:  
* The current number of packets in the queue, which are ready to sent at the MAC layer plus one, that is: \[Q_{mac}^{i}+1\]
* The required average time to send a packet: \[\hat{T}_{mac}^{i}\] with what \(\hat{T}_{i\to i+1}\) is, as shown in the Equation (5): \[\hat{T}_{i\to i+1}=(Q_{mac}^{i}+1)\hat{T}_{mac}^{i}\] (5) If we consider the real-time \(t_{mac}^{i}\) that it takes a node to send a packet: \[\hat{T}_{mac}^{i}\leftarrow\eta\hat{T}_{mac}^{i}+(1-\eta)t_{mac}^{i}\qquad \qquad\eta\in[0,1]\] (6)  
In the experiments, \(\eta\) has also been set to 0.7. This value is determined experimentally observing the best behavior of the algorithm. With this parameter, we want to indicate that \(\hat{T}_{mac}^{i}\) has more priority than \(t_{mac}^{i}\), specifically 70%. The value \(t_{mac}^{i}\) at each hop is estimated in AntOR as the time difference between the sending and receiving of the backward ant. Finally, the updating of the regular pheromone value is calculated as shown in Equation (7):  
\[\tau_{ij}^{d}\leftarrow\gamma\tau_{ij}^{d}+(1-\gamma)(c_{i}^{d})^{-1}\qquad \qquad\gamma\in[0,1] \tag{7}\]  
Using the previous equation, the value of a registry \(\tau_{ij}^{d}\) of the routing table from node \(i\) is updated, being \(j\) the next hop, \(d\) the destination that we want to reach and \(\gamma\) a setting parameter set to 0.7 in the performed experiments. This is determined experimentally observing the best behavior of the algorithm. In the particular case, there is virtual pheromone in the link/arc that we want to update (as a consequence of which the diffusion process is completed before the route setup process), that is if the node \(i\) that has a route to the destination \(d\) using next hop \(j\) already has the virtual pheromone, the update of the regular pheromone in the route setup process described by Equation (7) is, for the process of regular and virtual pheromone separation, as follows:  
\[ \begin{array}{l}Regular_{final}=F(Regular_{new},time)\\ Virtual_{final}=0\end{array}  \tag{8}\]  
being:  
\[Regular_{final}=F(Regular_{new},time)\]  
a simplified representation from Equation (7). In other words, when we get a new regular pheromone value, the pheromone virtual value is set to zero. We give priority, therefore, to the regular pheromone regulated against the virtual one, since data are only routed along routes with regular pheromone values. Thus, we do not originate any conflict in the creation and maintenance (updating) of the routes, the algorithm being optimized with regard to its capacity (internal memory) due to the route table only having an entry of the destination and next hop. This entry can contain its corresponding field of pheromone, regular or virtual, but not both.