GA: How to get a full population set for one Generation
Mostrar comentarios más antiguos
Currently, I have a genetic algorithm defined by the following lines of code:
>> opts = optimoptions(@ga,'PopulationSize', PopulationSize,...
'MaxGenerations', MaxGenerations,'EliteCount', 1,...
'OutputFcns', @my_view,'PlotFcn', @gaplotbestindiv);
>> [x, fval,output] = ga(@Costfunction,9,[], [], [], [],...
lb, ub, @Constraints, [1:5], opts)
In my ConstraintFunction, I want to run an external simulation. For better performance of the external simulation, it would be nice to get the full set of one generation first. Therefore, I would like to obtain a full population set for the first generation of my genetic algorithm to be used in an external simulation.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Genetic Algorithm en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!