A rather different stopping criteria for particle swarm

2 views (last 30 days)
Hello,
I am working on an optimization problem where the objective function is non-smooth and even worse, it is not
defined far from the optimal solution. To handle such a constraint I have used the 'death penalty' approach meaning
that once we are outside the feasible set (undefined objective) I assign +infinity (since my problem is minimization). I am
using particle swarm oprimization to solve this problem. Furthermore, I need to choose a very big MaxIterations so
that it never stops.
Because of the above-mentioned issues when I run my code either 1)"it finds a feasible solution (by chance) and from there it
correctly finds the global minimum' or 2)"it initially gets stucked with a undefined objective (also by chance) and from there sometimes
finds a feasible solution but sometimes it gets stucked there forever".
In order to fix this issue one can simply run the code for a short time and see whether 1 occurs or 2 occurs. If 1 happens it is great but
if 2 happens we can simply stop the code and re-run this again and again till 1 happens.
However, I would like to do this in my code not manually. So, now I ask my question in bellow:
Assume that MaxIterations=10^9. Is it possible to stop particle swarm from running if for the first
50 iterations (50 is an example only) the objective value is 'realmax' and re-run the code again and again untill
we see that we get an objective value within the first 50 iterations?
Thanks in advance!
Babak

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by