nlp_costfcn

nlp_costfcn(om, x)

nlp_costfcn() - Evaluates objective function, gradient and Hessian.

[F, DF, D2F] = NLP_COSTFCN(OM, X)

Objective function evaluation routine, suitable for use with MIPS,
FMINCON, etc. Computes objective function value, gradient and Hessian.

Inputs:
  OM : 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(om, x);
    [f, df] = nlp_costfcn(om, x);
    [f, df, d2f] = nlp_costfcn(om, x);

See also nlp_consfcn(), nlp_hessfcn().