nlp_costfcn
- nlp_costfcn(mm, x)
nlp_costfcn()- Evaluates objective function, gradient and Hessian for NLP solver.[F, DF, D2F] = NLP_COSTFCN(MM, X) Objective function evaluation routine, suitable for use with MIPS, FMINCON, etc. Computes objective function value, gradient and Hessian. Inputs: MM : MP-Opt-Model object X : optimization vector Outputs: F : value of objective function DF : (optional) gradient of objective function (column vector) D2F : (optional) Hessian of objective function (sparse matrix) Examples: f = nlp_costfcn(mm, x); [f, df] = nlp_costfcn(mm, x); [f, df, d2f] = nlp_costfcn(mm, x);
See also
nlp_consfcn(),nlp_hessfcn().