constrained pso : how to set initial population ?
古いコメントを表示
hi, i tried
options = optimoptions('particleswarm', 'InitialPopulation', tous_xi);
where tous_xi contains initial positions, and i get the error :
'InitialPopulation' is not an option for PARTICLESWARM.
Can you help me to set that initial population? Thank you
8 件のコメント
genevois pierre
2016 年 12 月 30 日
Alan Weiss
2016 年 12 月 30 日
Please show us the error that MATLAB throws so we have a chance of helping you.
Alan Weiss
MATLAB mathematical toolbox documentation
genevois pierre
2016 年 12 月 31 日
Walter Roberson
2016 年 12 月 31 日
Which MATLAB version are you using?
genevois pierre
2017 年 1 月 2 日
Walter Roberson
2017 年 1 月 2 日
In R2015b, the option was 'InitialSwarm'
"Problem is infeasible due to nonlinear constraints"
That can happen. Are you certain that your constraints can be satisfied?
genevois pierre
2017 年 1 月 3 日
編集済み: Walter Roberson
2017 年 2 月 21 日
Walter Roberson
2017 年 1 月 3 日
pso() and psooptimset() are not Mathworks routines. They appear to be https://www.mathworks.com/matlabcentral/fileexchange/38224-co-blade-software-for-analysis-and-design-of-composite-blades or https://www.mathworks.com/matlabcentral/fileexchange/25986-constrained-particle-swarm-optimization
Someone would have to study the constrained pso() code to determine why it does not feel that the constraints can be satisfied. I do not feel that is something I would have time to do.
採用された回答
その他の回答 (2 件)
jonas_h
2017 年 2 月 21 日
編集済み: Walter Roberson
2017 年 2 月 21 日
Did you find a solution yet? I have the same problem. I am also using this PSO https://de.mathworks.com/matlabcentral/fileexchange/25986-constrained-particle-swarm-optimization because I need the nonlinear constraints.
I get the same error and thought I made a mistake but with ga everything is working fine (much slower but at least it is working). I tried the pso several times and sometimes it is working (maybe in 2/10 cases) In the other cases there is this error:
Error using psocheckinitialpopulation (line 103)
Problem is infeasible due to nonlinear constraints
Error in pso (line 338)
[state,options] = psocheckinitialpopulation(state,...
There are possibilieties where there constraints can be satiefies. Otherwise it would not be working in some cases.
After this I tried to set the initialpopulation:
psooptimset(...InitialPopulation',startwerte);
"startwerte" should be a vector of my starting values (the function contains 12 variables which should be optimized). With the starting values the constraints are 100% satisfied. This did not help very much. maybe it is working more often now but not everytime.
Is this a bug in the PSO? I think then I have to use the ga. I would like to use the PSO because it is much faster in my case.
Thanks!
1 件のコメント
Walter Roberson
2017 年 2 月 21 日
It would help to have specific functions (and inputs) to test with.
カテゴリ
ヘルプ センター および File Exchange で Particle Swarm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!