gamultiobj - Not enough input arguments
Show older comments
I am trying to run gamultiobj for one objective (later, I will add more objectives) but I am getting an error 'Not enough input arguments' (fitness and gamultiobj functions are attached). I would appreciate if you have a look at the code attached. Thanks.
The detailed error:
Not enough input arguments.
Error in myfitnessfunction (line 114)
SOC(i,j)=SOC_n(i)+((cop(i)*E_max(i)*x(i)*T_s/E_cap(i)))*F(i,j)+((E_max(i)*y(i)*T_s/(cop(i)*E_cap(i))))*H(i,j);
Error in createAnonymousFcn>@(x)fcn(x,FcnArgs{:}) (line 11)
fcn_handle = @(x) fcn(x,FcnArgs{:});
Error in gamultiobjMakeState (line 28)
Score = FitnessFcn(state.Population(1,:));
Error in gamultiobjsolve (line 8)
state = gamultiobjMakeState(GenomeLength,FitnessFcn,ConstrFcn,output.problemtype,options);
Error in gamultiobj (line 276)
[x,fval,exitFlag,output,population,scores] = gamultiobjsolve(FitnessFcn,nvars, ...
Error in mymainfunction (line 8)
[x,y,fval,exitflag]=gamultiobj(FitnessFunction,nvars,[],[],[],[],Lb,Ub);
Caused by:
Failure in initial fitness function evaluation. GAMULTIOBJ cannot continue.
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!