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.
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
Translated by
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.