## 6 Discussion and Conclusions  
In this work, a comparative investigation of three nature-inspired metaheuristic optimizers, implemented entirely within the native APDL environment of ANSYS, is presented. While literature studies have demonstrated the effectiveness of these algorithms when coupled to ANSYS via external tools (Python, MATLAB, C++ scripts, etc. ), no widely documented study exists on implementing these algorithms exclusively within ANSYS APDL. By integrating each metaheuristic directly into APDL routines, seamless interaction with the ANSYS solver was ensured, interprocess communication overhead was eliminated, and full control over the simulation workflow was maintained. These advantages translate into substantial savings in computational effort without compromising solution quality. To validate the proposed approach, three benchmark truss structures under prescribed loading conditions were selected: a 22-bar spatial truss (Case A), a 25-bar spatial truss (Case B), and a two-dimensional, 15-rod truss in which topology variables are handled via a Discrete Topology (DT) method (Case C). The DT formulation, in particular, reduces the number of allowable topologies to a finite set of mechanically feasible configurations, thereby narrowing the search space and accelerating convergence. Before addressing these case studies, a preliminary calibration of the GSO algorithm was conducted, testing four alternative ranger-movement strategies. It was found that the so-called \"periodic hybrid\" scheme (whereby rangers alternate between directed, distance-based steps and randomized  
Figure 19: **(a)** Mean final weights for the case C study; **(b)** convergence of the objective function over analysis time for the case C study. Figure 20: Comparison of **(a)** the initial configuration and **(b)** optimized configuration of the case C structure. exploratory jumps) yields the fastest convergence and the highest-quality objective function values across multiple simulation runs. Regarding the Firefly Algorithm (FA), the original formulation does not incorporate randomly moving fireflies explicitly. However, in this study, an analogous, adaptive random movement strategy was adopted for FA to enhance the exploration capabilities and consequently improve the likelihood of discovering better solutions. When applied to cases A, B, and C, all three metaheuristics successfully located structurally sound, lightweight configurations. However, their computational profiles and final weights diverged in meaningful ways. In every instance, GSO reached its optimal or near-optimal solution in a fraction of the CPU time required by GA. Although GA occasionally achieved a marginally lower mean final weight, this tiny improvement came at a run-time penalty ranging from 80% to 100% compared to GSO. FA occupied an intermediate position: its final configurations were typically 1-4% heavier than GSO's, and its CPU time was roughly double that of GSO in most runs. In other words, FA succeeded in balancing solution quality and computational cost, but GSO's adaptive ranger movements provided a decisive advantage, rapidly guiding search members toward promising regions of the design space without excessive exploration overhead. A closer examination of the convergence trajectories reveals why GSO excels. The hybridized ranger movement alternates between a directed step (which exploits known promising areas) and a random jump (which preserves global diversity). This dynamic modulation of \"exploration versus exploitation\" avoids the common pitfalls of stagnation in local minima. By contrast, GA's reliance on fixed-probability crossover and mutation can lead to a slower spread of favorable genetic material, especially as the search nears convergence. FA's stochastic attraction mechanism, while effective for escaping shallow traps, still requires more iterations (and thus more finite element analyses) to home in on the global optimum.