An Intelligent Optimized Route-Discovery Model for IoT-Based VANETs

: Intelligent Transportation system are becoming an interesting research area, after Internet of Things (IoT)-based sensors have been effectively incorporated in vehicular ad hoc networks (VANETs). The optimal route discovery in a VANET plays a vital role in establishing reliable communication in uplink and downlink direction. Thus, efﬁcient optimal path discovery without a loop-free route makes network communication more efﬁcient. Therefore, this challenge is addressed by nature-inspired optimization algorithms because of their simplicity and ﬂexibility for solving different kinds of optimization problems. NIOAs are copied from natural phenomena and fall under the category of metaheuristic search algorithms. Optimization problems in route discovery are intriguing because the primary objective is to ﬁnd an optimal arrangement, ordering, or selection process. Therefore, many researchers have proposed different kinds of optimization algorithm to maintain the balance between intensiﬁcation and diversiﬁcation. To tackle this problem, we proposed a novel Java macaque algorithm based on the genetic and social behavior of Java macaque monkeys. The behavior model mimicked from the Java macaque monkey maintains well-balanced exploration and exploitation in the search process. The experimentation outcome depicts the efﬁciency of the proposed Java macaque algorithm compared to existing algorithms such as discrete cuckoo search optimization (DCSO) algorithm, grey wolf optimizer (GWO),


Introduction
Intelligent transportation is the process of finding the optimal communication path for vehicle-to-vehicle (V2V) communication and vehicle-to-infrastructure (V2I) communication in IoT-based vehicular ad hoc networks (VANETs). The vehicle is considered to be the primary source of transmission, and the signal will be received by other vehicles within a specific radius (100-200 m) [1,2]. IoT-based senor components are typically used for information transfer between V2V communication and V2I communication. Furthermore, • We introduced a novel optimization algorithm based on the behavior of Java macaque monkeys for balancing a search operation. The balance is achieved by modeling the natural behavior of Java macaques in terms of multi-group behavior, multiple search agents, social hierarchy-based selection strategy, mating, male replacement, and learning process. • A multi-group population with multiple search agents of male and female monkeys helps with the exploration of different search spaces and in maintaining diversity. • This algorithm uses the dominance hierarchy-based mating process for exploring complex search spaces. • To address communication issues in a multi-group population, Java monkeys have a unique behavior called male replacement. • The exploitation phase of the proposed algorithm is achieved by the learning process. • This algorithm uses the multileader approach for male and female search agents such as alpha male and female in each group, and maintains the global best male and female agents. Thus, the multileader approach assists in the smooth transition from exploration phase to exploitation phase [12]. Furthermore, the social hierarchicalbased selection strategy improves the maintenance of both converged and diverse monkeys in each group, as well as in the population.
Further in this paper, Section 4 provides a brief behavior analysis of the Java macaque monkey. Section 5 formulates the algorithmic modeling of the Java macaque based on behavior analysis. exploration and exploitation in the search process, which helps with the discovery of a loop-free optimal path.

Preliminaries and Background
A new route discovery for uplink and downlink direction has been determined using the Java macaque algorithm. Furthermore, the routing protocol incorporates three important mechanisms-the initialization phase, new route discovery, and the route maintenance phase.

Initialization Phase
The initialization phase provides proper guidelines for vehicle registration in the IOT-based VANET infrastructure. Initially, the address of the infrastructure is not known to the new vehicle in the network, and it sends a broadcast message to connect with the infrastructure. In this network, let us assume that vehicles moving at an average speed of 20 km/h are only permitted to establish a communication with the infrastructure, which enhances network stability in VANET. The request-to-connect message is repeatedly broadcast by all the vehicles until it receives an acknowledgement message from the infrastructure. Thus, vehicle registration has been sequentially completed and updated in the routing table by the infrastructure services. As per [1,24], the request message consists of GPS location, speed, RSS (received signal strength), and appended GPS location. The initialization phase is clearly demonstrated in Figure 1. The initialization phase helps the infrastructure to locate the vehicle precisely in the VANET. However, vehicles in IoT-based environments dynamically modify their positions. Furthermore, the addition of new vehicles and the deletion of existing vehicles requires the updating of the routing table, and this initialization process establishes proper communication between the infrastructure which in due course enhances network stability for communication.

Route-Discovery Phase
After completion of the route initialization process, the infrastructure uses the downlink communication to update the position of each vehicle. Furthermore, this downlink communication helps to maintain a loop-free optimal path for all vehicles. To achieve this efficient downlink communication between infrastructure and vehicle, the proposed Java macaque algorithm is efficiently used to find an optimal path. The optimal single route using Hamiltonian distance (I-G-F-D-B-A-C-E) helps to reduce the flooding message in VANET, and this is clearly shown in Figure 2. Thus, the single-route techniques enhance network stability and reduce the flooding message in VANET.

Route Maintenance Phase
In the dynamic changing network topology, the infrastructure continuously updates the routing table due to the addition and remove of vehicles. This activity involves an initialization and route-discovery process due to the addition of new vehicles. Furthermore, it monitors the current position of existing vehicles by sending messages; if the infrastructure does not receive the acknowledgement message from a particular vehicle, then that vehicle is discarded from the routing table, and a route-discovery process is initiated to ensure a single-route loop-free optimal path.

Algorithm Modeling for VANET
Behavioral analysis of the Java macaque monkey has been briefly described by Dinesh Karunanidy et al. in [29]. The significance of the Java macaque algorithm using the multipopulation characteristic explores the search space in an efficient way, and that suits the solution of the routing problem in IoT-based VANET. However, it is a challenging task to solve NP-hard problems where the complexity of solving these problems exponentially increases in a dense network. However, the communication process is effectively addressed via male replacement and the optimal route is maintained using the learning process. Meanwhile, the dominance hierarchy-based selection process for mating helps to identify stable vehicles in the dynamic network (see Algorithms 1-7).

Population Initialization
The Java macaque algorithm is typically a population-based search technique that initially starts with population initialization. The initial population is generated using the random population seeding technique. Furthermore, individuals are generated with mapping (map : G → X) between the dimensional vector of the search space G to the dimensional vector in the problem space X. In the discrete optimization problem, the total number of vehicles (V) is represented in the problem space and must be mapped to individuals.
where Ψ is an individual, represented as a tuple (Ψ.v, Ψ.x) of a dimensional vector Ψ.v in the search space G and the corresponding dimensional vector Ψ.x = Ψ.v in the problem space X. The initialization process starts with the minimum number of individuals in a group regarding the problem size. Then, the above process is repeated until g groups are created. Therefore, the total population at the initial stage is less than N individuals, and the actual number of individuals in each group is derived in Act size .

Algorithm 1 Initialization.
Input:N number of individuals, g number of groups Output:{G i }, POP BEGIN:

Categorization of the Individuals
The individuals in each group are evaluated using the fitness function, where the individual must visit all cities with minimum distance. The route can be formulated as a graph G = (V, E), where E is the set of edges and V = 1, 2, ..., NOV is the set of vehicles, and the route should be loop-free at minimum distance. The reliability of the individual calculated from the equation as stated in [1,24] is as follows: is the fitness value of individual with respect to total number of vehicles NOV in VANET. Furthermore, the distance between the two vehicle points is calculated using Euclidean distance.
Therefore, the individual with least distance is recognized as the best individual. AM i and AF i indicates the best individual from the male and female set in group i. Thus, AM i and AF i represents the local best individual in each group. Furthermore, the global best alpha male GB AM and female GB AF are selected from the set {AM} and {AF} in the population. Then, individuals are further subdivided into dominant{DS} and non-dominant{NDS} sets. Therefore, this determines the local best and global best individuals in the population.

Mating Process
Mating has become the most active part of the Java macaque algorithm. It performs an explorative search process of the problem space. A good search process has several advantages for the Java macaque algorithm, such as exploration and diversity maintenance.

END:
A special mating process has been used for handling a large search space. Parents Ψ m , Ψ f are selected either from the dominant or non-dominant set, and perform the mating operation. New offspring Ψ o f f generated from the mating process represent the natal code of the parents. To maintain crowding distance, the number of offspring generated by dominant parents are decided by P(A), where A lies in the range 0.4 to 0.6, whereas the offspring generated by non-dominant parents is between A = [0.2, 0.4]. Finally, new individuals for the population are generated with crowding distance.

Male Replacement
The main idea of the male replacement process is the performance of an adaptive search process. First, the offspring Ψ o f f , which attains sexual maturity (i.e., attain fitness value above α * F(Ψ AM ), becomes a stray male and similarly the offspring above β * F(Ψ AF becomes a member of female set. Secondly, the stray male Ψ sm performs an adaptive search to replace the dominant male Ψ m from the other group.
This replacement increases the robustness of the algorithm for solving the large problem. In contrast, if the stray male fails to replace the appropriate dominant male, then he becomes a member of {ES}.

Learning
The learning process is a mechanism that adapts the learning model for the enhancement of individual fitness. However, it increases individual fitness by exploiting the search space regarding problem space. The individual Ψ in the POP should improve its fitness value F(Ψ) via learning and increase the probability of attaining a global optimum. Then, learning for discrete optimization is defined as: where POP represents the set of individuals, G is the feasible search space of the solution, F(Ψ) is the fitness function, and δ is the learning rate of the individual between (0 ≤ δ ≤ 1).
where two values are randomly generated for i and j.
The learning rate δ differs regarding the problem domain. A new learning paradigm for solving the discrete optimization problem improves the individual using four different learning techniques-L 1 , L 2 , L 3 , and L 4 . The learning model depends on two variables [i, j] which are also based on the learning rate δ. Then each individual undergoes different learning models and the best suitable model with the highest fitness value is selected for the current individual. Step 4: [Mating] Select the parent using Algorithm 3 and generate the new offspring for each group using uniform crossover.
Step 5: [Evaluation of Offspring] Evaluate the fitness value of offspring and obtain the stray male and female using Algorithm 4.
Step 6: [Male Replacement] The stray male replaces the dominant male in alternate group using Algorithm 5.
Step 7: [Learning] Improves the fitness of the individual using Algorithm 6.
Step 8: [Termination] Repeat the above process from Step 2 until termination criteria is reached.

Proposed Algorithm for Intelligent Route Discovery in IoT-Based VANET
The initial phase of the Java macaque algorithm is random population initialization with N individuals in g groups. The individuals are mapped regarding the search space of the problem. Then, the individuals are evaluated regarding the convergence of the optimization problem. Consequently, the local best individuals, known as 'Al-phaMale' and 'AlphaFemale' are selected from the group. Furthermore, 'GB-Alphamale' and 'GB-AlphaFemale' global best individuals are selected from the set of alphamale and alphafemale.
All the individuals in the group are further divided into dominant and non-dominant individuals based on fitness value. Then, the new offspring are generated during the mating process, where the selection of the mating individual is based on the dominance hierarchy. Then, the female offspring reaches sexual maturity and becomes the female individual in the natal group. However, the male offspring who attain sexual maturity are forced to leave the natal group, and are known as 'Stray Male'. Therefore, the stray male must find an alternative group by replacing the dominant male, which is known as 'Male Replacement'. Finally, the learning process is an important feature of the Java macaque algorithm, where individuals improve its fitness. Thus, the Java macaque algorithm is an optimization algorithm for a given problem (X, F, G, O, map). The individual Ψ * is the one with dominant fitness F(Ψ * ) using the search operation O of the JMA from the search space G regarding the problem space X (see Figure 3).

Experimentation and Result Analysis
In this section, we present our works in two different subsections. Initially, we present our results regarding the parameter tuning of our proposed JMA algorithm. In the second subsection, we analyze the proposed algorithm with varying deployed vehicle densities, such as 10, 30, and 50 vehicle-density test cases. The obtained outcomes are evaluated using 1000 various Monto Carlo trails to ensure the efficacy of the algorithm. With the aid of 1000 Monto Carlo trails, average outcomes are measured and noted as mean results, whereas the worst and best results are taken out from one of the 1000 trails. In this work, the free space model is studied to simulate the obtained SNR ψ in dB towards each incoming vehicle j. For ease of simplicity, the free space model is formulated as follows: where κ i T is transmission energy of an individual i th communicating vehicle, ω is the processing frequency of the VANET, γ j is specified as noise power at each i th communicating vehicle determined using the mathematical model namely Gaussian noise γ n ∼ ℵ(0, σ 2 ρ ), σ 2 ρ = 1 is noise adjustment, and d (i,j) is the Euclidean distance between i,n paired transmitting vehicles mathematically represented as where (x i , y i ) and (x j , y j ) are coordinates of vehicles scattered in the deployment area R. The experimentation of the proposed model is carried out in MATLAB R2019a. The parameter setting of VANET is shown in Table 1.

Dataset Creation
Vehicles are randomly scattered among deployment area A. The distance (D) between each vehicle is taken as 1 km within the area. Thus, the coordinates (x, y) of each vehicle v is noted as where ϕ and ∆ are arbitrary values created within the range 0 to 1 using uniform distribution function Z(0, 1). We used Equation (7) to determine the vehicle positions N v for three different scenarios, namely low, medium, and high vehicle density; all vehicles in all three scenarios are deployed within specified area A.

Results Based on Parameter Tuning
The performance of our JMA algorithm is measured by three significant parameters, namely the probability of mating replacement M R , the population POP, and the estimated number of fitness function epochs. Generally, the number of fitness evaluations is measured classically, and controls the number of generations, as well as the computation time of the technique. The performance of route reliability is measured regarding increasing fitness evaluations. The results are obtained based on the medium number of vehicle density, and the vehicle speed is fixed as 20 km/h.

Route Reliability Results Based on the Probability of Mating Rate M R Parameter
The results of significant route reliability scores aid delivery of efficacy of the proposed system by varying the probability of mating rate M R values, as shown in the figure insert. The obtained results are measured in three categories, namely best, mean, and worst based on 1000 Monte Carlo trails. Figure 4 insert presents the mean values of the route reliability scores for varying M R values. The y-axis denotes the route reliability values based on the x-axis number of fitness evaluations. We categorized the number of fitness evaluations into three sections, namely fast-run (within range of 1-10,000 fitness evaluations), mean run range (within the range of 10,000-20,000 fitness evaluations), and long-run range (within the range of 20,000-30,000 fitness evaluations). In Figure 4, it can be seen that using higher M R values (i.e., M R ≥ 0.5) converges the proposed JMA algorithm towards the best routing path compared with minimum M R values. However, in the mid-run range category it can be seen that M R = 0.2 outperforms the larger values when finding route reliability. On the other hand, the aid of smaller M R values in the long-run range outperforms than the larger values when determining the best routes. The results specify that the use of small M R values achieves better exploration in the JMA, whereas it avoids local optima and premature convergence problems. The outcome of the result concludes that the use of probability M R = 0.2 obtains satisfactory results compared with M R values. The best and worst route stability scores obtained over varying M R values are satisfactory in JMA. We noticed that again the M R = 0.2 value drastically provides the best route compared with M R values. Figure 4 shows that the best mean route is achieved late in the fast run and stays the same in the long-run range. Interestingly, Figure 4 shows that using M R = 0.2 achieves a better reliability score compared to the other M R values. The overall result shows that the use of M R = 0.2 outperforms the other values.

Route Reliability Results Based on Population Size POP Parameter
In this section, we analyzed the efficacy of the proposed JMA algorithm with varying population sizes POP; the results of route reliability are shown in Figure 5. Based on the above observations, we fixed M R = 0.2 to observe the efficacy of the JMA algorithm in varying population sizes. The population size POP = 50 achieves better scores in the fast-run range and stays the same until the long-run range. In realistic scenarios, due to high computational complexity and high demand on memory resources, it is difficult to prolong the long-run range, therefore obtaining the best result within fast-run and mid-run range ensures the efficacy of the algorithm. On the other hand, using a higher population size in metaheuristic algorithms does not achieve better accuracy. It can be easily observed in different batch computations Θ over the computational process is achieved as Θ = POP λ /POP, where POP λ is the total number of fitness computations. Therefore, it is clearly noticed that using higher POP value will minimize the total number of batch evaluations, thus result in a faster computation time that yields reduced route reliability scores. Based on this observation, we noticed that POP = 50 achieves more accurate results than different POP values. Figure 5 displays the best mean route reliability score using POP = 50 in the midrange run, whereas a different POP value achieves the best score in the large-run range. In addition to that, Figure 5 shows the best mean route for POP = 50 population size over the set of worst routes. This route was determined in the fast-and mid-run ranges.

Mean Route Reliability Results Based on the Different Velocity Values
In this study, we measured the best route discovery based on varying vehicle speeds to ensure the performance of the JMA algorithm in various scenarios. Based on experimentation, we noticed that higher velocity rates achieve low-quality routes compared with the reduced velocity rates. In addition, we observed that velocity at 20 km/h for vehicles discovers the best route. This study clearly shows that topology becomes stable at lower velocity rates. In the next subsection, results are observed based on average mobility of 20 km/h. It is noticed that the reliability score will not be stable when there are fluctuations in velocity above 20 km/h. With this outcome, we stabilize vehicles in VANET that are fixed at a speed of 20 km/h, to process the routing of data.

Result Analysis under Various Vehicle-Density Ratios
In this study, we analyzed the route reliability performance using JMA compared to the cuckoo search (CS), genetic algorithm (GA) and particle swarm optimization (PSO) algorithms. The parameter settings of these techniques are shown in Table 2. In this study, we used three different test cases, namely low density (10 vehicles), medium density (30 vehicles), and high density (50 vehicles). In each test case, we provided the route reliability discovery graphs based on number of fitness evaluations. In test case 1, we used low-density vehicles, which are arbitrarily scattered using uniform distribution in deployment area A. The case of V2I transmission was considered, in which a server is considered to be infrastructure, and aims to communicate the information towards all the vehicles in the VANET. However, this could lead to the dissemination of data towards accident scenarios or malicious road information in some realistic scenarios. In our experimentation, we fixed the server at location (0,0) to retain the best route, and to eradicate the use of the same nodes for manifold routes. Figure 6b displays the mean route-discovery performance achieved across 1000 Monte Carlo tracks. It shows that JMA discovers the best route path in whole run ranges. Comparison of the various algorithms shows that JMA finds the best route more reliability in the fast-run range compared with other algorithms, namely GA, Cuckoo, and PSO. The results for best route discovery of JMA is presented in Figure 6a. Here, we can clearly note that JMA finds the best route in the initial fast-run range and sustains the same for the long-run range. The CS algorithm can find the best route only in the mid-run range, and deviates from the best route in a course of iterations. Figure 6 shows the outcome of the worst route reliability for all algorithms. Here, JMA has achieved enhancements of 9.23%, 8.98%, and 7.24% compared with the GA, PSO and CS algorithms, respectively. Thus, the results show that the overall performance of JMA is satisfactory with a low-density vehicle rate.

Test Case 2: Medium Density (30 Vehicles)
In this test case, 30 vehicles are considered, where each vehicle was arbitrarily scattered over deployment area A with a distance of 1 km. Generally, an increase in the number of vehicles increases the complexity of the route establishment process. The server is at the origin (0,0) to broadcast data to all vehicles in the VANET.
The best route results of medium-density vehicles are presented in Figure 7a. Figure 7b presents the mean route reliability scores of all algorithms. Here, JMA achieves best route reliability among all algorithms for most run ranges. The performance of JMA dominates the rest of the algorithm, whereas the rest of the compared algorithms provide poorer performance in most run ranges. Initially, PSO variants obtain the best route-discovery score, but later it fails to sustain the best route discovery over a course of iterations. Figure 7 provides the best route-discovery results of all algorithms, in which JMA achieves the best route in the fast-run range and sustains the same for the rest of the run ranges. Therefore, JMA achieved better route-discovery scores than the PSO, GA and cuckoo algorithms. Thus, the overall results for medium-density vehicles concludes that the overall performance of JMA achieves 13.45%, 10.26% and 9.38% better performance compared to the GA, PSO and CS algorithms, respectively.

Test Case 3: High Density (50 Vehicles)
Fifty vehicles were arbitrarily scattered using uniform distribution among deployment area A within the 1 km square range. The server in VANET is at the origin (0,0) to disseminate data packets to all vehicles. The mean route reliability score is presented in Figure 8b. Here, we observed that JMA achieves the best route reliability in the fast-run range. However, compared algorithm starts to achieve the better routes in the late mid-run range, and fails to sustain the route in the long-run range. Figure 8a shows the best route discovery of JMA. Here, JMA converges slowly in the fast-run range, and later increases the convergence rate, sustains the best route score in late fast-run range, and retains the same until the long-run range. Thus, the overall results of high-density vehicles concludes that JMA achieved 32.65%, 24.56% and 21.43% better performance compared to the GA, PSO and cuckoo search algorithms, respectively. The outcome clearly shows the superiority of the proposed JMA compared GA, PSO, and CS algorithms.

Discussion of Outcomes
The overall experimentation results are discussed as follows: • Based on parameter tuning experimentation, we found that the minimized values for the probability of mating rate M R provides better route discovery. Therefore, we suggest that the use of smaller M R values enhance the diversification of our proposed JMA and therefore eradicates local optima and premature convergence. • Based on population size varying experimentation, we suggest that using population size POP = 50 achieves best route discovery reliability. However, maximizing population size will lead to high computation complexity rather than reduced complexity, as well as lower accuracy. • Based on varying the velocity of vehicles, we suggest that using velocity of 20 km/h and lower will achieve the best reliable route discovery for the efficient transmission of information over the vehicles. • Finally, JMA achieves the satisfactory performance over the all the different density scenarios. Among these three different scenarios, JMA provides the best results in low-and medium-density test cases, and kept the pace in high-density test cases.

Conclusions
In the last decade, various nature-inspired optimization algorithms have been proposed for route discovery in IoT-based VANETs. However, the existing algorithms have become stuck with local optimal solutions due to unsustainable selection strategies, parameter tuning, and exploitation maintenance. Thus, the proposed Java macaque algorithm based on the social behavior of Java macaque monkeys amply shows its efficiency in striking a balance between exploration and exploitation using dominance hierarchy-based selection, male replacement and the learning process which suits the solution of route discovery in dynamic network topology well. In experimentation, the performance of the proposed Java macaque algorithm clearly illustrates its efficiency over the existing algorithm in three different scenarios. Therefore, the natural behavior of Java macaque suits the solution of route problems in real-world IoT-based VANETs well.
For future work, the proposed algorithm should be fine-tuned to solve wide varieties of real-world problems, such as multi-objective engineering, image processing, and cloud computing domains. Furthermore, it could be extended to solve complex problems such as knapsack, scheduling, routing, and feature selection.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: