Clear Filters
Clear Filters

Genetic Algorithm Options and Population Size

7 views (last 30 days)
Mike on 15 Jul 2011
Answered: Salah Djerouni on 10 Mar 2020
I have created a optimization problem using Simulink that I would like to solve using a Genetic Algorithm. It is setup and running, but I would like some help tweaking the options.
The problem has up to 19 variables that the optimizer can alter to produce the minimum fitness value. For relatively few variables (<6), the algorithm does a pretty good job using a population of 20-50 and 100-200 generations. However I have tried optimizations up to 16 variables and it does not seem to find the global minima. I am able to manually alter the variables and produce a better result. And in this case I know what the minimum should be.
For this 16 variable case, I used a population of 500 and 1000 generations. Some variables ranged from 0 to 6 while others ranged from eps to 0.5. Would the differences in range cause any issues? I set the PopInitRange to equal and upper and lower bounds of the respective variables. My CreationFcn is @gacreationlinearfeasible. The algorithm appeared to converge to a solution, albeit not the global minimum. I tried it again seeding the initial population with an individual near but not at the global minima. This individual did produce good fitness, but the algorithm wasn't able to improve. It appeared to be stepping too far from the individual such that it produced poor fitness.
I did not set any of the other options. Would setting these help the optimizer better search the solution space? Is there an acceptable formula to calculate a reasonable population size given the number of variables? Each individual takes about 1/2 second to run, so reducing population/generations is important.
Thank you for your time.

Answers (1)

Salah Djerouni
Salah Djerouni on 10 Mar 2020
Hi Mike ;
i need to help
I use also GA if you possible to explain for me, how can change the number of population and generation without use windows of GA from simulink Matlab only

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!