Error using optimoptions (line 105) 'InitialSwarmMatrix' is not an option for PARTICLESWARM. A list of options can be found on the PARTICLESWARM documentation page.
in this doc, i see that the option for initial population reads
InitialSwarm Initial population or partial population of particles.
hi, i switched from my laptop (Matlab R2015b) to my office's PC (Matlab R2013a) : i will use Matlab R2013a from now on. Does this change in Matlab version changes something to your last message ?
The constraints can be satisfied, because i get no problem when i use ga instead of pso.
but since there is no error due to the 2 lines that use psooptimset, it seems to mean that 'InitialPopulation' is not a problem ... Thank you again for your help.
The Mathworks routine isparticleswarm() introduced in R2014b, which does not support constraints.
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.
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
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.
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Translated by
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.