stopping criteria for particle swarm optimization algorithm

15 views (last 30 days)
Hello everyone,
I am running an optimization problem using particle swarm algorithm pso). However, i have a problem related to the stopping criteria.
In fact, as i understood, pso will stop when 1) maximum iterations are reached or 2)in the last MaxStalliterations is less than function tolerance. Does my understanding seem correct ?
Indeed, in my optimization problem, the plot of the objective function shows that at iteration 11, the optimal objective function value is reached. Since, all parameters in pso are left by default, i expect that the algorithm will stop at iteration 31 following the second criteria (By defaut, MaxStalliterations is equal to 20). However, it does not stop.
Could you tell me why please ?
Here a plot of the objective function in function of number of iterations.
Thank you in advance,
Best Regards,

Answers (1)

Abhinav Aravindan
Abhinav Aravindan on 14 Aug 2024
Edited: Abhinav Aravindan on 14 Aug 2024
The Particle Swarm Optimization stops on reaching one of the Stopping Criteria mentioned in the documentation below, which includes stopping when:
  1. Number of iterations reaches ‘MaxIterations
  2. Relative change in the best objective function valueover the lastMaxStallIterationsiterations is less thanFunctionTolerance.
However, note that the “Relative change” here is measured by:
funChange = abs(maxBestFvalsWindow-bestFval)/max(1,abs(bestFval));
Since your objective function has a value less than 1, the “Relative Change” here is interpreted as “Absolute Change”. With the FunctionalTolerance set at the default value, 1e-6, the change in objective function value funChange, may be still higher than 1e-6, resulting in the continuation of the optimization algorithm.
To avoid this, a possible solution is to change the FunctionalTolerance parameter accordingly or scale up the objective function.
Please find below the relevant documentation for more information.
I hope this helps in resolving your query!

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!