How to avoid repeating function evaluations when using ga?
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I have noticed when using ga() that fitness values for the same optimization input will be evaluated multiple times. For example, when an elite gets passed from one generation to the next, it gets evaluated again in the next generation. This creates significant decrease in efficiency for me as my fitness function is a CFD code that takes approximately a minute to complete. This also really ends up slowing down the progress of the optimization as the results start to converge (ie. the mean fitness value approaches the best). Since alot of the population members start to be the same.
Is there an option to tell the genetic algorithm to not repeat the function evaluation? Or perhaps is this not happening and I am way off? Any insight would be useful for me.
W. S. H.
0 个评论
回答(1 个)
Alan Weiss
2015-5-11
As far as I know, there is no built-in option for ga to avoid repeated evaluation of the same point. Sorry.
I bet that you would be happier using patternsearch, which does have a Cache option that you can set to 'on' using psoptimset. This avoids repeated evaluation of the same point. And you would probably be happier using patternsearch in any case, as it is usually faster and more robust and easier to tune than ga.
If your problem has finite bounds on all variables, you can get initial points for patternsearch using the code
x0 = lb + rand(size(lb)).*(ub - lb);
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multiobjective Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!