# An Efficient and Fast Hybrid GWO-JAYA Algorithm for Design Optimization
## 2 The FHGWJA Algorithm
Interestingly, since \(((\overset{\rightarrow}{X_{\delta}})^{mirr}-\overset{\rightarrow}{X_{opt}})\) is in principle a steeper descent direction than \(((\overset{\rightarrow}{X_{\delta}})^{mirr}-\overset{\rightarrow}{X_{opt}})\) as \(W_{p}(\overset{\rightarrow}{X_{\delta}})>W_{p}(\overset{\rightarrow}{X_{ \delta}})>W_{p}(\overset{\rightarrow}{X_{best}})\), wolf \(\delta\) may have a higher probability than wolf \(\beta\) to replace wolf \(\alpha\) even though it originally occupied a worse position than wolf \(\beta\) in the search space. This elitist approach forces FHGWJA to carry out a new exploration of the search space rather than trying to exploit solutions that have not improved the design in the last iteration. Furthermore, by eliminating the two worst designs of the population, FHGWJA increases the average quality of candidate solutions and achieves a higher probability of generating high-quality trial solutions in the next iteration. Step 6. Check for convergence  
Standard deviations on optimization variables and penalty function values of candidate solutions included in the updated population should decrease as the optimization search approaches the global optimum. Hence, FHGWJA normalizes standard deviations with respect to average design \(X_{\text{aver}}^{\rightarrow}=\left(\sum_{i=1}^{N_{\text{POP}}}\overrightarrow{X_{ i}}\right)/N_{\text{POP}}\) and average value of penalty function \(W_{\text{p,aver}}=\left(\sum_{i=1}^{N_{\text{POP}}}W_{p}\left(\overrightarrow{X _{i}}\right)\right)/N_{\text{POP}}\). The termination criterion is as follows:  
\[Max\left\{ \begin{array}{l}\frac{STD\left\{\left\|\overrightarrow{X_{i}}-X_{ \text{aver}}^{\rightarrow}\right\|\right\|}\overrightarrow{X_{2}}-X_{\text{ aver}}^{\rightarrow}\right\|}{\left\|X_{\text{aver}}^{\rightarrow}\right\|},\\ \frac{STD\left\{W_{\text{p,1}},W_{\text{p,2}},...,W_{\text{p,N}DP}\right\}}{W _{\text{p,avar}}},\end{array} \right\}\leq\varepsilon_{conv} \tag{17}\]  
where the convergence limit \(\varepsilon_{\text{conv}}\) is equal to \(10^{-7}\). Since convergence occurs in the last stage of the optimization process when exploitation dominates, Equation (17) requires all search agents be actually located in the best region of the search space hosting the global optimum and contributing to exploitation. Population diversity must decrease to aggregate search agents in the neighborhood of \(X_{best}^{\rightarrow}\). Hence, Equation (17) normalizes the standard deviation of the search agents' positions to average the solution to quantify the level of population diversity. The same rationale is adopted for the penalty function values by normalizing their standard deviation with respect to the average penalty function value: hence, competitive solutions correspond to the optimum solution only when they are effectively close to it, that is when the search process is near to end. Penalty function values are considered in Equation (17) to account for the effect of some solution that may turn locally infeasible if the set of active constraints changes as design is perturbed in the neighborhood of the global optimum. Penalty function values are equal to cost function values for feasible solutions or in the case of unconstrained optimization problems. Steps 2 through 6 are repeated until FHGWJA converges to the global optimum. Step 7. Terminate optimization process  
FHGWJA terminates the optimization process and writes the output data (i.e., optimum design and optimized cost function value) in the results file. Figure 3 shows the flow chart of the novel FHGWJA algorithm developed in this study. The present algorithm actually is an advanced grey wolf optimizer, which updates population taking care that the \(\alpha\), \(\beta\), and \(\delta\) wolves effectively lead to improve the current best record in each iteration. The JAYA schemes and the elitist strategies implemented in FHGWJA enhance exploration and exploitation forcing the present algorithm to increase diversity and select high-quality trial designs without performing too many function evaluations.