MATLAB Answers

Why does the ga in matlab doesn't stop even after attaining the fitnesslimit?

8 ビュー (過去 30 日間)
vprithiv
vprithiv 2018 年 6 月 10 日
コメント済み: Walter Roberson 2018 年 6 月 10 日
I am using the ga in matlab. I fixed my fitnesslimit as 1 in the options. Even when my function evaluation is less than 1, it still goes on.
Sorry, I can't post the whole program here, so just posting the important lines of the program.
options = gaoptimset('InitialPopulation',x0,'PopulationSize',popul_size,'EliteCount',8,...
'CrossoverFraction',0.25,'Generations',no_gens,'FitnessLimit',1,'PlotFcns',{@gaplotbestf});
[x_best,fval] =ga(fitnessfcn,nvars,[],[],[],[],lb,ub,[],options);

  1 件のコメント

Walter Roberson
Walter Roberson 2018 年 6 月 10 日
One way that can happen is if there is a constraint violation: it could continue to search looking for a point that met the fitness level but did not violate the constraint.

サインイン to comment.

回答 (0 件)

サインイン してこの質問に回答します。

タグ


Translated by