필터 지우기
필터 지우기

Explanation about the boundaries at the Particle Swarm Optimization

조회 수: 7 (최근 30일)
Hey.
I'm a freshman with the handling from Matlab and I have a question for the particle swarm optimization. Attached you can see my script for the PSO and the function (Rosenbrock function).
I have a question about VarMin and VarMax variables. These variables define the upper and lower bound. But when I define for example:
VarMin = 0
VarMax = 5
nVar = 5
Then of course I get for the GlobalBest a vector with 5 columns. For example:
Position: [3.7542e-04 -8.0293e-04 -0.0011 1.1266e-04 1.5088e-04]
How is this possible? There are negative values. And I defined the minimum boundary with zero.
I hope you can help me with my understanding problem.
Kind regards

채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 18일
The only place you use VarMin and VarMax is the line
particle(i).Position = unifrnd(VarMin, VarMax, VarSize);
to initialize the values.
However, as the particle moves, the velocity could easily have it go below VarMin or above VarMax, since you do not catch that it hits those boundaries.
You need to program in a test for hitting the boundaries, and you need to decide what you want to do with that case.
  댓글 수: 2
Stefan Zeiter
Stefan Zeiter 2018년 3월 19일
Thanks for your help!
Does that mean at the moment in my script just the starting positions from the particles are bounded to my VarMin and VarMax?
Regards
Walter Roberson
Walter Roberson 2018년 3월 19일
Correct, those variables currently only control starting positions.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Particle Swarm에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by