You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an inaccuracy on the PSO example on the smin and smax parameters.
When the parameters are used in the constructor, they are similar to pmin and pmax:
In this case, with smin having a negative value, the first conditional will never be true.
I think the code has a different meaning: smin is the minimum absolute value of the speed regardless of direction.
So, a particle could have a speed from 0.3 to 3 negative or positive. I think this more useful.
The case above works because it is symmetric around zero.
Maybe the parameter should be:
There is an inaccuracy on the PSO example on the
smin
andsmax
parameters.When the parameters are used in the constructor, they are similar to
pmin
andpmax:
They seem to be a minimum and maximum speed range.
But when a particle is updated, they seem to have a different meaning:
In this case, with
smin
having a negative value, the first conditional will never be true.I think the code has a different meaning:
smin
is the minimum absolute value of the speed regardless of direction.So, a particle could have a speed from 0.3 to 3 negative or positive. I think this more useful.
The case above works because it is symmetric around zero.
Maybe the parameter should be:
I think if someone wants different
smin
it will not work:The text was updated successfully, but these errors were encountered: