Optimization terminated: average change in the fitness value less than options.Fu​nctionTole​rance.

84 visualizzazioni (ultimi 30 giorni)
Dear mathworks memebers/staff,
I hope and pray that all those readers of this message will be in good health... My querry though is replied in some questions asked on this forum however, I need to post the same query so that I get resposne particular to my case.
As mentioned in the subject line, , I am receving error "Optimization terminated: average change in the fitness value less than options.FunctionTolerance." when I run my ga-based optimization problem...
Before this I used this online forum and successfully executed fmincon based optimization problem....
Now I am trying to run my ga-based optimization problem...
I am already very thankful to mathworks staff particular Walter and Alan for helping me previously in successfully executing fmincon based optimization problem....
Now it I request memebers/staff of the forum to kindly share with me possible guidance to run my ga-based optimization problem...as I am recieiving the error "Optimization terminated: average change in the fitness value less than options.FunctionTolerance."
I am appending the snapshot of the error message and also the code for possible convenience...
Thanks once again...

Risposta accettata

Star Strider
Star Strider il 4 Feb 2022
That is not an error.
That is simply a message that explains the reason ga finished its optimisation.
Did it produce an acceptable solution (acceptable parameter estimates)?
  4 Commenti
shaik faraz
shaik faraz il 25 Apr 2022
Is it possible to remove that message as it displays as many times as the number of iterations ?

Accedi per commentare.

Più risposte (1)

John D'Errico
John D'Errico il 25 Apr 2022
Star has answered your uestion. However, I want to expand on what was said there. Too often, I see people confused by this message, probably because "terminated" has strongly negative connotations in this world.
The word "terminated" is simply a synonym for "done". Had the tool stated, "I'm done, and happy as a clam at high tide" nobody would get upset. :) Well, maybe the clam diggers. The point being that the optimization has found a point where it does not find any place better to look, where it con no longer find any place better than the current point. So as far as the code is concered, it is done.
This does not mean there are no better solutions, because it is impossible to insure with 100% certainty that there is not some tiny niche with a better result. (Remember that high dimensional problems with nonlinear objectives are nasty and very large places to search, with often multiple locally optimal solutions. Not even GA is perfect in this respect, despite it being part of the global optimization toolbox.) But GA was not able to find a better place than the one it has returned, within the tolerances provided to the code.

Community Treasure Hunt

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

Start Hunting!

Translated by