Genetic Algorithm - Speed of Parallel vs Vectorized?

3 views (last 30 days)
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

Answers (1)

Alan Weiss
Alan Weiss on 6 Jun 2012
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

Community Treasure Hunt

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

Start Hunting!