Initial Population matrix has several individuals with better fval than Genetic algorithm final solution

2 views (last 30 days)
I have programmed an optimization problem based on genetic algorithms following the scheme:
x = ga(fun,nvars,A,b,[],[],lb,ub,[],IntCon,options)
As InitialPopulationMatrix I have introduced a set of possible individuals determined through heuristics.
When I run the algorithm, I only get as final solution the first of the individuals of the InitialPopulationMatrix, even though there are other individuals with better solution fval.
Can someone help me? Thank you very much in advance
  1 Comment
Alan Weiss
Alan Weiss on 20 May 2021
I don't know what your options are, and also don't know if the individuals that you introduce are feasible with respect to all constraints (bounds, linear, and integer). If your individuals are feasible, and your options do not set the EliteCount to 0, then by design the algorithm should keep the best individual at the very least. So I suspect that something is wrong with the feasibility of the individuals or some option setting.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

Answers (0)

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!