Regarding GENETIC ALGORITHM optimization tool box R2009

1 view (last 30 days)
Hi,
Im optimzing a lLINEAR objectie function of 24 variables 2*X(1)+ 4*X(2).....6*X(24)
The constraints are LINEAR as well.. with Upper bound and Lower bound
HOWVEVER, The Genetic Algorithm solution Im getting is far from OPTIMAL solution as compare to LINPROG tool (MATLAB) and excel Solver
Could anyone help in this regard..
Im just a beginner in using GA...
Thanks,
Ali

Answers (1)

Alan Weiss
Alan Weiss on 8 May 2013
If you have upper and lower bounds on every component, then make sure that you start with an initial population that is as widely dispersed as the bounds allow. See the documentation on population diversity.
Also, make sure you start with a large enough population. With 24 components, I would take a population of at least 200 individuals.
The main lesson to learn is the the genetic algorithm is not very good for most problems. You would almost always do better to choose an Optimization Toolbox solver for smooth functions with smooth constraints. And you would almost always do better with patternsearch instead of the genetic algorithm for nonsmooth functions.
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

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

Start Hunting!