Why does the ga in matlab doesn't stop even after attaining the fitnesslimit?
4 ビュー (過去 30 日間)
古いコメントを表示
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
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.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!