# An Efficient and Fast Hybrid GWO-JAYA Algorithm for Design Optimization
## 2 The FHGWJA Algorithm
If \(W((\vec{X_{i,tr}})^{\prime})<1.1W(\vec{X_{best}})\) and \(W((\vec{X_{i,tr}})^{\prime})<W(\vec{X_{i,tr}})\), \((\vec{X_{i,tr}})^{\prime}_{i}\) is finally retained in the new population, and \(\vec{X_{i,tr}}\) is rejected. If \(W((\vec{X_{i,tr}})^{\prime})<1.1W(\vec{X_{best}})\) but it occurs that \(W((\vec{X_{i,tr}})^{\prime})>W(\vec{X_{i,tr}})\), \((\vec{X_{i,tr}})^{\prime}\) is rejected, and \(\vec{X_{i,tr}}\) is finally retained in the new population. If \(W((\vec{X_{i,tr}})^{\prime})>1.1W(\vec{X_{best}})\), \(\vec{X_{i,tr}}\) is finally retained in the new population, and \((\vec{X_{i,tr}})^{\prime}\) is directly rejected. FHGWJA adopts a repair strategy if the new trial solution \(\vec{X_{i,tr}}\) is such that \(W(\vec{X_{i,tr}})>1.1W(\vec{X_{best}})\). In this case, the trial solution \(\vec{X_{i,tr}}\) was sufficiently good to avoid immediate rejection (i.e., it holds \(W(\vec{X_{i,tr}})<W_{p}(\vec{X_{best}})\)) but it is not good enough to be provisionally included in the new population. Another JAYA-based scheme is adopted in FHGWJA to define the new trial solution \((\vec{X_{i,tr}})^{\prime}\) as follows:  
\[(\vec{X_{i,tr}})^{\prime}=\vec{X_{i}}+\vec{\lambda_{1}}\cdot(\vec{X_{best}}- \vec{X_{i}})-\vec{\lambda_{2}}\cdot(\vec{X_{worst}}-\vec{X_{i}}) \tag{14}\]  
where \(\vec{\lambda_{1}}\) and \(\vec{\lambda_{2}}\) are two vectors of \(NDV\) random numbers similar to those of Equation (13). Absolute values of optimization variables are taken for each component of vectors \(\vec{X_{i}}\) or \(\vec{X_{i,tr}}\), respectively, in Equations (13) and (14). Equation (14) is related to exploration and resembles the classical JAYA solution updating equation where each individual is perturbed trying to approach the current best solution \(\vec{X_{best}}\) and moving away from the worst solution of the population \(\vec{X_{worst}}\). FHGWJA involves the whole population of \(N_{\text{POP}}\) search agents in the generation of new trial design \((\vec{X_{i,tr}})^{\prime}\) because wolves \(\alpha\), \(\beta\), and \(\delta\) that drive search in the GWO phase failed to move other individuals (i.e., \(\vec{X_{i}}\)) to good positions of the search space located near the prey (i.e., the current best record). Since population renewal aims to improve each individual \(\vec{X_{i}}\), FHGWJA searches on the descent direction \((\vec{X_{best}}-\vec{X_{i}})\) that leads to a better design than \(\overset{\rightarrow}{X_{i}}\) and escape from the worst design of the population \(X_{worst}^{\rightarrow}\), which certainly cannot improve \(\overset{\rightarrow}{X_{i}}\). Similar to the process implemented for Equation (13), FHGWJA compares the cost function value \(W((X_{i,tr}^{\rightarrow})^{\prime})\) corresponding to the new trial design \((X_{i,tr}^{\rightarrow})^{\prime}\) defined with Equation (14) with \(1.1\) times the cost function value of the current best record \(W(X_{best}^{\rightarrow})\). The modified trial design \((X_{i,tr}^{\rightarrow})^{\prime}\) is included in the new population if it holds that \(W((X_{i,tr}^{\rightarrow})^{\prime})\leq 1.1W(X_{best}^{\rightarrow})\). However, if the JAYA-based repair strategy fails and it still holds that \(W((X_{i,tr}^{\rightarrow})^{\prime})>1.1W(X_{best}^{\rightarrow})\), FHGWJA has to deal with three solutions, \(\overset{\rightarrow}{X_{i}}\), \(\overset{\rightarrow}{X_{i,tr}}\), and \((X_{i,tr}^{\rightarrow})^{\prime}\), that do not improve the current best record \(X_{best}^{\rightarrow}\).