Genetic algorithm (ga) is not converging
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MD. Rokibujjaman sovon
el 5 de En. de 2021
Comentada: MD. Rokibujjaman sovon
el 5 de En. de 2021
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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/479123/image.jpeg)
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 comentarios
Star Strider
el 5 de En. de 2021
The problem most likely is your function. Also, see Mixed Integer ga Optimization to understand how to use integer optimization.
Respuestas (0)
Ver también
Categorías
Más información sobre Genetic Algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!