Genetic algorithm (ga) is not converging
10 views (last 30 days)
Show older comments
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 Comments
Star Strider
on 5 Jan 2021
The problem most likely is your function. Also, see Mixed Integer ga Optimization to understand how to use integer optimization.
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!