|
Algorithm 1: PSO update operator |
|
| Input: |
|
| The individual at step t:
|
|
| Output: |
|
| The updated individual at step :
|
|
| 1 Veclocity update |
|
| 2
|
|
| 3 Position update |
|
| 4
|
|
| 5 pBest update |
|
| /∗ is the best position found by individual L
|
∗/ |
| /∗ or the best individual among {
|
∗/ |
| 6 if
L is better than
then
|
|
| 7
|
|
| 8 end
|
|
| 9 gBest update |
|
| /∗ is the best position found by the population |
∗/ |
| /∗ or the best individual among all
|
∗/ |
| 10 if
L is better than gBest
then
|
|
| 11
|
|
| 12 end
|
|