| Parameters:,,,,, // represents the current iteration number, and represents the maximum iteration number. | (1) | Define , , , , , , and | (2) | For //M is the set of particles | (3) | Set , , and to a random number | (4) | Reorder based on | (5) | If , , , then calculate the fitness value; otherwise calculate the fitness value with penalty cost | (6) | Update, | (7) | End for | (8) | While ( ) do | (9) | For | (10) | Update the velocity and position of , , and | (11) | Reorder based on | (12) | If , , , then calculate the fitness value; otherwise calculate the fitness value with penalty cost | (13) | Update, | (14) | End for | (15) | | (16) | End while | (17) | Return |
|