| Algorithm 1: A pseudo-code PSO | |
| Input: particles V, S, Np, and fitness function Output: Solution as global best position S | |
| 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. |
Start Initializing particles: Equation (3) Initializing global best position and fitness While termination condition is not met For each particle Updating particle’s velocity: Equation (4) Updating particle’s position: Equation (5) Evaluating fitness of the particle’s new position Updating personal best position and fitness Updating global best position and fitness End |