Why is the relative change higher than my "FunctionTolerance" when I use ga?
Show older comments
I want to use Genetic Algorithm and Particle Swarm Optimization to minimize an objective function without non-linear constraint. I want the algorithm to stop when the relative change of the best fitness value over the last 200 generations is less than 0.01%. For ga, I set the parameter of “FunctionTolerance” to be 0.0001, “MaxStallGenerations” to be 200, and “Generations” to be “inf”. For particleswarm, I set the parameter of “FunctionTolerance” to be 0.0001, “MaxStallIterations” to be 200, and “MaxIterations” to be 200000000 (large enough). “pso” performs well, but “ga” does not perform as expected.
I ran the program for several times and they have the same problem. “ga” stopped with an exitflag = 1. But the relative change of best fitness is much higher than 0.0001. In my program, “ga” stopped at the 510th generation with an approximate fitness value of 32740000, while the 310th generation has a fitness value of approximate 33390000. The relative change is (33390000-32740000)/32740000 = 0.02077, which is much higher than 0.0001. I have no idea what’s the problem here. The “pso” algorithm performs well under the same parameter values.
Why does this happen?
Accepted Answer
More Answers (0)
Categories
Find more on Particle Swarm 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!