How to resume genetic algorithm after x number of generations?

1 次查看(过去 30 天)
Hi - I want to do a generic algorithm optimization in batches of generations (e.g run 10 generations, then resume and do other 10, etc).
I am using the regular command line, getting the final population and final scores after each run, and then I inject those as initial population and initial score of the next run. this mostly solves my need.
However, I don't know how to handle the initial penalty value. I can't find in the output structure any final penalty value...
I would like to introduce add the initial penalty value of the next run the final penalty value of the previous one.
Any suggestions on how to make it happen?

采纳的回答

Alan Weiss
Alan Weiss 2016-2-24
The penalty value relates only to nonlinear constraints. You are correct, the penalty value is not reported in the output structure, so you won't be able to handle a restart exactly.
However, if you are using a nonlinearly constrained problem, I am very surprised that you can even run for 10 generations. Usually, the nonlinear constraint algorithm leads to a solution with just a few generations, maybe 5, but each generation does quite a few subproblem solutions involving a lot of generations. So I am not sure what you are doing, because I think that the output function reports after major iterations, and there would only be 5 or so of those.
Alan Weiss
MATLAB mathematical toolbox documentation

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by