My PSO codes gives different results after each run
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tuhin
el 18 de Mayo de 2017
Respondida: Walter Roberson
el 18 de Mayo de 2017
I have developed a PSO code for 4 variables (maximization problem). Now when I run the code, each time the results shows different values. i,e, for 10 different runs, the code gives 10 different gbest values.Is it normal? How to select the optimum value as the answer?
0 comentarios
Respuesta aceptada
Walter Roberson
el 18 de Mayo de 2017
That is typical. PSO tends to use random numbers to create the population. If you do not reset the random number seed between runs, then you will get different answers.
Selecting the best one is slightly complicated if you have constraints, as the one that at first looks to be the lowest value might have more constraint violation than another that looks worse. For this reason, you might want to take all 10 partial solutions and use them as initial population members and run the PSO for one cycle, and take the result that the PSO considers best out of all of them (presuming the PSO measures constraint violation in determining which is best.)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Particle Swarm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!