フィルターのクリア

Explanation about the boundaries at the Particle Swarm Optimization

7 ビュー (過去 30 日間)
Stefan Zeiter
Stefan Zeiter 2018 年 3 月 18 日
コメント済み: Walter Roberson 2018 年 3 月 19 日
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 Center および File ExchangeParticle Swarm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by