Issues with running genetic algorithm (GA) in parallel computation
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
opts = optimoptions(@ga, ...
'PopulationSize', 10, ...
'MaxGenerations', 50, ...
'EliteCount', 1, ...
'FunctionTolerance', 1e-5, ...
'PlotFcn', @gaplotbestf, ...
'UseParallel',true) ;
[xbestDisc, fbestDisc, exitflag, output, population, scores] = ga(@FCWithDisc,6, A, b, [], [], lb, ub, [], 1:6, opts);
Im trying to use genetic algorithm (GA) to optimize a question with 6 varuables, and use Parallel computing to improve the GA efficiency. However, at the beginning of calculation, errors appear as follows:
Error using fcnvectorizer (line 16)
The source code (D:\Program Files\MATLAB\R2021a\toolbox\globaloptim\globaloptim\private\fcnvectorizer.m) for the
parfor-loop that is trying to execute on the worker could not be found.
Error gaminlppenaltyfcn
Error gapenalty
Error makeState (line 69)
Score = FitnessFcn(state.Population(initScoreProvided+1:end,:));
Error galincon (line 22)
state = makeState(GenomeLength,FitnessFcn,Iterate,output.problemtype,options);
Error gapenalty
Error gaminlp
Error ga (line 394)
[x,fval,exitFlag,output,population,scores] = gaminlp(FitnessFcn,nvars, ...
.........
I would appreciate if somebody could help me.
Yi
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!