How do I evaluate my objective function in parallel while using gamultiobj in matlab for multiobjective optimization?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am using gamultiobj to do multiobjective optimization (where there are two objectives). The objective function takes some time to evaluate. So, I want to compute my fitness function (or objective function) in parallel. There population size is 100 in my problem. So, the fitness function has to work for 100 different populations which takes a lot of time. How can I compute the fitness function in parallel way? Any tips and suggestions would be appreciated.
Thank you.
0 Kommentare
Antworten (1)
Milan Bansal
am 6 Okt. 2023
Hi Rajan Bhandari,
It is my understanding that you want to compute the objective functions in parallel while using "gamultiobj" solver for Multiobjective Optimization.
Please try using Parallel Computing Toolbox for this task. Refer to the following code for using Parallel Computing Toolbox for "gamultiobj" solver.
pool = parpool() % create parallel pool
options = optimoptions('gamultiobj', 'UseParallel', 'always'); % set options
[x, fval] = gamultiobj(fitnessFunction, numVariables, A, b, Aeq, beq, lb, ub, options);
Please note that for Multiobjective Optimization, solver optimizes several objective functions simultaneously which might require synchronization and communication between the workers leading to slower optimization when using Parallel Computing Toolbox. In such a case set the "UseParallel" option to "never" as shown below.
options = optimoptions('gamultiobj', 'UseParallel', 'never'); % set options
Please refer to the following documentation link to learn more about Multiobjective Optimization.
Please refer to the following documentation link to learn more about Parallel Computing Toolbox.
Hope this helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Multiobjective Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!