Error using genetic algorithim

조회 수: 2 (최근 30일)
Rubén Pérez Sanz
Rubén Pérez Sanz 2021년 9월 1일
답변: Yi Zhao 2022년 4월 18일
Hi there,
I am trying to minimise a funciton using the 'genetic algorithm', the function takes some time to evaluate and I am trying to make things faster by means of parallelising. However, I don't get the hang of it completelly, particularly I don't understand why after 600 hundred iterations of the algorithm, the command window throws the following error:
Error using fcnvectorizer (line 16)
The source code (C:\Program Files\MATLAB\R2020b\toolbox\globaloptim\globaloptim\private\fcnvectorizer.m) for the
parfor-loop that is trying to execute on the worker could not be found.
Error in stepGA (line 61)
nextScore = fcnvectorizer(pop,FitnessFcn,1,options.SerialUserFcn);
Error in galincon (line 67)
[score,population,state] = stepGA(score,population,options,state,GenomeLength,FitnessFcn);
Error in ga (line 402)
[x,fval,exitFlag,output,population,scores] = galincon(FitnessFcn,nvars, ...
Error in CA_MW_E2E (line 82)
param_hat = ga(@(x)
SMM_obj_func(param,mmts,'param_est',x,'parnames',estpar_names,'num_sim',num_sim),length(estpar_names),[],[],[],[],lb,ub,[],options_ga);
Caused by:
Undefined function 'G_w_inv_gip' for input arguments of type 'double'.
Error using remoteParallelFunction (line 84)
Worker unable to find file.
Undefined function 'G_w_inv_gip' for input arguments of type 'double'.
Failure in user-supplied fitness function evaluation. GA cannot continue.
The function 'G_w_inv_gip' is created by me and it's a gridded interpolant.
I would appreciate if somebody could help me know if the problem with this piece of programe has to be with the genetic algorithm (since the worker does not find the file) or with my function 'G_w_inv_gip'.
I will be looking to your askers.
KR

답변 (1개)

Yi Zhao
Yi Zhao 2022년 4월 18일
Hello,
Have you solved this problem? I have encountered similar problems. Can you share your solutions?
Thank you

카테고리

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