Failure in user-supplied fitness function evaluation. GA cannot continue.

11 visualizaciones (últimos 30 días)
Hi all,
I was wondering if anyone coud assist me with the following error that I'm receiving in GA, as follows:
clc
clear all
rng default
nvars = 24;
popSize = 48;
lb=ones(1,nvars);
lb(1:24) = 1;
ub = ones(1,nvars);
ub(1:24) = 24;
intCon = 1:24;
options = optimoptions('ga','UseParallel', true, 'UseVectorized', false, 'PopulationSize', popSize,'PlotFcn',@gaplotrange);
[x,fval,exitflag,output,population,score] = ...
ga(@objective,nvars,[],[],[],[],lb,ub,[],intCon, options);
FileName=['_Results_nvars_',num2str(nvars),'_popsize_',num2str(popSize),'_i',num2str(i)];
save(FileName)
[Q_Total_cost,Qsystem_total_heat, Qsystem_total_cool] = building_model(x)
While I'm receiving the follwoing errors:
Caused by:
Failure in user-supplied fitness function evaluation. GA cannot continue.
Failure in initial user-supplied fitness function evaluation. GA cannot continue.
Thank you so much in advance!
  1 comentario
Walter Roberson
Walter Roberson el 5 de Oct. de 2020
The message is saying that objective() applied to the initial population failed.
What does
objective(ones(1,48))
return?
lb=ones(1,nvars);
lb(1:24) = 1;
? The lb is already 1 in those positions ?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Surrogate Optimization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by