# Energy-Balanced Routing Algorithm Based on Ant Colony Optimization for Mobile Ad Hoc Networks
## 4 Simulations
### Performance of Routing Protocol  
In this section, the IEMACO routing protocol proposed in this paper is simulated and analyzed with an OPNET network simulation tool. The comparison routing protocols are AOMDV and AntHocMMP. We also compare part of the performance of IEMACO with LNNACO. To evaluate the performance of routing protocols, the end-to-end delay, packet delivery rate and route discovery frequency are considered. In addition, since the energy consumption rate of the nodes is considered in this paper, the death time of the first node and the number of dead nodes at the end of the simulation are compared to measure the energy balance performance of the routing protocol. The simulation parameters are shown in Table 4.  
**Performance comparison with different node speeds**. It can be seen from Figure 4 that, with the increase of node moving speed, the average end-to-end delay in the network gradually increases. The IEMACO protocol designed in this paper has the lowest delay at different moving speeds, while the AOMDV has the largest delay. This is because the routing design of AOMDV does not consider the mobility of the node. When the link is disconnected, it takes longer to discover a new path. AntHocMMP adopts multipath based on the energy of the node, and uses the two parameters of rate and delay in routing, avoiding the path with large rate and large delay. IEMACO considers the distance and speed between nodes and selects the path with longer remaining lifetime, so the end-to-end delay is minimal. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Value** & **Parameter** & **Value** \\ \hline Scene size & 100 m \(\times\) 100 m & Mobility model & Random way out \\ Moving speed & 0–50 m/s & Number of nodes in network & 40 \\ Initial energy of node & 100 J & Packet rate \(\beta\) & 1–10 packets/s \\ MAC protocol & IEEE 802.11 & Data rate & 1 Mbps \\ Communication range & 250 m & Packet size & 512 Bytes \\ Pheromone heuristic factor \(\alpha\) & 0.7 & Expected heuristic factor \(\beta\) & 0.3 \\ Initial pheromone \(\gamma_{0}\) & 10 & Pheromone evaporate rate & 0.7 \\ Simulation time & 200 s & Evaporation duration & 1 s \\ Number of iterations & 100 & Ant number in each iteration & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Simulation parameters for routing protocol. Figure 3: Comparison of convergence performance. As can be seen from Figure 5, as the node moves faster, the packet delivery rate decreases. This is because the node movement causes the data packet being transmitted to be unable to find the next hop, and the lifetime is exhausted; then, the packet is discarded. When the node is static, the packet delivery rate is not 1 because, in each simulation, there is always a node whose energy is exhausted over time, resulting in partial packet loss. However, because IEMACO considers more about energy balance of the network than AntHocMMP and AOMDV, the node failure occurs less and the packet delivery rate is higher. Figure 6 shows the death time of the first node at different node movement speeds. As can be seen from Figure 6, for the two routing protocols compared in this paper, when the node moving speed increases, the dead time of the first node increases. It can be explained as that each node passively handles the topology change of the network and the transmission of data is spread over different nodes; therefore, the energy consumption of a single node is relieved to some extent. The protocol proposed in this paper actively detects the link state when routing and avoids the path with fast moving speed  
Figure 4: Average end-to-end delay versus node moving speed. Figure 5: Packet delivery rate versus node moving speed. and high energy consumption, so it can balance energy consumption. At the same time, IEMACO's first node death time did not increase with the increase of node speed but remained at about 85 s. This is also because the network topology change and node energy state are considered in routing.