A Bio-Inspired Cluster Optimization Schema for Efﬁcient Routing in Vehicular Ad Hoc Networks (VANETs)

: Vehicular ad hoc networks (VANETs) are vital to many Intelligent Transportation System (ITS)-enabled technologies, including efﬁcient trafﬁc control, media applications, and encrypted ﬁ-nancial transactions. Due to an increase in trafﬁc, vehicular network topology is constantly changing, and sparse vehicle distribution (on highways) hinders network scalability. Thus, there is a challenge for all vehicles (in the network) to maintain a stable route, which would increase network instability. Concerning IoT-based network transportation, this study proposes a bio-inspired, cluster-based algorithm for routing, i.e., the intelligent, probability-based, and nature-inspired whale optimization algorithm (p-WOA), which produces cluster formation in vehicular communication. Various parameters, such as communication range, number of nodes, velocity, and route along the highway were considered, and their probaabilities were incorporated into the ﬁtness function, hence resulting in randomness reduction. Results were compared to existing methods such as Ant Lion Optimizer (ALO) and Grey Wolf Optimization (GWO), demonstrating that the developed p-WOA technique produces an optimal number of cluster heads (CH). The results achieved by calculating the Packet Delivery Ratio (PDR), average throughput, and latency demonstrate the superiority of the proposed method over other well-established methodologies (ALO and GWO). This study conﬁrms statistically that VANETs employing ITS applications optimize their clusters by a factor of 75, which has the twin beneﬁts of decreasing communication costs and routing overhead and extending the life of the cluster as a whole.


Introduction
The development of devices has led to greater precision in terms of driver ease and safety, the introduction of intelligent systems, and the modification of vehicles in recent years in response to the growing concern for safety on the roads. The Intelligent Transportation System's (ITS) core focus is on improving road traffic and safety data, which has benefited greatly from the proliferation of wireless and mobile networks. Some of the most common applications of ITS include real-time information on traffic routes, monitoring of traffic conditions to prevent accidents and collisions, and the collection of data on traffic volumes and congestion [1]. Other than safety-related data, users can also find information about features such as gas stations, toll booths, and Wi-Fi hotspots. Intelligent Transportation Systems include V-WLANs (Vehicular Wireless Local Area Networks) and V-Cell Networks (Vehicular Cellular Networks) (VCN). The first makes use of wireless local area networks (WLANs) to connect cars to the internet, whereas the second relies on fifth-generation (5G) mobile networks to do the same by allowing cars to tap into the paper. The existing whale optimization algorithm for clustering was analyzed, and several changes are proposed to make it more effective. These include using probabilistic modeling, increasing the convergence factor to avoid local optima, and making smart adjustments to the algorithm's self-adaptive weights. An intelligent probabilistic whale optimization strategy, inspired by the way whales locate and target prey, has been proposed in [14] as a way to deal with routing problems in the context of cluster deployment. The primary contribution is as follows: • A mathematical model of an intelligent whale optimization algorithm (p-WOA) for cluster optimization was developed. • Predictive vehicle initialization procedures to eliminate randomness were created. • Self-adjusted weights of each vehicle based on their fitness functions for optimal performance were designed. • A statistical analysis to evaluate the developed method with other well-established methods was performed.

Bio-Inspired Algorithms for VANETs
The performance and overall strength of the current ITS have improved due to many VANETs capabilities and applications. To apply the VANET technology, though, there have also been a number of difficulties and problems. Numerous studies in this domain concentrate on several fundamental aspects of vehicle networks, such as routing, safety, and space management. Recently, techniques based on biological inspiration have been utilized to enhance ITS frameworks already in use. Due to the following issues, bio-inspired cluster optimization has been implemented in vehicular ad hoc networks [15]: • Evolutionary algorithms effectively handle varied topological structures found in VANET networks because they are self-organizing and adaptable to different scenarios. • As they incorporate the highest level of exploration and exploitation, algorithms with bio-inspiration are more accurate at detecting the network's damaged nodes. This offers a practical means of lowering security attacks on the network and, thus, improving its security. • Employing biologically inspired approaches has additional benefits, including their low complexity in handling a VANET's computational issues, which include network overhead, packet delivery ratio, minimizing delay, and improving the convergence factor.

Background Research and Literature
Metaphor and natural metaheuristics are two examples of bio-inspired approaches that can be used to solve the NP-hard clustering optimization problems of in-vehicle networks [16]. In contrast to conventional metaheuristics, biologically inspired approaches or metaheuristics procedures are error-free. The techniques here take their cues from realworld examples, be they biological, natural, or human-made. These techniques are used to address a wide range of NP-hard optimization problems, and they do not require any prior knowledge of the problem domain. When combined with efficient search strategies, metaheuristics can quickly identify the optimal answer. It has been established that routing in a VANET is an NP-hard problem. Clustering algorithms form an integral part of several CBR methods [17]. Multi-Objective Problems (MOPs) are put into practice in the field of clustering [18]. In particular, these MOPs affect routing in ad hoc networks. The effectiveness of traditional QoS is affected by several variables. These include Packet Delivery Ratio (PDR), average end-to-end delay, and bandwidth utilization. Some of the benefits of clustering optimizations, as shown in Figure 1, include network topology stability, data aggregation, minimizing the number of clusters, bandwidth optimization, and efficient handover management [19]. data aggregation, minimizing the number of clusters, bandwidth optimization, and efficient handover management [19]. As cluster stability increases, the need for these optimization tasks decreases [20]. However, metaheuristics, particularly bio-inspired optimization techniques, can be used to increase cluster performance even though cluster stability is an NP-hard problem. Figure 2 [21] as shown below depicts the overall structure of VANETs . As cluster stability increases, the need for these optimization tasks decreases [20]. However, metaheuristics, particularly bio-inspired optimization techniques, can be used to increase cluster performance even though cluster stability is an NP-hard problem. Figure 2 [21] as shown below depicts the overall structure of VANETs. This is seen in [22] when Levy's expedition to free the Ant Lion Optimizer from local optima displaces the insects' shambolic gait. To further strengthen the presentation of ALO, the population growth rate was used as an input to progressively adjust the decep-  This is seen in [22] when Levy's expedition to free the Ant Lion Optimizer from local optima displaces the insects' shambolic gait. To further strengthen the presentation of ALO, the population growth rate was used as an input to progressively adjust the deception dimensions by the 1/5 Principle, which includes changes to assembly precision, velocity, and control. The authors of [23] suggest implementing the lion optimization algorithm (LOA) in VANETs. It is a refined method of routing in automobile networks that use LOA QoS. Utilizing mobility from local to stronger networks, this technique enhances vehicle QoS pathfinding, which is inspired by a lion pride's most important characteristics. The authors of [24] introduced the Bull Optimization Algorithm to facilitate routing based on reactive topologies. The Bull Optimization Algorithm is a property of all forms of directional finding that, when given a sufficient evaluation constraint, interferes with the production of optimal pathways for recovery and regular forwarding. One method for routing in VANETs that was proposed in [25] was based on water wave optimization (WWO). The optimal path was determined by simulating water-wave characteristics and taking into account QoS requirements, collision probabilities, and network congestion.
According to [26], a genetic algorithm-enhanced method based on the AODV was proposed (G-AODV). It was a safe method of backup routing that is used only when necessary, and it helped strengthen the security of the connections between nodes and other networks. To improve VANET multicast routing performance, [27] recommended emulating bee-life behavior (BLA). It was presented to address the NP-complete Qualityof-Service Multicast Routing Problem (QoS-MRP) in VANETs. Using preexisting paths that maximize bandwidth utilization while minimizing cost and time, the ABC Algorithm determined the optimal multicast tree between the sender and the receiver. The BLA took cues from bee activities such as breeding and foraging to generate new routes predicated on the BLA's tolerance of scavenging in the surrounding area. The ACO-based clustering technique presented in [28] was a novel CACONET (Constrained Ad Hoc Network) algorithm. This algorithm addressed the issue of VANET scalability. The CACONET minimized cluster size while maintaining CH stability, which resulted in less strain on the network's infrastructure. The authors of [29] presented a moth-flame-based clustering algorithm called CAMONET. This approach utilized Moth-Flame Optimization (MFO) to guarantee a high cluster lifetime and an ideal CH number, two crucial components of a reliable network. This concept was inspired by the moths' ability to track their flight path by watching the moonlight as they travel at night. A moth keeps an eye out for the flaming object in space and reports its whereabouts. By determining the CNs' speeds, directions, and communication ranges, this phenomenon made it possible to trap CHs and reduce the network's cluster density while simultaneously taking advantage of the moth's position and intended capabilities to improve location via a diminishing aspect. Consequently, the most effective clusters for dependable networking were amassed. When using a wide range of densities and transmission distances, CAMONET outperformed CACONET. Node clustering in VANET, based on the work of Grey Wolf, was presented in [21] (GWOCNET). GWOCNET made use of the hunting and social habits of grey wolves to find the optimal cluster size. A vehicle's heading, velocity, and location can all be determined with a cluster number, which must be optimized. The GWOCNET model minimized the linear factor convergence discovered during various phases of wolf hunting by using methods such as social ranking for hunting guidance, seeking out prey, highlighting prey, and attacking prey. Increasing the quality of all optimization methods, including the selection of the alpha wolf, requires the development of the election of the leader wolf. The suggested method built the optimal number of clusters across all zones and communication distances, outperforming both CLPSO and MOPSO [30]. For VANETs, the authors of [31] took cues from fireflies and suggested a multi-objective weighted clustering method (RWCP-MFO). This algorithm used the metaheuristics of the Firefly Algorithm, which was inspired by the fluttering movements and light-intensity observations of fireflies, to optimize the RWCP parameters while accounting for the vehicles' speeds, directions, reputations, land identifiers, and neighborhood sizes. Multiple agents gathered information at a secure urban monitoring site, as proposed in [32] (Datataxis). When E. coli infiltrated a network, it disrupted a topology-based unicast routing protocol. According to [33], glow-worm routing packets were propagated via glow-worm swarm optimization (GSO) to provide numerous routing paths. The GSO approach made use of new phenomena of required data that were node-specific. The ED between the current hop and the source, as well as the number of cars present, were what established the fitness value. Following a calculation of the fitness value, the luciferin was optimized with each successive hop. By utilizing inter-layer approaches, a traffic flow system, and an AI-based system for cluster selection that took into account cluster size, network density, and CN velocity, the authors of [34] presented an intelligent-based clustering algorithm in VANETs (IBCAV) that enhanced directional accuracy. A new clustering strategy for VANETs was created in [35]: a highwaytransmittable environment. To establish reliable groups, the authors suggested an algorithm based on the Ant Colony System (ACS) called ASVANET. By taking into account travel time, road quality, and mobility congestion, the authors of [36] proposed an ACO-and PSO-based synchronized self-motivated direction-finding optimization strategy to aid the central decision-making routing system. These evaluations showed how effective PSO and ACO algorithms are at cutting down on travel time. The authors proposed using a whale optimization-based cluster optimization technique to achieve an optimal number of clusters through fine-tuning a wide variety of parameters, including communication range, node count, network size, and load balancers. The efficiency and longevity of the network were both boosted. The authors of [22] suggested a method for optimizing the number of clusters in a transportation network that takes its cues from the behavior of wolves in their search for food or prey. The convergence factor and total network overhead were both optimized with the suggested technique. A unique optimization approach, suggested by the authors of [37] and based on the behavior of ant lions during foraging, delivered the optimal solution (cluster head) within a local optimum (limited coverage area).
This study evaluated the WOACNET [15] and proposes a new p-WOA strategy for an optimal number of clusters for efficient routing amongst vehicles, based on the requirements of cluster optimization in VANETs, by increasing the nodes' density to their maximum range, expanding the network area, and boosting the load balancing factor. In addition, a probabilistic technique was created for the initialization of vehicles on the road. The paper's contents are as follows: In the second section, we discuss a summary of materials and methods used, followed by a discussion of simulations based on probabilities. Section 3 details the outcomes and comparative statistical analysis. Section 4 comprises discussion, and the final portion, Section 5, concludes the paper.

Materials and Methods
Routing protocols may be limited in scope or rely on a small set of parameters if they are expected to fulfill all of the critical requirements for information exchange. To solve all of these issues with ITS in one fell swoop, this study proposes an intelligent cluster optimization approach (p-WOA), including efficient cluster formation, packet delivery ratio, average throughput, and latency, and involves probabilistically seeding the road with a single vehicle, increasing the number of cars to 100, and accounting for the time and resources required to run such a simulation. To optimize the paths taken by data messages as they travel through the network, a clustering technique that takes its cues from the laws of probability was employed. Figure 3 depicts the suggested framework with an emphasis on inputs and outputs:  The proposed framework works as follows: 1: Representation: Individuals inside evolutionary algorithms are defined in representation.
2. Evaluation Function: The fundamental for enabling improvements is the identification of a fitness function or maximized function. To determine the legitimacy of a solution, this threshold value must be attained.
3. Population: This contains every potential resolution. The proposed framework works as follows: 1.
Representation: Individuals inside evolutionary algorithms are defined in representation.

2.
Evaluation Function: The fundamental for enabling improvements is the identification of a fitness function or maximized function. To determine the legitimacy of a solution, this threshold value must be attained.

3.
Population: This contains every potential resolution. Variation Operators: To separate the novel solutions from the old ones, two variation operators, mutations and rearrangements, were used. 6.
Selection Mechanism: This works exactly like parent selection, only it happens in the following cycle of evolution when the candidate solution is mature enough to be judged. 7.
Best Solution: Once all of the fitness functions are evaluated, the cluster head is selected based on the best packet Delivery Ratio, latency, and average throughput.

The p-WOA Algorithm for Intelligent Whale Optimization
To decrease cluster formation processing time, computational cost, network overhead, packet latency, and end-to-end delay between vehicles, a probabilistic whale optimizer was developed to decrease vehicles' randomness. The probabilistic method and mathematical modeling are covered in sections B and C.

Mathematical Modelling of p-WOA
In this study, we provide numerical examples to explain how to search for vehicles, how to construct clusters, and how to choose a cluster leader for optimal performance of clustering. The numerical analysis of enclosing a target, plotting an attack using a bubble circle, and searching a vehicle are all depicted in this section ( Figure 3).

(1) Encircling Prey
After being assigned a cluster head, vehicles can locate it and establish communication with it by incorporating Equations (1) and (2), where D represents the distance between vehicle X(t) and cluster head X*(t), and X(t + 1) displays the next iteration toward the optimal solution (cluster head). Because p-WOA does not know where exactly exploration will take place, it will pick whichever vehicle has the most optimal cluster head arrangement as the target. In Equations (1) and (2), we see how, once the optimized investigation is set up, other vehicles looking for cluster heads inform the optimized vehicle specialist of the locations in which they agree: Here, t represents the current iteration, A and C are coefficient vectors, X* is the vector indicating the position of the best possible arrangement found so far, X represents the location direction, | |is the highest possible esteem, and "." represents the growth in dot-product size. Each iteration toward the best solution requires X* to be refreshed. Equations (3) and (4) can be used to determine the trajectories A and C: Whale optimization techniques have two basic stages: the exploration stage (where vehicles are searched) and the exploitation stage (formation of the cluster head). Finding all of the cars in a network based on their distance from one another requires first performing a search or exploration, and then grouping. The variable (a) in Equation (3) is used to toggle between the exploration and exploitation stages; it is reduced from 2 to 0 at each iteration, and (r) is a random vector in the interval [0, 1].
(2) Bubble-net Attacking Method (Exploitation Phase) Two strategies, based on vehicles' Bubble-net behavior, are offered: This technique measures the distance between the area of the vehicle (X, Y) and the desired area (X*, Y*). Soon after, a spiral condition is produced for two points to characterize the spherical growth of automobiles, as depicted in Equation (5): where → D'=| → X * (t) − → X| and it seems to be the elimination of the ith vehicle from the cluster head (the best possible arrangement is reached), b is a constant used to determine the shape of a logarithmic curve, l can be any number in [-1, 1], and "." denotes a replication of the elements one by one. Vehicles move around in a spherical or spiraling pattern within the environment of the vehicle they are concentrating on (the cluster head). Before optimizing the clusters as indicated, it is assumed that there is a probability of 50% that both activities will be presented because they appear to be rare synchronous practices; hence the formulation of Equation (6): where p might be any non-integer in the range [0, 1]. Vehicles also randomly scan the area for cluster heads, and the segment's accompanying scientific display is shown in the closing credits.

(5) Search for Prey (Exploration Phase)
It is possible to employ the comparative part, which is derived from a transformation of vector A, for hunting (investigation). In addition to specifically targeting their current locations, vehicles also conduct random searches. For vehicle searches, the arbitrary range 1-−1 on A was employed. In this setup, the searching automotive operator's standing is raised above that of the randomly selected expert, which is in contrast to the manipulation stage. This method, together with the |A| > 1 focus on investigation, enables the p-WOA to perform a universe-wide search. A representation of this phenomenon can be seen in Equation (7):

p-WOA Probabilistic Modelling
To obtain the most up-to-date location of the vehicle, a probabilistic model was incorporated by adjusting the cross-over probability to increase the efficacy and population coverage of the suggested strategy. For more information on the crossover procedure, see Equation (8): In this equation, P m n represents the mth reading taken from the current nth agent, b represents the random nodes or search vehicles in the population, and cp is the crossover probability used to determine the algorithm's running duration and convergence factor. The method will take longer to run, converge more quickly, and have a lower population range if cp is made smaller. The formula for determining cp's value is: In this expression, tmax is the maximum number of iterations allowed, and [0, 0.5] is the range of values for the constant c that is used to regulate the fluctuations of the parameter cp. By adjusting cp as given in Equation (9), we may enhance diversity and accuracy in vehicle location estimates.
Self-adaptive weights have been assigned in the planned p-WOA to ensure that no vehicle can get lost. As demonstrated in Equation (10), where tmax is the maximum number of cycles permitted, we choose an adaptive probability 'ap' such that every automobile is linked to the best automobile found so far: Algorithm 1 displays the generated mathematical model's pseudocode: Initialization of vehicles' positions and velocity randomly on a freeway by creating a mesh between vehicles. All vehicles in the above mesh should have the same values for their search agents.

2.
Determine the separation between a vehicle and others, 3.
Calculate the likelihood of each node's selection 8. CH = Roulette Wheel selection [All nodes for clustering are possible] 9.

14.
Nodesi The p-WOA kicks off with some made-up configurations. Every cycle, the cars improve their standing with either a predetermined vehicle or the best possible configuration found using a probabilistic method. Providing individual cluster head searching and identification necessitates lowering the "a" value from 2 to 0. When |A| > 1, the probability work chooses the most erratic vehicle, and when |A| < 1, the best configuration for the rearrangement of the vehicles is chosen. p-WOA may exhibit either a spiral or circular motion, as determined using the value of p.
Simulation parameters are presented in Table 1.

Results
In this section, we provide numerical results for various configurations for a number of nodes, communication ranges, network area, and load balancing factors. The developed cluster optimization method for route optimization in vehicular networks, namely (p-WOA), was evaluated in comparison to two state-of-the-art methods: the Ant Lion Optimizer (ALO) [38] and the Grey Wolf Optimizer (GWO) [22].
A. Cluster Density and Optimal Transmission Range A variety of experiments were carried out with varying parameters, such as increasing the number of nodes to 100, reducing the communication range to 100-600 m, and extending the grid size from 1 km × 1 km to 4 km × 4 km, to identify the boundaries of the developed p-WOA. In Figure 4, we see the wide variety of clusters that form when the number of nodes is fixed at 100 but the communication distance between them is changed (from 100 m to 600 m).
Taking a transmission range of 100 to 600 m and a total of 100 nodes, a 1 km × 1 km grid is depicted in the Figure 4a. When compared to other state-of-the-art approaches such as ALO [38] and GWO [22], it is clear that the suggested p-WOA had the lowest overall cost. Using the same constraints as in (a), but with a grid size of 2 km × 2 km, we obtained (b) in Figure 4. As the range of the transmission grew, the number of clusters reduced, and vice versa. The smaller the clusters that were generated, the less effort was expended by the network. Although the other settings in Figure 4c remain the same, the grid size was fixed at 3 km × 3 km. Compared to the other two approaches, the number of clusters created using the developed p-WOA was much smaller. An enhanced packet delivery ratio and reduced hop count will result from using these findings. To see how p-WOA performs in comparison to the previously described techniques, see Figure 4d, which depicts the final scene with a grid size of 4 km × 4 km. More clusters are needed to accommodate vehicles that are geographically separated in a larger grid size, which is evident when the grid size is raised. The result is an increase in routing costs and a deterioration in the lifespan of the network. It can be observed from Figure 4 that, as the transmission range increased, the number of clusters decreased. However, it is observed that the developed p-WOA produced a relevantly lesser number of clusters compared to other bio-inspired algorithms (ALO and GWO).  Taking a transmission range of 100 to 600 m and a total of 100 nodes, a 1 km * grid is depicted in the Figure 4a. When compared to other state-of-the-art approache as ALO [38] and GWO [22], it is clear that the suggested p-WOA had the lowest o cost. Using the same constraints as in (a), but with a grid size of 2 km 2, we obtain in Figure 4. As the range of the transmission grew, the number of clusters reduced vice versa. The smaller the clusters that were generated, the less effort was expend the network. Although the other settings in Figure 4c remain the same, the grid siz fixed at 3 km * 3 km. Compared to the other two approaches, the number of cluster ated using the developed p-WOA was much smaller. An enhanced packet delivery and reduced hop count will result from using these findings. To see how p-WOA per in comparison to the previously described techniques, see Figure 4d, which depic final scene with a grid size of 4 km * 4 km. More clusters are needed to accomm vehicles that are geographically separated in a larger grid size, which is evident whe B. Grid Size vs. Number of Clusters Next, to confirm the advantage of utilizing p-WOA over other bio-inspired algorithms, a new angle was tested by creating multiple clusters to compare with varying grid sizes and transmission distances. Figure 5 shows the results of maintaining a fixed number of nodes (30) while increasing the transmission range from 200 m to 500 m. The y-axis shows the number of clusters, and the x-axis represents the dynamic grid sizes. It was found that there was a clear correlation between the grid size and the number of clusters, which in turn directly affected the routing cost, packet delay, and, ultimately, the network's lifetime. sizes and transmission distances. Figure 5 shows the results of maintaining a fixed number of nodes (30) while increasing the transmission range from 200 m to 500 m. The y-axis shows the number of clusters, and the x-axis represents the dynamic grid sizes. It was found that there was a clear correlation between the grid size and the number of clusters, which in turn directly affected the routing cost, packet delay, and, ultimately, the network's lifetime. As can be seen in Figure 6, the number of nodes was increased for the continuation of the experiments. P-WOA outperformed competing approaches when compared in aggregate. In some phases, p-WOA overlapped with those of other approaches due to the randomness of the algorithms; however, this may be readily fixed by adopting a probabilistic approach and applying intelligent self-adaptation weights during the succeeding iteration. As can be seen in Figure 6, the number of nodes was increased for the continuation of the experiments. P-WOA outperformed competing approaches when compared in aggregate. In some phases, p-WOA overlapped with those of other approaches due to the randomness of the algorithms; however, this may be readily fixed by adopting a probabilistic approach and applying intelligent self-adaptation weights during the succeeding iteration.

C. Packet Delivery Ratio
The average packet delivery ratio shows how many packets were sent from the source and how many were received at the destination. Because it allows us to evaluate the efficacy of any given network, it is an essential metric [38]. Using Equation (11), we can determine that a network with a higher average packet delivery ratio is more reliable than one with a lower ratio:

C. Packet Delivery Ratio
The average packet delivery ratio shows how many packets were sent from the source and how many were received at the destination. Because it allows us to evaluate the efficacy of any given network, it is an essential metric [38]. Using Equation (11), we can determine that a network with a higher average packet delivery ratio is more reliable than one with a lower ratio: Comparing p-WOA's PDR to that of other conventional approaches, as shown in Figure 7, it can be seen that p-WOA performed better than ALO and GWO.

C. Packet Delivery Ratio
The average packet delivery ratio shows how many packets were sent from the source and how many were received at the destination. Because it allows us to evaluate the efficacy of any given network, it is an essential metric [38]. Using Equation (11), we can determine that a network with a higher average packet delivery ratio is more reliable than one with a lower ratio: Comparing p-WOA's PDR to that of other conventional approaches, as shown in Figure 7, it can be seen that p-WOA performed better than ALO and GWO.

D. Latency
Transferring a data packet requires some processing time, which is referred to as "latency" (packet). The term "latency" is used to describe the delay experienced by data as they travel over a network. The time it takes for a datum to travel from its origin to its destination and back again is often referred to as the "round trip delay." When 30-100 cars are taken into account, as shown in Figure 8, the average delay was about one minute. In comparison to other approaches, the figure demonstrates that p-WOA had the lowest latency [39]. Transferring a data packet requires some processing time, which is referred to as "latency" (packet). The term "latency" is used to describe the delay experienced by data as they travel over a network. The time it takes for a datum to travel from its origin to its destination and back again is often referred to as the "round trip delay." When 30-100 cars are taken into account, as shown in Figure 8, the average delay was about one minute. In comparison to other approaches, the figure demonstrates that p-WOA had the lowest latency [39].

E. Average Throughput
The average throughput is the rate at which data are transported between the source and the destination. We know that a higher throughput number [40] will boost our network's performance. Equation (12) allows for its determination:

E. Average Throughput
The average throughput is the rate at which data are transported between the source and the destination. We know that a higher throughput number [40] will boost our network's performance. Equation (12) allows for its determination: For 100 nodes and a grid size of 1 km × 1 km, Figure 9 displays that the maximum throughput attained with p-WOA was 7 Mpbs, whereas the average throughputs of GWO and ALO were 6 Mpbs and 4 Mpbs, respectively. LBF is often used as a performance metric in research. Therefore, LBF was used this study to assess the efficacy of the created method in comparison to other establishe methods. With LBF, the workload on the network is distributed evenly across all clust heads (CHs). To maximize the longevity of both the cluster head and the network as whole, the ideal situation is for CH to manage an equal number of nodes. When a node a cluster moves in or out, the LBF makes sure CH is updated accordingly. Figure 10 show that when the number of nearby vehicles was near its maximum value, p-WOA outpe formed GWO and ALO in terms of tuning the network load. The proposed approach, WOA, was tested against existing methods, and the results are compared here to dete mine its efficacy. E. F. Load Balance Factor (LBF) LBF is often used as a performance metric in research. Therefore, LBF was used in this study to assess the efficacy of the created method in comparison to other established methods. With LBF, the workload on the network is distributed evenly across all cluster heads (CHs). To maximize the longevity of both the cluster head and the network as a whole, the ideal situation is for CH to manage an equal number of nodes. When a node in a cluster moves in or out, the LBF makes sure CH is updated accordingly. Figure 10 shows that when the number of nearby vehicles was near its maximum value, p-WOA outperformed GWO and ALO in terms of tuning the network load. The proposed approach, p-WOA, was tested against existing methods, and the results are compared here to determine its efficacy.
The new method was put through its paces in a series of additional experiments. By raising the number of network nodes to 50 while keeping the grid size at 1 km * 1 km, Figure 11 compares p-WOA to other possible solutions. The new scheme, p-WOA, was better than the older ones in distributing the workload evenly among a cluster's nodes.
F. G. Evaluation-related statistical tests and analyses Fully Modified Least Squares (FMOLS) statistical tests, including the p-test, regression analysis, R-squared, and analysis of variance, were applied to the results to gauge the performance of the created p-WOA (ANOVA). a cluster moves in or out, the LBF makes sure CH is updated accordingly. Figure 10 that when the number of nearby vehicles was near its maximum value, p-WOA o formed GWO and ALO in terms of tuning the network load. The proposed approa WOA, was tested against existing methods, and the results are compared here to mine its efficacy.  The new method was put through its paces in a series of additional experime raising the number of network nodes to 50 while keeping the grid size at 1 km Figure 11 compares p-WOA to other possible solutions. The new scheme, p-WO better than the older ones in distributing the workload evenly among a cluster's n    The transmission range (TR) is the independent (predictor) variable.
No. of clusters is the dependent (outcome) variable.
The findings of a regression study comparing the number of clusters with the communication range under ALO, p-WOA, and GWO are shown in Table 2. Here, it is claimed that the relationship between transmission range and the number of clusters obtained was inverse, with a larger transmission range value resulting in fewer cluster heads. According to the table, an increase in communication range of 1% resulted in a −0.04 reduction in the cluster head under ALO and GWO, with p values of less than 1% and 5%, respectively. On the other hand, under p-WOA, a 1% increase in transmission range caused a significant drop of 0.039. According to the adjusted R2 value for the specified transmission range, the independent variables (No. of clusters ALO, No. of clusters p-WOA, and No. of clusters GWO) adequately explain the variation. Their variations were 67.97%, 75.22%, and 66.94%, respectively, with ANOVA values of F (1 9) = 20.73 ***, 25.55 ***, and 22.81 ***, respectively.

Discussion
Keeping the number of nodes at 100 and the transmission range at 100-600 m, the findings in Figure 4 demonstrate that p-WOA generated 45 clusters for a grid size of 1 km × 1 km and 53 clusters for a grid size of 4 km × 4 km. According to the comprehensive evaluation, the created method outperformed the state-of-the-art alternatives. It also demonstrates that an increase in grid size results in a corresponding rise in clusters. There was a correlation between transmission range and cluster output in p-WOA, with more optimal clusters being generated as the range expanded. Figures 5 and 6 show the results of the experiments in which the grid size was varied while the number of nodes was held constant at 30 and 40. Moreover, PDR, latency, and throughput were calculated and compared with other bio-inspired methods (ALO and GWO), exhibiting the superiority of the developed method. It was observed that by incorporating probability-based functions into the whale optimization algorithm, the randomness of vehicles at the time of initialization was significantly improved, and the convergence factor was increased.
The load balance factor was used to verify the results by comparing them to those obtained using a standard procedure. As shown in Figures 10 and 11, p-WOA achieved superior results when compared to other benchmark algorithms by distributing the burden of overall cluster leaders. The LBF was utilized to evaluate the proposed method with other methods in terms of the ability of vehicles to stay in a cluster for a maximum length of time. Moreover, the LBF assures that each cluster has been assigned an equal number of nodes.
The typical range for the number of nodes in a published work is between twenty and one hundred and twenty [37,38]. In this analysis, we only evaluated clusters with up to 100 nodes because increasing the number of nodes affects the longevity of the cluster and the network, and thus, it raises the cost of the network. Because the nature-inspired algorithms were random, overlaps occurred during the experiments [39][40][41][42][43][44]. In the current study, we integrated self-adaptive weights via fitness function optimization to overcome this issue using a probabilistic intelligence technique. The developed technology has a wide range of possible uses, including enhancing the accuracy of maps generated using the global positioning system and employing media services to distribute news and other information via the internet.

Conclusions
This research, inspired by whale behavior, devised and implemented a probabilistic method for clustering nodes. The developed method commissioned p-WOA in order to determine the optimal number of VANETs clusters; hence, it reduced the overall amount of unpredictability in the network. The developed method was compared to two gold standard methods, ALO and GWO. When considering cluster heads, the suggested optimization approach outperformed the GWO and ALO regardless of variations in communication distance, network approximation, or the number of cars. Increasing the duration of clusters and optimizing them to be as close to optimal as possible reduced the system's communication overhead. Reduced needs for infrastructure components in transportation networks are another benefit of these optimized clusters.
This study could be improved in the future by increasing the number of nodes to 200 and by deploying different network performance parameters, such as bandwidth efficiency, transmission error and packet loss, etc.-Cluster optimization research employing the Harris Hawks Optimization approach is currently underway.