In trying to understand how the Genetic algorithm works,can anyone explain why the algorithm didn't quit after getting the smallest maximum constraint violation say the first and third generation?
1 次查看(过去 30 天)
显示 更早的评论
options = optimoptions('ga','PlotFcn',{@gaplotbestf,@gaplotmaxconstr},'Display','iter'); Rerun the ga solver.
[x,fval] = ga(ObjectiveFunction,nvars,[],[],[],[],... LB,UB,ConstraintFunction,options) Best Max Stall Generation Func-count f(x) Constraint Generations 1 2670 13603.6 0 0 2 5282 13578.2 5.718e-06 0 3 7994 14033.9 0 0 4 11794 13573.7 0.0009577 0
0 个评论
回答(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!