Reference

Contents

Index

ManualNLPModels.NLPModelType
nlp = NLPModel(x, f; kwargs...)

Creates a nonlinear optimization model with objective function f, and starting point x. You can provide bounds and additional functions by keyword arguments. Here is the list of accepted kwyword arguments and their default value:

Unconstrained:

  • grad = (gx, x) -> gx: gradient of f at x. Stores in gx.
  • objgrad = (gx, x) -> (f, gx): f and gradient of f at x. Stores in gx.
  • hprod = (hv, x, v; obj_weight=1) -> ...: Hessian at x times vector v. Stores in hv.
  • hess_coord = (rows, cols, (vals, x; obj_weight=1) -> ...): sparse Hessian at x in triplet format.

Constrained:

  • lvar = -Inf * ones(nvar): vecteur of lower bounds on x.
  • uvar = Inf * ones(nvar): vecteur of upper bounds on x.
  • cons = ((cx, x) -> ..., lcon, ucon): constraints at x. Stores in cx. lcon and ucon are the constraint bounds.
  • jprod = (jv, x, v) -> ...: Jacobian at x times vector v. Stores in jv.
  • jtprod = (jtv, x, v) -> ...: transposed Jacobian at x times vector v. Stores in jtv.
  • jac_coord = (rows, cols, (vals, x) -> ....): sparse Jacobian at x in triplet format.
  • hprod = (hv, x, y, v; obj_weight=1) -> ...: Lagrangian Hessian at (x, y) times vector v. Stores in hv.
  • hess_coord = (rows, cols, (vals, x, y; obj_weight=1) -> ...): sparse Lagrangian Hessian at (x,y) in triplet format.
source
ManualNLPModels.NLSModelType
model = NLSModel(x, r, nequ; kwargs...)

Creates a least-squares model with residual function r, and starting point x. You can provide bounds and additional functions by keyword arguments. Here is the list of accepted keyword arguments and their default value:

Arguments

  • x :: AbstractVector: an initial guess;
  • r::R<:Function: a function such that r(y, x) stores the residual at x in y;
  • nequ::Int the number of residuals (i.e., the length of y above).

Keyword Arguments

  • jprod :: J <: Function: a function such that jprod(u, x, v) stores the product between the residual Jacobian at x and the vector v in u;
  • jtprod :: Jt <: Function: a function such that jtprod(u, x, v) stores the product between the transpose of the residual Jacobian at x and the vector v in u;
  • jac_coord = (rows, cols, (vals, x) -> ....): sparse Jacobian at x in triplet format.

All other keyword arguments are passed through to the NLPModelMeta constructor.

source