About termination of genetic algorithm
Show older comments
I have set the options of the ga as shown:
options=gaoptimset(options,'Generations',100);
The algorithm terminates after 6 generations. I would like to ask how i will make the algorithm terminate at 100th generation. Thank you in advance.
Accepted Answer
More Answers (1)
Sean de Wolski
on 6 Sep 2012
Edited: Sean de Wolski
on 6 Sep 2012
0 votes
What is the exitflag returnmed from ga()?
This will tell us a lot about what is causing it to exit...
More From doc:
Without nonlinear constraints — Average cumulative change in value of the fitness function over StallGenLimit generations is less than TolFun, and the constraint violation is less than TolCon.
With nonlinear constraints — Magnitude of the complementarity measure (see Definitions) is less than sqrt(TolCon), the subproblem is solved using a tolerance less than TolFun, and the constraint violation is less than TolCon.
So I would recommend starting with those settings.
2 Comments
Sean de Wolski
on 6 Sep 2012
see more
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!