## 2 Particle Swarm Optimization  
Particle swarm optimization (PSO) is a bio-inspired stochastic optimization algorithm. The PSO algorithm was invented by [PERSON] and [PERSON] in 1995 [PERSON] and [PERSON] (1995), with the objective of iteratively improving a randomly generated solution with respect to a given objective. The algorithm focuses on a population of entities called particles. A particle is represented as a point in an N-dimensional Cartesian coordinate system (Figure 1). Particles are abstractions of entities that are at a position and move with a velocity. Initially, these particles are randomly assigned a position and velocity. Furthermore, each particle \(id\) is also responsible for tracking its personal best position \(P_{id}\) and global best position \(P_{bg}\). Consequently, at each time point \(t\), the positions and velocities of each particle are updated as follows:  
\[X_{id}(t)=X_{id}(t-1)+V_{id}(t-1) \tag{1}\]  
\[V_{id}(t)=\omega V_{id}(t-1)+c_{1}r_{1}(P_{id}+X_{id}(t-1))+c_{2}r_{2}(P_{bg}+X _{bg}(t-1)) \tag{2}\]  
In this context, the terms \(c_{1}\) and \(c_{2}\) are non-negative constants, referred to as learning factors, while the variables \(r_{1}\) and \(r_{2}\) represent two random numbers with uniform distribution within the interval \([0,1]\). Additionally, it is important to consider the inertia constant, denoted by the variable \(\omega\), which enables the balancing of local and global search. This variable is constrained to the interval \([0,1]\). Furthermore, the maximum velocity, denoted by \(V_{max}\), is constrained to the values of \(V_{id}\ \in\ [-V_{max},V_{max}]\).  
In addition, each particle keeps a record of the personal best position and global best position achieved by other particles up to that time and detected by the current particle. The best position is identified through the utilisation of the _fitness_ function, which represents the objective to be optimized. Consequently, the term \"best\" in this context denotes the minimum or maximum value identified during the evaluation of the particle position in conjunction with the _fitness_ function defined within the algorithm. The _fitness_ function is a type of objective function employed to ascertain the proximity of a given solution to achieving the objective initially established in the algorithm.  
PSO employs an iterative process whereby all particles are evaluated for their _fitness_ in relation to the local \(P_{id}\) and global \(P_{bg}\) best positions. The way in which the best position and the fitness attained by the other particles are ascertained hinges on the presence of shared memory between them. In such instances, the determination is conducted by accessing a global variable. In distributed systems, the absence of shared memory necessitates the implementation of a message passing protocol to ensure, to a first approximation, the coherence of the global best position value for all particles.  
The proposed solution for the implementation of the distributed parallel PSO algorithm entails the design and implementation of two variants of the distributed PSO, which we have called distributed synchronous (DSPSO) and distributed asynchronous (DAPSO).