Hi Dear all,
I am trying to implement the Bound Handling techniques for a particle velocity and position. I am using Deterministic Back and Nearest technique for velocity and position respectively. I have implemented these two techniques in two different methods (in the program). I am getting slightly different results from these methods. I am not sure which one is the right method. Please let me comment. If both of the following methods are incorrect then please let me suggest the correct way of implementation.
Method-1
for (i = 1 to SWARM_SIZE)
{
for (j=1 to PROBLEM_SIZE)
{
Compute V(t+1) using standard PSO velocity equation
If (V(t+1) < V_min || V(t+1) > V_max)
V(t+1) = - 0.5 * V(t+1) // this deterministic back technique
Compute X(t+1) using standard PSO position equation
If (X(t+1) < X_min)
X(t+1) = X_min
Else if (X(t+1) > X_max)
X(t+1) = X_max
}
}
Method-2
for (i = 1 to SWARM_SIZE)
{
for (j=1 to PROBLEM_SIZE)
{
Compute V(t+1) using standard PSO velocity equation
Compute X(t+1) using standard PSO position equation
If (X(t+1) < X_min)
{
X(t+1) = X_min
V(t+1) = - 0.5 * V(t+1) // this deterministic back technique
}
Else if (X(t+1) > X_max
{
X(t+1) = X_max
V(t+1) = - 0.5 * V(t+1) // this deterministic back technique
}
}
}
Many thanks
Best regards,
M Khan