# Large-Scale Truss-Sizing Optimization with Enhanced Hybrid HS Algorithm
## 3 The LSSO-HHSJA Algorithm
### Step 1: Generation of New Trial Designs
The scalar product of \(\boldsymbol{S_{\rm TR}}\) and the actual descent direction \(\boldsymbol{S_{\rm MIRR}}\) defined by the mirroring is \(-N_{\rm RNDj}\cdot(x_{\rm TRj}-x_{\rm OPTj})^{2}\), hence rather large if \(N_{\rm RNDj}\) tends to unity. If \(N_{\rm RNDj}<HMCR\), regardless of the current value of \(PAR\), we define an interval limited by the two adjacent values \(\hat{x}_{\rm TRj}^{\rm HM,less}\) and \(\hat{x}_{\rm TRj}^{\rm HM,more}\) to the \(x_{\rm OPTj}\) value stored in the current best record \(\boldsymbol{X_{\rm OPT}}\), such that \(\hat{x}_{\rm TRj}^{\rm HM,less}<x_{\rm OPTj}<\hat{x}_{\rm TRj}^{\rm HM,more}\). The jth variable is updated as (j = 1, 2, \(\ldots\), NDV):  
\[x_{\rm TRj}=x_{\rm OPTj}+\left(N_{\rm RNDj}-0.5\right)\cdot\mbox{Max}\left[ \left(x_{\rm OPTj}-x_{\rm TRj}^{\rm HM,less}\right)\ ;\left(\hat{x}_{\rm TRj}^{\rm HM,more}-x_{\rm OPTj}\right)\right] \tag{7}\]  
By considering the difference (\(N_{\rm RNDj}-0.5\)), the value \(x_{\rm OPTj}\) is reduced or increased using Equation (7). However, the latter may not be the best strategy if the sensitivities \(\partial W/\partial x_{\rm j}\) are positive over the whole design space, such as it occurs in the weight minimization problems of truss structures considered in this study. For this reason, if \((x_{\rm TRj}-x_{\rm OPTj})\)\(\cdot\ \partial W/\partial x_{\rm j}<0\), the trial value \(x_{\rm TRj}\) generated with Equation (7) is retained and checked for pitch adjustment later. Otherwise, if \((x_{\rm TRj}-x_{\rm OPTj})\cdot\partial W/\partial x_{\rm j}>0\), the JAYA's characteristic Equation (2) is modified as follows in order to adjust the value of \(x_{\rm TRj}\):  
\[x_{\rm TRj}^{\prime}=x_{\rm OPTj}+\beta_{\rm 1j}\left(\hat{x}_{\rm TRj}^{\rm best }-x_{\rm OPTj}\right)-\beta_{\rm 2j}\left(\hat{x}_{\rm TRj}^{\rm worst}-x_{\rm OPTj}\right) \tag{8}\]  
where: \(\beta_{\rm 1j}\) and \(\beta_{\rm 2j}\) are two random numbers in the interval [0,1]; \(\hat{x}_{\rm TRj}^{\rm worst}=\) Min \(\left[\hat{x}_{\rm TRj}^{\rm HM,more};x_{\rm TRj}\right]\) and \(\hat{x}_{\rm TRj}^{\rm best}=\) Min\(\left[\hat{x}_{\rm TRj}^{\rm HM,less};\left(2\cdot x_{\rm TRj}-x_{\rm OPTj} \right)\right]\). In Equation (8), the absolute value is not necessary for \(x_{\text{OPTJ}}\) as this is a sizing variable. Basically, LSSO-HHSA attempts to escape from the \"bad\" value \(x_{\text{TRj}}\) of the jth design variable (i.e., larger than \(x_{\text{OPTJ}}\)) and to approach the \"good\" value \(x_{\text{TRj}}\) (i.e., smaller than \(x_{\text{OPTJ}}\)), which satisfies the \((x_{\text{TRj}}-x_{\text{OPTJ}})\cdot\partial W/\partial x_{\text{j}}<0\) condition. The \((2\cdot x_{\text{TRj}}-x_{\text{OPTJ}})\) value is obtained by mirroring \(x_{\text{TRj}}\) with respect to \(x_{\text{OPTJ}}\) to transform the nondescent direction \((x_{\text{TRj}}-x_{\text{OPTJ}})\) into the descent direction \(-(x_{\text{TRj}}-x_{\text{OPTJ}})\). Rather than considering the whole population stored in [HM], the JAYA-based strategy implemented by LSSO-HHSA limits the search in the \([x_{\text{TRj}}^{\text{best}};\ x_{\text{TRj}}^{\text{worst}}]\) neighborhood of currently best value \(x_{\text{OPTJ}}\) for the jth variable by exploring the descent directions \((\hat{x}_{\text{TRj}}^{\text{best}}-x_{\text{OPTJ}})\) and \(-(x_{\text{TRj}}^{\text{worst}}-x_{\text{OPTJ}})\). Unlike Ref. [53] where the \(\hat{x}_{\text{TRj}}^{\text{HM,less}}\) and \(\hat{x}_{\text{TRj}}^{\text{HM,more}}\) values defining the search interval for \(N_{\text{RNDj}}<\textit{HMCR}\) were related to a generic value \(\hat{x}_{\text{TRj}}^{\text{HM}}\) extracted from the [HM] memory, which may even be very far from the optimum, LSSO-HHSA always keeps searching for high quality trial designs in the neighborhood of the best design currently stored in the population. This elitist strategy is implemented in Equation (7) and even more in Equation (8), which defines descent directions for the JAYA operator.