Skip to main content
. 2020 May 1;20(9):2586. doi: 10.3390/s20092586
Algorithm 1: PSO update operator
Input:
 The individual at step t: Lt={φ1t,φ2t,,φht}
Output:
 The updated individual at step t+1: Lt+1={φ1t+1,φ2t+1,,φht+1}
1 Veclocity update
2 vt+1=ωvt+r1C1(pBestLtLt)+r2C2(gBesttLt)
3 Position update
4 Lt+1=Lt+vt+1
5 pBest update
 /∗ pBestL is the best position found by individual L ∗/
 /∗ or the best individual among {L1,L2,,Lt} ∗/
6 if L is better than pBestL then
7  | pBestLL
8 end
9 gBest update
 /∗ gBest is the best position found by the population ∗/
 /∗ or the best individual among all pBest ∗/
10 if L is better than gBest then
11  | gBestL
12 end