MATLAB Answers

Why ga gives different results on graphic and fval value

5 views (last 30 days)
halime çelik
halime çelik on 18 Sep 2017
Edited: arij22 on 26 Nov 2020
Hi. I m using ga for my problem. But , it gives different results on graphic(PlotFcns',{@gaplotbestf,@gaplotstopping}) and for fval value. I entered all input values in A matrix , and I described ub,lb, function and others as below.
[x,fval,exitflag,output] = ga(@modellp,nvars,A,b,[],[],lb,ub,[ ],intcon ,options);
and my opitons is
options = gaoptimset('PopulationSize',50,'Generations',10000,'EliteCount',3,'TolFun',1e-10,'PlotFcns',{@gaplotbestf,@gaplotstopping} );
I solved same problem with intlinprog , and I took good results. But ga always gives error. What is the problem, could you help me?

  1 Comment

arij22 on 26 Nov 2020
Hi Halime!
I know it has been quite a long time since you worked on this, but I seem to have the exact same problem as yours, and could not find any answer anywhere.
Did you manage to understand the difference between fval and the best score on the graphic?
Thanks in advance,
All the best,

Sign in to comment.

Answers (0)


Community Treasure Hunt

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

Start Hunting!