Unrecognized field name "FinDiffRelStep"
Show older comments
Hello everyone:
I am trying to replicate a paper from 2019, when running the fmincon optimization routine, I get the following error:
Unrecognized field name "FinDiffRelStep".
Error in finitedifferences
Error in nlconst (line 336)
finitedifferences(XOUT,funfcn{3},confcn{3},lb,ub,f, ...
Error in fmincon (line 759)
nlconst(funfcn,X,l,u,full(A),B,full(Aeq),Beq,confcn,options,defaultopt, ...
It referes to the following section of the gradient computation in the main loop:
% Compute finite difference gradients
if serialFinDiff % Call serial finite-differences code
if ~isFseminf
if DerivativeCheck || (~flags.grad && ~flags.gradconst) % No objective gradients,
% no constraint gradients
[gf,gnc(:,nonlIneqs_idx),gnc(:,nonlEqs_idx),numEvals] = ...
finitedifferences(XOUT,funfcn{3},confcn{3},lb,ub,f, ...
nc(nonlIneqs_idx),nc(nonlEqs_idx),1:numberOfVariables, ...
finDiffOpts,sizes,gf,gnc(:,nonlIneqs_idx), ...
gnc(:,nonlEqs_idx),finDiffFlags,[],varargin{:});
By setting options = optimset('Largescale','off','display','iter') in the main code "FinDiffRelStep" is generated but afterwards not recognized in nlconst. What can I do to run nlconst without FinDiffRelStep?
Thanks
Daniel
Answers (0)
Categories
Find more on Nonlinear Optimization 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!