Genetic algorithm (ga) is not converging
6 次查看(过去 30 天)
显示 更早的评论
lb = [1,1];
ub = [20,20];
nvars = 2;
IntCon = [1,2];
n = 100
options = optimoptions('ga','MaxGenerations',n,'MaxStallGenerations',n,...
'MutationFcn',{@mutationadaptfeasible,0.0625},'crossoverFraction',0.65,...
'CrossoverFcn',{@crossoverintermediate,0.9375},'FunctionTolerance',0.01,...
'OutputFcn',@func_gaoutfun,'Display','iter',...
'EliteCount',2,'PlotFcn',{@gaplotbestf,@gaplotdistance});
x = ga(@func_optimization,nvars,[],[],[],[],lb,ub,[],IntCon,options);

Hello,
I am trying to find the global minimization using genetic algorithm. I used two variables and they always should be integer number. I put above information in the options. the OutputFcn is used to check the record informations of each generation. i run the iteration 1000 times as well but the plot is not converging at all. Is this because of crossover and mutation fuction? kindly help me to find the convergence.
I added the plot here based on 100 iteration. you can see that they are not converging or no tendency to converge. What might be the problem and how to solve this? If you can help, that would be very helpful.
Thank you.
2 个评论
Star Strider
2021-1-5
The problem most likely is your function. Also, see Mixed Integer ga Optimization to understand how to use integer optimization.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!