MATLAB Answers

Hi ,can anybody help me to give the code for competitive swarm optimization ,wrehe fitness will be calculated from benchmark function sphere?

5 views (last 30 days)
suryamani kumar
suryamani kumar on 7 Dec 2019
this is the pseudo cde for competitve swarm optimization(CSO) please help me to implemnt this using matlab for fitness calculation use benchmark function "SPHERE"
1: t = 0;
2: randomly initialize P(0);
3: while terminal condition is not satisfied do
4: calculate the fitness of all particles in P(t);
5: U = P(t), P(t + 1) = ∅;
6: while U 6= ∅ do
7: randomly choose two particles X1(t), X2(t) from U;
8: if f(X1(t)) ≤ f(X2(t)) then
9: Xw(t) = X1(t), Xl(t) = X2(t);
10: else
11: Xw(t) = X2(t), Xl(t) = X1(t);
12: end if
13: add Xw(t) into P(t + 1);
14: update Xl(t) using (6) and (7);
15: add the updated Xl(t + 1) to P(t + 1);
16: remove X1(t), X2(t) from U;
17: end while
18: t = t + 1;
19: end while

  0 Comments

Sign in to comment.

Answers (0)

Sign in to answer this question.

Tags