필터 지우기
필터 지우기

Issues with running genetic algorithm (GA) in parallel computation

조회 수: 9 (최근 30일)
Yi Zhao
Yi Zhao 2022년 4월 18일
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개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by