# Optimization of Composite Structures with Thin Rigid Fibers Using Bioinspired Algorithms
## 3 The Particle Swarm Optimizer
#### Comparison Between AIS and PSO  
Having two different optimization algorithms and knowing their advantages and disadvantages, a comparison of them in terms of efficiency and effectiveness for several selected tasks (mechanical systems) is presented. In Ref. [23], AIS and PSO were compared for the optimization of a reinforced rectangular plate. Optimization of the plate, which is dynamically loaded and reinforced by a frame-like structure composed of straight beams, is considered. The optimal positions of stiffeners were researched in order to maximize the stiffness of the plate. Both algorithms were effective and found the same solution. In terms of efficiency, PSO was faster and needed an average of about 440 fitness function evaluations, while AIS required about 680.  
In Ref. [21], the optimization of thermomechanical structures was carried out using PSO and AIS. The optimization problem was formulated as the minimization of the volume, the maximal value of the equivalent stress, the maximal value of the temperature, or maximization of the total dissipated heat flux with respect to specific dimensions of a thermomechanical structure. The final solutions obtained after optimization were identical, but in terms of efficiency, this time AIS was faster and needed an average of about 630 fitness function evaluations, while PSO needed about 825.  
In Ref. [22], an application of AIS and PSO to the optimization of the stacking sequence of plies in composites is presented. Both algorithms found the same solutions after setting their optimization parameters appropriately. In terms of efficiency, both algorithms needed about 450 fitness function evaluations.  
To sum up both algorithms: the effectiveness and efficiency of both algorithms (AIS and PSO) depend on several factors. The size of the starting population will certainly be of great importance. A large population will provide a greater chance of searching the space of potential solutions, which will provide a greater chance of finding the global optimum. On the other hand, the computation time will increase, because more direct tasks have to be solved. Therefore, for the algorithm to be effective and efficient, a compromise must be found between the size of the population and the optimization time. Additionally, it is necessary to take care of the appropriate values of the optimization parameters for each of the algorithms. An assessment of the influence of all algorithm parameters for both AIS and PSO on the efficiency of the optimization process for many mathematical functions was also carried out [46]. For simple examples such as mathematical functions, the efficiency of PSO is better [46]. The advantage of AIS over PSO can be observed with more complex optimization examples, prone to getting stuck in local extrema [46]. According to our observations, these complex examples are tasks for which we have a dozen or more design variables or for strongly nonlinear tasks.  
On the basis of the obtained results, there are no clear conclusions that one algorithm is better than the other. The most important thing is that both algorithms are effective even if the efficiency of one of them is worse.  
In this paper, the purpose of using PSO was to confirm the results obtained by AIS, which was used first, to validate the results obtained by AIS.