| Input:ββ : The information parameters of nodes |
| βββββ : The th particle swarm |
| βββββ : Each sub-swarmβs optimal position vector function |
| βββββ : The iterated generations for searching process |
| Output:β and : The velocity and position of each sub-swarm and its particle |
| ββββ: The global optimal fitness |
| Process: |
| ββββFor each swarm |
| βββββFor each particle |
| ββββββUpdate velocity and position of each sub swarmβs particle |
| βββββIf , |
| βββββElse If , |
| ββββββCalculate of the particle (path) |
| ββββββEnd For |
| βββββ |
| ββββEnd For |