Where can I find the implementation of barrier function in Matlab?
I am trying to see how the algorithm interior-point
is implemented, and this is what I found in the end of fmincon.m
elseif strcmpi(OUTPUT.algorithm,interiorPoint)
defaultopt.MaxIter = 1000; defaultopt.MaxFunEvals = 3000; defaultopt.TolX = 1e-10;
defaultopt.Hessian = 'bfgs';
mEq = lin_eq + sizes.mNonlinEq + nnz(xIndices.fixed); % number of equalities
% Interior-point-specific options. Default values for lbfgs memory is 10, and
% ldl pivot threshold is 0.01
options = getIpOptions(options,sizes.nVar,mEq,flags.constr,defaultopt,10,0.01);
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA,GRAD,HESSIAN] = barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...
initVals.f,initVals.g,initVals.ncineq,initVals.nceq,initVals.gnc,initVals.gnceq,HESSIAN, ...
xIndices,options,optionFeedback,finDiffFlags,varargin{:});
So I want to see what's in barrier but failed.
edit barrier.m
I got:
The barrier function is defined in a p-file (precisely located in
MATLABROOT/toolbox/optim/optim/barrier.p
).Unfortunately the point of p-files is exactly that they are obfuscated, i.e. you cannot read the source code. This is a recurent questio on SO, see this thread for instance.
I'm afraid you cannot read what's inside
barrier
. Maybe if you ask the Mathworks kindly they can give you some information on the content.Best