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?
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!