Parallel Computing with gamultiobj
Parallel computing with gamultiobj works
almost exactly the same as with ga. For detailed
information, see Parallel Computing with the Genetic Algorithm.
The difference between parallel computing with gamultiobj and ga has
to do with the hybrid function. gamultiobj allows
only one hybrid function, fgoalattain. This function
optionally runs after gamultiobj finishes its
run. Each individual in the calculated Pareto frontier, i.e., the
final population found by gamultiobj, becomes
the starting point for an optimization using fgoalattain.
These optimizations are done in parallel. The number of processors
performing these optimizations is the smaller of the number of individuals
and the size of your matlabpool.
For fgoalattain to run in parallel, its
options must be set correctly:
fgoalopts = optimset('UseParallel','always')
gaoptions = gaoptimset('HybridFcn',{@fgoalattain,fgoalopts});Run gamultiobj with gaoptions,
and fgoalattain runs in parallel. For more information
about setting the hybrid function, see Hybrid Function Options.
gamultiobj calls fgoalattain using
a parfor loop, so fgoalattain does
not estimate gradients in parallel when used as a hybrid function
with gamultiobj. This is because a parfor loop
estimates gradients in parallel, and inner iterations in nested parfor loops
do not run in parallel.
 | Using gamultiobj | | References |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit