How to force ga and particleswarm to stop ONLY on max iterations reached

6 visualizaciones (últimos 30 días)
ga and particleswarm has a few stopping conditions I don't want it to stop running once tolerance is met, but continue for max iterations. Tried to do this by setting TolFun to 0 but doesn't work.
options = optimoptions('particleswarm','OutputFcns',@mypsoutputfun, 'MaxIter',MaxGeneration_fun,'SwarmSize',n_pop_ps,'Display','none','StallTimeLimit', 1,'TolFun', 0)

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de Sept. de 2015
I would suggest an experiment of setting the stall limit fairly high. You could try inf but that might not be accepted. Memory might be allocated for holding this many values so you might not be able to get too wild.
  2 comentarios
JMP Phillips
JMP Phillips el 4 de Sept. de 2015
Editada: JMP Phillips el 4 de Sept. de 2015
For particle swarm found I have to set 'StallIterLimit' >= MaxIter which effectively guarantees tolerance stopping condition is never reached. Same for StallGenLimit in GA.
hemanth chaduvula
hemanth chaduvula el 16 de Jun. de 2020
Dear sir
If I set 'StallIterLimit' >= MaxIter then it shows following error
"Matrix dimensions must agree". Please solve my issue.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Particle Swarm en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by