How to fix optimization terminated?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I am using optimization toolbox for solving a two objective optimization model with the help of gamultiobj solver. My objective functions and Genetic algorithm parameters are attached, but I faced this error ''Optimization terminated: average change in the spread of Pareto solutions less than options.FunctionTolerance. '' ,and do not know how to fix it. Would you please help me?
clc;
clear;
close all;
fun=@(x) [-288+(2513*x(1))+(8.93.*x(2))-(2.041*x(3))...
+(11913*(x(1)^2)) , -16.55+(261.8*x(1))+(0.187*x(2))-(7.97*x(1)*x(2))];
lb=[0.017,32,14];
ub=[0.06,38,39];
opt=optimoptions('gamultiobj');
opt.PopulationSize=100;
opt.MaxGenerations=1000;
opt.FunctionTolerance=1e-4;
opt.CrossoverFraction=0.8;
opt.ParetoFraction=0.35;
[x,fval]=gamultiobj(fun,3,[],[],[],[],lb,ub,[],opt);
0 commentaires
Réponses (1)
John D'Errico
le 4 Juil 2022
Modifié(e) : John D'Errico
le 4 Juil 2022
Do you recognize that "terminated" is often used as a synonym for "done", or perhaps "finished", or even "happy as a clam at high tide"?
What would you have wanted it to tell you? The optimizer said it had found a solution that satisfied the requirements. In the eyes of the code, it was indeed happy as a clam at high tide. That you may have seen too many movies where the word "terminated" has a negative connotation, what you may see in a movie theater is not alway true. ;-)
So really, what we need to fix is not the code, but probably your understanding of the output.
Does that mean the optimizer has found a truly, global solution? Well, that is something that no such code can absolutely insure. (Even a global solver like GA when applied to a black box function where it does not see inside the code.) But as far as the code is concerned, it thinks it is done. Fini. Færdig. Terminat. Gotowe. പൂർത്തിയായതായി.
0 commentaires
Voir également
Catégories
En savoir plus sur Genetic Algorithm dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!