3.1. Design of QMFO-Based Clustering Process
In this study, the BQMFO-CSSTS technique initially uses the QMFO model and a fitness function for the selection of CHs and cluster construction processes. The MFO can be referred to as a bionics system, as it inspired by the social behaviours of the Mayfly (MF) [
26]. The optimum and suboptimum individuals in all the populations, as well as the movement mode and reproduction processes of female and male individuals, are carefully chosen. In the meantime, via mating between the optimum female and male individuals, the optimum offspring generation and suboptimum offspring generation can be attained. The movement direction of all mayflies was impacted by the collective optimum position and dynamics of individual female and male MF targets when moving towards the location.
The flight mode of male MF is the same as the movement mode of the birds in a Particle Swarm Optimization (PSO) algorithm, and the distances and directions travelled by male MFs were changed based on their own flight experience using Equation (1):
where
and
denotes the present location and speed, respectively, of male MF
on the
search, as given in Equation (2):
Since male MFs dance on the water surface to attract females, the locations of the male MFs continuously vary. is the speed of n-th search of MF i-th at j-th dimension, and denotes the location at that time. and are assessed based on the positive attraction coefficient of social interaction, and denotes the visibility coefficients of the MF.
In the meantime, the optimum locations of the individual and collective MFs are denoted as
and
respectively. Furthermore, the distances from an existing location to
and
are represented as
and
, respectively, and evaluated via Equation (3):
A fixed dance pattern should be used to better represents MFs within the population. In the meantime, a random component was presented to ensure that the speed changed continuously, as defined in Equation (4):
In Equation (4), denotes the dance coefficient, and indicates the random number.
The female MF movement relies on the attraction of male MFs, and the location renewal relies on the rise of speed that is formulated via Equation (5):
Speed updating is a specific procedure that guarantees the offspring quality; thus, the superior female should be attracted to the superior male. It is represented in Equation (6):
where
denotes the location of the female MF,
indicates the random walking coefficient of the female MF, and
shows the distance between male and female MFs.
During mating, the optimum and suboptimum individuals in the female and male groups must be chosen for reproduction based on the fitness function. The outcomes of interbreeding that generate the optimum and suboptimum offspring are evaluated using Equation (7):
In Equation (7), and represent the male and female in the parent group, respectively, and denotes the random integer within a specific range.
The conventional MFO algorithm could precisely search for the optimum value in a single-peak function using the features used in MF reproduction. However, due to the complicated process of assessing a large population, the convergence is not fine, and the search speed is slower, as it is easier to become trapped in local optima while handling multi-peak functions. Thus, the quantum concept was proposed using the classical MFO algorithm, thus forming the QMFO algorithm. Meanwhile, the location and velocity of MF could not be defined in quantum space; thus, wave function was utilized to characterize the MF location, and the Monte Carlo algorithm was employed to resolve the problems using Equation (8).
In Equation (8), and are uniformly distributed random values in the range 0–1, and shows the last random motion parameter. and denote the numbers of individuals and iterations, respectively. denotes the average past optimum location of the male MF, and denotes the modified location of the male MF at n-th iterations.
The implementation steps of the QMFO algorithm are shown below:
Step 1: initialize the position of female and male MFs in the space.
Step 2: compute the average optimum position of male MFs based on Equation (8).
Step 3: Compute the fitness value and compare it to the prior iteration value. When the present function value is lesser than the prior iteration, the existing MF location is modified based on the individual optimum location; otherwise, it retains the prior iteration. Thus, the optimum male individual position and collective position are attained.
Step 4: estimate the new locations of both MFs based on Equations (5) and (8), respectively, and mate in sequence.
Step 5: evaluate the fitness function and update and .
Step 6: repeat Steps 2 to 5 until the stopping criteria are satisfied.
The QMFO algorithm derives a fitness function for the optimum cluster creation procedure [
27]. The fitness function used in the BQMFO-CSSTS is introduced as a multi-objective fitness function, as given in Equation (9).
In Equation (9),
and
functions characterize the sum of distances between all of the CMs and CHs of each cluster in the network and the differences between clusters in terms of route length. Based on Equation (10), the function
is computed.
where
shows the Euclidean distance evaluated for the total number of clusters. The distances between every
vehicular network and the CHs
are related to all of the clusters based on the overall number of clusters. At the same time, function
represents the absolute degree, as equated in Equation (11).
where
signifies the overall number of CM nodes based on route length, with the degree
emphasizing the constant value of cluster density. We note that lesser density can be recognized as the lowest value.