How to fix optimization terminated?
이전 댓글 표시
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
2022년 7월 4일
편집: John D'Errico
2022년 7월 4일
1 개 추천
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. പൂർത്തിയായതായി.
카테고리
도움말 센터 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!