# Enhanced Ant Colony Optimization for Vehicular Ad Hoc Networks Using Fittest Node Clustering
## 3 Methodology
### Modeling the Search Space  
Our proposed framework represents a substantial advancement in cluster formation, as illustrated in Figure 2. For reference, Table 1 provides an overview of the notations employed in our proposed framework. The search space design is the greatest issue in swarm-based routing. The ants estimate the candidate solution by performing a search in graphical form. Initializing the route is the first step to discovering the optimal routes. The distance oriented approach (DOA) calculates the distance between the current node and its neighbors by forwarding beacon messages. A novel distance metric is introduced to accurately calculate the distances between deployed vehicles named parallel Euclidean distance (PED). PED is symmetric, positive definite, and fulfills points placed in triangle inequalities. It falls between 0 to 1. Let us assume two lanes, \(\mathrm{a}=[\mathrm{a}_{1},\mathrm{a}_{2}\ldots\mathrm{a}_{n}]\) and \(\mathrm{b}=[\mathrm{b}_{1},\mathrm{b}_{2}\ldots\mathrm{b}_{n}]\) and \(\mathrm{p}=[\mathrm{p}_{1},\mathrm{p}_{2}\ldots\mathrm{p}_{n}]\), are the three finite points under Euclidean space \(\mathrm{P}_{n}\), wherein \(\mathrm{p}\
eq\mathrm{a}\) and \(\mathrm{p}\
eq\mathrm{b}\). The PED is estimated as follows:  
\[\mathrm{PED(a,b;P)}=\frac{||\mathrm{a-b}||}{||\mathrm{a-p}||+||\mathrm{b-p}||} \tag{1}\]  
where  
\[||\mathrm{a-b}||=||\mathrm{a-b}||^{2}=\sqrt{\left|\mathrm{a}_{1}-\mathrm{b}_{ 1}\right|^{2}+\ldots+\left|\mathrm{a}_{n}-\mathrm{b}_{n}\right|^{2}}\]  
The estimated PED is preserved at the routing table. The role of PED estimation is to allocate costs for the node's edge. Initially, the track, distance, node count, and velocity for each ant/vehicle are predefined. For instance, an immediate PED estimates if any vehicle alters its speed. The assigned costs are taken up as the objective function. Because of the VANET's dynamic nature, the path's cost also changes. The purpose of the PED is to eliminate the overheads in cluster and communication. The routes are formed in mesh topology among ants using dynamic aware transmission range on the estimated PED (DA-TRPED) algorithm. The proposed DA-TRPED treats the highway vehicles as a swarm and assigns \(\mathrm{Trans}_{\mathrm{rang}}\) using the estimated local PED of each node. The topology is a directed graph that holds vertices and edges, which is expressed as:  
\[\mathrm{Network}=(\mathrm{Vertices~{}V~{}and~{}Edges~{}E}) \tag{2}\]The density of the neighboring vehicles is measured as follows:  
\[\mathrm{T}^{\mathrm{Density}}=\frac{\mathrm{V}^{\mathrm{Neigh}}}{\mathrm{Dis}^{ \mathrm{front}}}+\mathrm{Dis}^{\mathrm{back}}\cdot\mathrm{CL}*100 \tag{3}\]  
where  
\(\mathrm{T}^{\mathrm{Density}}\) denotes the traffic density of the vehicles;  
\(\mathrm{V}^{\mathrm{Neigh}}\) denotes count of neighboring vehicles detected;  
\(\mathrm{Dis}^{\mathrm{front}}\) denotes the distance between vehicles and the neighbors in front;  
\(\mathrm{Dis}^{\mathrm{back}}\) denotes the distance between vehicles and the neighbors behind;  
Figure 2: Proposed framework of the DA-TRPED technique in ant colony optimization. CL denotes the count of lanes in roads. The density of the local vehicles [40] is measured as follows:  
\[\mathrm{L}^{\mathrm{Density}}=[\frac{\left(1-\mathrm{T}^{\mathrm{Density}} \right)}{\rho}+1]^{-1} \tag{4}\]  
where \(\mathrm{L}^{\mathrm{Density}}\) denotes local density.