Table 2 Pseudo-code of the proposed SSA-PSO method.
SSA-PSO algorithm | |
|---|---|
Input: | The initial solution set X, X=[Xsparrows, Xparticle], setting the population size of sparrows and particle swarms, the number of iterations and other parameters, the fitness function F |
Output: | Xbest |
Set1: | sort Xsparrows and Xparticle according to F |
Set2: | while the number of iterations is not greater than the number of terminations |
| Â | updates the location of spotters, followers, and scouts |
| Â | sort Xsparrows according to F |
| Â | dynamic backward mutation of Xsparrows0 |
|  | if F(Xsparrows0) > F(Xnew) |
| Â | Xsparrows0 = Xnew |
| Â | else continue |
|  | if F(Xsparrows0) < F(Xparticle0) then |
| Â | insert Xsparrows0 into Xparticle to become Xparticle0 |
| Â | update the position and velocity of X |
| Â | sort Xparticle according to F |
| Â | Xbest= Xparticle0 |
| Â | else Xbest= Xparticle0 |
| Â | end while |
Set3: | output Xbest |