Genetic Algorithm - Speed of Parallel vs Vectorized?
显示 更早的评论
Hello,
I am utilizing the global optimization toolbox to solve a metabolic engineering problem with the genetic algorithm tool. Can anybody tell me what determines the computing speed when solving the fitness function in parallel vs. vectorized? Is one always faster than the other (I am using a quad core, 3.8Ghz)? Other than computing the problem with both settings and comparing the computational time, is there another way to determine the best option? Possibly based on the structure of my problem?
Thanks, Brady
回答(1 个)
Alan Weiss
2012-6-6
There is no way to know which is faster. It depends on the time it takes to compute the fitness function, and the time it takes to distribute parallel jobs. Do a small test run to see.
But allow me to make my usual plea to try patternsearch instead of ga. It is almost always faster and more reliable. The one difficulty is you have to choose your own starting points with patternsearch. But if you have both a lower bound vector lb and an upper bound vector ub, you can try the following as initial points:
x0 = lb + rand(size(lb)).*(ub - lb);
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
类别
在 帮助中心 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!