some bugs was reported in the previous report.
1- line 95: SParam->SParams
2- line 142: psoOptionsSParams->psoOptions.SParams
there are other logical bugs dealing with neighborhood.
the codes in lines 127-130, that are:
for i = 1:SwarmSize
[fNBest(i), nb(i)] = min(fSwarm( find(nhood(i)) ));
B(i, :) = Swarm(nb(i), :);
end
must replace with:
for i = 1:SwarmSize
[fNBest, nb] = min(fSwarm( nhood(i,:) ));
B(i, :) = Swarm(nhood(i,nb), :);
end
Old codes always set the particle number 1 as best neighbor for all of the particles, but new codes are correct!
(bugs fixed by Seyed Ehsan Safavieh, e.safavieh@aut.ac.ir)
corrected file