# 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
The LSSO-HHSJA algorithm developed in this study adopts a much more comprehensive approach. First, a mirroring strategy is used for transforming the non-descent direction \((\mathbf{X_{\text{TR}}}-\mathbf{X_{\text{OPT}}})\) into a descent direction. For that purpose, the trial design \(\mathbf{X_{\text{TR}}}^{\text{mirr}}\) is defined as:  
\[\mathbf{X_{\text{TR}}}^{\text{mirr}}=(1+\eta_{\text{mirr}})\mathbf{X_{\text{OPT}}}- \eta_{\text{mirr}}\mathbf{X_{\text{TR}}} \tag{15}\]  
where \(\eta_{\text{MIRR}}\) is a random number in the interval (0,1), which limits step size to reduce the probability of generating an infeasible trial design. If \(W\big{(}\mathbf{X_{\text{TR}}}^{\text{mirr}}\big{)}>W(\mathbf{X_{\text{TR}}})\), \(\mathbf{X_{\text{TR}}}^{\text{mirr}}\) is directly discharged; \(\mathbf{X_{\text{TR}}}\) is hence compared with the designs stored in [HM]. Conversely, if \(\mathbf{X_{\text{TR}}}^{\text{mirr}}\) is feasible and it holds \(W\big{(}\mathbf{X_{\text{TR}}}^{\text{mirr}}\big{)}<W(\mathbf{X_{\text{TR}}})\). (this is likely to occur because the cost function of truss-sizing optimization problems is linear), \(\mathbf{X_{\text{TR}}}^{\text{mirr}}\) is compared with the designs stored in [HM]. Similar to case (1), LSSO-HHSJA utilizes Equation (14) to update the \((N_{\text{POP}}-p)\) harmonics ranking below \(\mathbf{X_{\text{TR}}}\) or \(\mathbf{X_{\text{TR}}}^{\text{mirr}}\). Each new harmony is then evaluated as explained for case (1). Convergence check is done in Step 3. 2.3 Case 3: \(\mathbf{X_{\text{TR}}}\) Infeasible and \(W(\mathbf{X_{\text{TR}}})<W_{\text{OPT}}\)  
An approximate line search is performed on the descent direction \(\mathbf{S_{\text{TR}}}=(\mathbf{X_{\text{TR}}}-\mathbf{X_{\text{OPT}}})\) limited by \(\mathbf{X_{\text{OPT}}}\) and \(\mathbf{X_{\text{TR}}}\). As explained in Ref. [53], three random numbers \(\xi_{1}\), \(\xi_{2}\) and \(\xi_{3}\) in the interval (0,1) are generated to respectively define points \(\mathbf{X_{\text{TR,APP}}}^{(1)}=\mathbf{X_{\text{OPT}}}+\xi_{1}\mathbf{S_{\text{TR}}}\), \(\mathbf{X_{\text{TR,APP}}}^{(2)}=\mathbf{X_{\text{OPT}}}+\xi_{2}\mathbf{S_{\text{TR}}}\) and \(\mathbf{X_{\text{TR,APP}}}^{(3)}=\mathbf{X_{\text{OPT}}}+\xi_{3}\mathbf{S_{\text{TR}}}\) on \(\mathbf{S_{\text{TR}}}\). Optimization constraints are evaluated at these points; by including responses for \(\mathbf{X_{\text{OPT}}}\) and \(\mathbf{X_{\text{TR}}}\), it is possible to fit the 4 th order polynomials \(G_{\text{k,APP}}(\alpha)\) for active constraints. For sizing optimization problems of truss structures, cost function (i.e., structural weight) is linear with respect to sizing variables and it obviously takes its minimum at \(\alpha=1\), that is at \(\mathbf{X_{\text{TR}}}\). The algebraic equations \(G_{\text{k,APP}}(\alpha)=0\) are solved for all active constraints that turn infeasible moving from \(\mathbf{X_{\text{OPT}}}\) to \(\mathbf{X_{\text{TR}}}\). A new trial design is hence defined as \(\overline{\mathbf{X}}-\mathbf{X_{\text{OPT}}}+Min[1\alpha_{\text{MIN}}]\mathbf{S_{\text{TR}}}\) where \(\alpha_{\text{MIN}}\) is the smallest root found for the \(G_{\text{k,APP}}(\alpha)=0\) equations. If a better design than \(\mathbf{X_{\text{OPT}}}\) is found, it is stored as the new best record and the worst design \(\mathbf{X_{\text{worst}}}\) is removed from the population. The second worst design becomes the new worst design and the former best design becomes the second best design. The \((N_{\text{POP}}-2)\) designs ranked below \(\mathbf{X_{\text{OPT}}}\) and \(\mathbf{X_{\text{2 ndBEST}}}\) are analyzed and eventually updated with the JAYA-based strategy, Equation (14), used for case (1). The convergence check is hence done in Step 3. Unlike Ref. [53], LSSO-HHSJA now updates the whole population each time the approximate line search provides a good trial design \(\overline{\mathbf{X}}\). This allows the candidate designs stored in [HM] to improve more rapidly. If the approximate line search is unsuccessful, Ref.