Skip to main content
. 2021 Mar 10;21(6):1945. doi: 10.3390/s21061945
Algorithm 1. Particle Swarm Initialization.
1.  Define particle swarm X=X1,,Xi,,XI, in which Xip=xi1,,xin,,xiNT, Xi.v=vi1,vin,,viNT and Xi.d=di1,di2,diNT, respectively.
2.  Construct N spatial neighborhoods, each denoted as Nr1×r1Pn, n1,N.
3.  Set the range of equidistant values of particle position points as d1,d2.
4.  for each XiX do
5.   Randomly sample a point Pns in each Nr1×r1Pn, and all sampled points form a point set Ps=P1s,,Pns,,PNs.
6.   Randomly sample N values in interval d1,d2 to form a equidistant set DS=d1s,,dns,,dNs.
7.   for each n1,N do
8.    xin=Pnsx,PnsyT, vin=0,0T and din=dns.
9.   end for
10. end for