Vectorized Multiobjective GA sends single individuals rather than entire population
Afficher commentaires plus anciens
I have tried implementing the multiobjective GA (gamultiobj) using a vectorized fitness function, as explained at the bottom of: https://www.mathworks.com/help/gads/examples/performing-a-multiobjective-optimization-using-the-genetic-algorithm.html. However, after setting the options to use vectorization and ensuring that parallel computing is off, the gamultiobj still only passes the population to the function one individual at a time. I have tried updating my version of Matlab to 2017b thinking that the older version that I was using might not have supported vectorization for gamultiobj, but it still does not work with R2017b. I have successfully vectorized the regular ga, so it was unexpected that it would not work for multi objective ga. Can anyone confirm that gamultiobj does support vectorized evaluation of the fitness function?
Réponse acceptée
Plus de réponses (3)
Alan Weiss
le 25 Sep 2017
0 votes
As the example you quote shows, gamultiobj works in a vectorized fashion when the 'UseVectorized' option is true. If it isn't working for you, then something else is going on. Perhaps you have a custom function for mutation or crossover that doesn't work in a vectorized fashion? I really have no idea at this point why it isn't working for you. I can assure you that in some cases, the feature works as advertised.
Alan Weiss
MATLAB mathematical toolbox documentation
Matthew Whelan
le 25 Sep 2017
0 votes
Niraj Gadakari
le 26 Sep 2017
I tried to reproduce the error that you were receiving while executing the shipped example, but I could not get any errors. The examples work fine in both R2017a, and R2017b in both Windows, and Linux Machines.
The error however indicates that in the assignment:
scores(:,1) = (pop + 2).^2 - 10;
There is mismatch in the dimension of "pop" and "scores(:,1)".
Ensure that "pop" has not been modified before executing this line. Also, ensure that there are no other shadowed files names "vectorized_multiobjective.m" in the path. To find if there are any shadowed files, you can execute the following command in the Command Window:
which -all vectorized_multiobjective.m
Catégories
En savoir plus sur Surrogate Optimization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!