# Large-Scale Truss-Sizing Optimization with Enhanced Hybrid HS Algorithm
## 3 The LSSO-HHSJA Algorithm
### Step 2: Evaluation of Trial Design \(\mathbf{X_{TR}}\) and Population Updating  
LSSO-HHJJA evaluates the new trial design \(\mathbf{X_{TR}}\) defined in Step 1 by considering the following four cases: (1) \(\mathbf{X_{TR}}\) feasible & \(W(\mathbf{X_{TR}})\)\(<\)\(W_{\text{OPT}}\); (2) \(\mathbf{X_{TR}}\) feasible but \(W(\mathbf{X_{TR}})\)\(>\)\(W_{\text{OPT}}\); (3) \(\mathbf{X_{TR}}\) infeasible & \(W(\mathbf{X_{TR}})\)\(<\)\(W_{\text{OPT}}\); (4) \(\mathbf{X_{TR}}\) infeasible & \(W(\mathbf{X_{TR}})\)\(>\)\(W_{\text{OPT}}\). This is a far more general approach than classical HS where \(\mathbf{X_{TR}}\) may at most replace only the worst design \(\mathbf{X_{worst}}\) stored in [HM]. 2.1 Case 1: \(\mathbf{X_{TR}}\) Feasible and \(W(\mathbf{X_{TR}})\)\(<\)\(W_{\text{OPT}}\)  
\(\mathbf{X_{worst}}\) is removed from [HM] and the new trial design \(\mathbf{X_{TR}}\) is reset as \(\mathbf{X_{OPT}}\). The former optimum hence becomes the second-best design of the population and is hence reset as \(\mathbf{X_{\text{\bf 2 ndBEST}}}\). The second worst design of the previous population is reset as \(\mathbf{X_{worst}}\) in the updated population. In [53], the remaining (\(N_{\text{\bf POP}}-2\)) designs were updated by randomly combining the directions formed by \(\mathbf{X_{OPT}}\) and the currently selected harmony, \(\mathbf{X_{OPT}}\) and 2 nd best design, \(\mathbf{X_{OPT}}\) and the harmony corresponding to the largest approximate gradient with respect to \(\mathbf{X_{OPT}}\). Since in truss-sizing optimization problems the gradients of the cost function are constant over the whole design space, the above-mentioned process may be significantly simplified and enhanced by implementing a JAYA-based approach. For that purpose, each (\(\mathbf{X_{\text{\bf NPOP}}}-2\))\({}^{\prime}\) harmony is tentatively updated by LSSO-HHJJA using Equation (14), with \(r\in(N_{\text{\bf POP}}-2)\):  
\[(\mathbf{X_{\text{\bf NPOP}}}-2)^{r,new}=(\mathbf{X_{\text{\bf NPOP}}}-2)^{r}+ \boldsymbol{\omega_{1}}\big{(}\mathbf{X_{\text{\bf OPT}}}-(\mathbf{X_{\text{ \bf NPOP}}}-2)^{r}\big{)}-\boldsymbol{\omega_{2}}\big{(}\mathbf{X_{\text{ \bf worst}}}-(\mathbf{X_{\text{\bf NPOP}}}-2)^{r}\big{)} \tag{14}\]  
where \(\boldsymbol{\omega_{1}}\) and \(\boldsymbol{\omega_{2}}\) are two vectors of \(NDV\) random numbers in the interval [0,1]: in particular, \(\omega_{1\text{j}}\) and \(\omega_{2\text{j}}\) are generated for the jth component of the processed harmony, best and worst designs. Since the goal is to improve the (\(\mathbf{X_{\text{\bf NPOP}}}-2\))\({}^{\prime}\) harmony, LSSO-HHJJA tries to search along the descent direction (\(\mathbf{X_{\text{\bf OPT}}}-(\mathbf{X_{\text{\bf NPOP}}}-2)^{r}\)) with respect to \((\mathbf{X_{\text{\bf NPOP}}}-2)^{r}\) and escape from the worst design of the population \(\mathbf{X_{\text{worst}}}\), which certainly will not improve \((\mathbf{X_{\text{NPOP}-2}})^{r}\). If \((\mathbf{X_{\text{NPOP}-2}})^{r,new}\) is feasible and \(W((\mathbf{X_{\text{NPOP}-2}})^{r,new})<W((\mathbf{X_{\text{NPOP}-2}})^{r})\), it replaces the old harmony \((\mathbf{X_{\text{NPOP}-2}})^{r}\) in [HM]. Otherwise, \((\mathbf{X_{\text{NPOP}-2}})^{r}\) is retained. The population is reordered based on the cost of each designs and the next harmony is processed. LSSO-HHSJA finally checks for convergence in Step 3. 2.2 Case 2: \(\mathbf{X_{\text{TR}}}\) Feasible but \(W(\mathbf{X_{\text{TR}}})>W_{\text{OPT}}\)  
The trial design \(\mathbf{X_{\text{TR}}}\) was compared with the rest of the population in [53] by modifying only the \((N_{\text{POP}}-p)\) candidate designs that ranked below \(\mathbf{X_{\text{TR}}}\). Again, the directions formed by \(\mathbf{X_{\text{OPT}}}\) and the currently selected harmony, \(\mathbf{X_{\text{OPT}}}\) and 2 nd best design, \(\mathbf{X_{\text{OPT}}}\) and the harmony corresponding to the largest approximate gradient with respect to \(\mathbf{X_{\text{OPT}}}\) were combined in order to generate each new trial design.