# Optimization of Composite Structures with Thin Rigid Fibers Using Bioinspired Algorithms
## 3 The Particle Swarm Optimizer
These parameters are the number of particles (\(m\)), the inertia weight (\(w\)), and two acceleration coefficients (\(c_{1}\), \(c_{2}\)). For the task to be stable, the acceleration coefficients should not be greater than 2.05. The inertia weight (\(w\)) controls the influence of the particle's previous velocity on its current velocity. It controls exploration and exploitation. It acts as a constraint imposed on velocities that prevents the swarm from dispersing, and thus guarantees the convergence of the optimization process. The range of variability of this parameter is between 0.4 and 0.9. Figure 4: The idea of the particle swarm. The velocity of the \(i\)-th particle is determined by three components of the sum in (8). The first component \(wv_{i}(k)\) plays the role of the constraint to avoid excessive oscillation in the search space. The inertia weight \(w\) controls the influence of particle velocity from the previous step on the current one. This element also governs the process of exploration and exploitation. Greater inertia weight values make global searching easier, whereas lower values make local searching more difficult. In order to prevent particle dispersion and ensure that the optimization process converges, the inertia weight serves as a constraint on velocity. The second component \(\phi_{1}(k)[q_{i}(k)-d_{i}(k)]\) realizes the cognitive aspect. The particle's distance from its previously determined optimum position is represented by this component. It is related to the natural inclination of the individuals (particles) to the environments where they had the best experiences (the best value of the fitness function). The third component \(\phi_{2}(k)[\hat{q}_{i}(k)-d_{i}(k)]\) represents the particle distance from the position of the swarm leader. It refers to the natural inclination of the individuals to follow the other which achieved a favorable outcome. Figure 5 displays the PSO flowchart. The procedure starts with a randomly generated particle swarm of the presumptive size. The starting positions and velocities of the particles are created randomly. In the next step, the objective function values are evaluated for each particle. The data necessary for the calculation of the objective function are obtained in consequence of solving the boundary value problem. The swarm leader is selected once the optimal particle placements have been updated based on the fitness information of every particle. Next, (8) is used to modify the particle velocities, and (9) is used to modify the particle placements. Until the stop condition is met, the procedure is repeatedly carried out iteratively. The maximum number of iterations is usually used to describe the stop condition. Essentially, every particle oscillates in the search space between its previous best position (the position with the best fitness function value) and the best position of its best neighbor (the relative swarm leader). The idea is that each particle will find the new best positions (solutions) on its trajectory, which will ultimately lead to the optimal solution in a specific area. The advantage of this algorithm, like for AIS, is the fact that information about the objective function is enough in the optimization process. Other advantages include being a faster algorithm compared to other bioinspired algorithms, being controlled by a small number of parameters, and working on possible acceptable solutions. The disadvantage of this algorithm is the fact that the entire population tends to a single solution, which unfortunately will not always be a global solution due to incorrectly selected optimization parameters. Figure 5: The flowchart of the particle swarm optimizer.