How to fix optimization terminated?

14 ビュー (過去 30 日間)
Hannah Mohebi
Hannah Mohebi 2022 年 7 月 4 日
編集済み: John D'Errico 2022 年 7 月 4 日
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);

回答 (1 件)

John D'Errico
John D'Errico 2022 年 7 月 4 日
編集済み: John D'Errico 2022 年 7 月 4 日
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. പൂർത്തിയായതായി.

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by