Skip to main content
. 2023 Feb 2;20(3):2696. doi: 10.3390/ijerph20032696
Algorithm 1: Pseudocode of SSO algorithm
Define Itermax, NP, n, Pdp, sf, Gc, FSU and FSL
Arbitrarily initializing the flying squirrels places
FSi,j=FSL+rand()(FSUFSL), i=1,2, , NP, j=1,2, , n
Compute fitness value
fi=fi(FSi,1,FSi,2,, FSi,n), i=1,2, , NP
while Iter<Iter max 
[sortedf, sorteindex] =sort(f)
FSht=FS(sorte_index(1))
FSat(1:3)=FS(sorteindex(2:4))
FSnt(1:NP4)=FS(sorte_index(5:NP))
Create novel places
for t=1:n1(n1= entire count of squirrels on acorn trees)
    if R1Pdp
FSatnew=FSatold+dgGc(FShtoldFSatold)
    else
FSatnew=random location
    end
end
for t=1:n2(n2= entire count of squirrels on normal trees moving to acorn trees)
    if R2Pdp
FSntnew=FSntold+dgGc(FSatoldFSntold)
    else
FSntnew=random location
    end
end
for t=1:n3(n3= entire count of squirrels on normal trees moving to hickory trees)
    if R3Pdp
FSntnew=FSntold+dgGc(FShtoldFSntold)
    else
FSntnew=random location
    end
end
Sct=k1n(FSatktFShtk)2, Sc min =10B6365Iter/(Iter max )/2.5
if sct<sc min 
FSntnew=FSL+Le´vy(n)×(FSUFSL)
end
Compute fitness value of novel places
fi=fi(FSi,1new,FSi,2new, ,FSi,nnew), i=1,2, ,NP
Iter=Iter+1
end