nlp_consfcn

nlp_consfcn(om, x, dhs, dgs)

nlp_consfcn() - Evaluates nonlinear constraints and their Jacobian.

[H, G] = NLP_CONSFCN(OM, X)
[H, G, DH, DG] = NLP_CONSFCN(OM, X)
[H, G, DH, DG] = NLP_CONSFCN(OM, X, DHS, DGS)

Constraint evaluation function nonlinear constraints, suitable
for use with MIPS, FMINCON, etc. Computes constraint vectors and their
gradients.

Inputs:
  OM : Opt-Model object
  X : optimization vector
  DHS : (optional) sparse matrix with tiny non-zero values specifying
       the fixed sparsity structure that the resulting DH should match
  DGS : (optional) sparse matrix with tiny non-zero values specifying
       the fixed sparsity structure that the resulting DG should match

Outputs:
  H  : vector of inequality constraint values
  G  : vector of equality constraint values
  DH : (optional) inequality constraint gradients, column j is
       gradient of H(j)
  DG : (optional) equality constraint gradients

Examples:
    [h, g] = nlp_consfcn(om, x);
    [h, g, dh, dg] = nlp_consfcn(om, x);
    [...] = nlp_consfcn(om, x, dhs, dgs);

See also nlp_costfcn(), nlp_hessfcn().