Parallel Computing in Optimization Toolbox

2 ビュー (過去 30 日間)
Yro
Yro 2020 年 10 月 18 日
コメント済み: Matt J 2022 年 4 月 18 日
I want to use the GA toolbox for optimization but with the parallel option ('UseParallel', true).
options = optimoptions(@ga,'Display', 'iter', ...
'OutputFcn',@GA_OUTPUT ,...
'PlotFcn', {@gaplotbestf, @PLOT_FUNCTION},...
'MaxGenerations', 60, ...
'PopulationSize', POPULATION_SIZE, ...
'FunctionTolerance',1e-6, ...
'CrossoverFraction', 0.95, ...
'EliteCount', 0.1*30,...
'UseParallel', true) ;
[x,fval,exitflag,output,population,scores] = ...
ga(@OBJECTIVE_FUNCTION,nvars,A,b,Aeq,beq,lb,ub,@POWER_CONSTRAINT,IntCon,options) ;
My question is how can I attach my working directory (/home/user/workidir) with the files to be used by the algorithm in each Worker.
Thanks.
  3 件のコメント
Yro
Yro 2020 年 10 月 19 日
Hi, thanks for your reply,
  1. No, Matlab starts the parallel calculation automatically.
  2. Yes, it is the PC that I use and that is the directory where I am running the code.
Thanks.
Matt J
Matt J 2022 年 4 月 18 日
Yi Zhao's comment moved here:
Hello,
Whether your problem has been solved,and whether the solution can be shared.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel Computing Fundamentals についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by