## 3 The Proposed Model
### Process Involved in SA-GSO-Based Multihop Routing  
The SA-GSO technique can be used efficiently during the routing phase to determine the ideal paths to the destination. GSO [23] is an intelligently tuned technique that relies on the glow-worm light being used as a signal to attract another glow-worm. This strategy utilizes a randomly distributed group of glow-worms from the solution space. Each glow-worm is a viable solution denoted by their location. The glow-worm with the highest luminosity attracts the glow-worm with the lowest luminosity. This way, the technique's global optimization is accomplished. The following are the fundamental phases:  
Step 1. Initialization the fundamental parameter of GSO. This parameter contains the population size \(g\), fluorescein volatilization factor \(\rho\), fluorescein upgrade rate \(\gamma\), upgrade rate \(\beta\) of the dynamic decision field, the group of glowworms \(N_{i}\) (\(t\)) from the decision field, threshold \(n_{t}\) for the number of glow-worms from the neighborhood, perception radius \(r_{s}\), and move step \(s\). Step 2. The fitness value of glow-worm \(i\) at \(t\)th iteration was changed as to the fluorescein value with the subsequent equation:  
\[l_{i}(t)=(1-\rho)l_{i}(t-1)+\gamma J(X(t)) \tag{20}\]  
where \(\rho\) refers to the fluorescein decompose constants going from zero and one, and \(\gamma\) demonstrates the fluorescein improvement constant. Step 3. All the glow-worms choose individuals with superior brightness than themselves in their dynamic decision radius \(r_{d}^{i}(t)\) for the procedure of their neighbor set \(N_{i}(t)\). Step 4. Compute the probability \(p_{ij}(t)\) of glow-worm \(X_{i}(t)\) affecting the glow-worm \(X_{j}(t)\) from their dynamic decision radius by Equation (21):  
\[p_{ij}(t)=\frac{l_{j}(t)-l_{i}(t)}{\sum_{k\in N_{i}(t)}l_{k}(t)-l_{i}(t)} \tag{21}\]  
Step 5. Upgrade the place of glow-worm \(X(t)\) in Equation (22):  
\[X_{i}(t+1)=X_{i}(t)+s\times\left[\frac{X_{j}(t)-X_{i}(t)}{||X_{j}(t)-X_{i}(t) ||}\right] \tag{22}\]  
Step 6. Upgrade the dynamic decision radius of glow-worm \(X(t)\) in Equation (23):  
\[r_{d}^{i}(t+1)=\text{ min }\{r_{s},\text{ max }\{0,\beta\times(n_{t}-|N_{i}(t)|)\}\} \tag{23}\]  
Generally, in the GSO algorithm, predefined values are allotted to the step size as a fixed value. Since the proper choice of step size is important for effective outcome, in this study, two factors influencing the step size are considered, namely the number of rounds and distance between the glow-worm and optimal glow-worm at the \(ni^{th}\) round. If the \(i^{th}\) glow-worms are located farther from optimum solutions, the step size becomes high, otherwise, it becomes small. At the \(ni^{th}\) round, when the \(i^{th}\) glow-worm indicates the optimal one, its step size results in 0. After examining the impact of moving step size on the GSO algorithm [56; 57], the SA-GSO algorithm (Algorithm 1) is derived by the use of self-adaptive step size formulation, as given below:  
\[s_{i}(t)=D_{i}(t)\cdot\left(len\left(e-\frac{t}{N_{t}}\right)\right)\|x_{i}(t )-x_{b}(t)\| \tag{24}\]  
where each \(x_{i}(t)\) is assigned to exactly one \(s_{i}(t)\), even if it could be assigned to two or more of them, where \(D_{i}(t)\) implies an arbitrary number in uniform distribution, \(N_{t}\) denotes maximum iterations, and \(x_{b}(t)\) indicates the location of the optimal glow-worm at the \(t^{th}\) round. The SA-GSO algorithm is derived by considering parameters like trust, energy, delay, and distance in order to determine the optimal route for data transfer between sender and destination via CHs in UWSN as discussed in Algorithm 1. Because the fitness with the highest value is considered the optimal path, the maximal fitness can be computed using the largest trust value, the shortest latency, the highest energy, and the shortest distance.