Reference
Contents
Index
ManualNLPModels.NLPModel
— Typenlp = NLPModel(x, f; kwargs...)
nlp = NLPModel(x, lvar, uvar, f; kwargs...)
Creates a nonlinear optimization model with objective function f
, starting point x
, and variables bounds lvar
and uvar
(if provided). You can provide additional functions by keyword arguments. Here is the list of accepted function names and their signatures:
Unconstrained:
grad = (gx, x) -> gx
: gradient off
atx
. Stores ingx
.objgrad = (gx, x) -> (f, gx)
:f
and gradient off
atx
. Stores ingx
.hprod = (hv, x, v; obj_weight=1) -> ...
: Hessian atx
times vectorv
. Stores inhv
.hess_coord = (rows, cols, (vals, x; obj_weight=1) -> ...)
: sparse Hessian atx
in triplet format.
Constrained:
cons = ((cx, x) -> ..., lcon, ucon)
: constraints atx
. Stores incx
.lcon
anducon
are the constraint bounds.jprod = (jv, x, v) -> ...
: Jacobian atx
times vectorv
. Stores injv
.jtprod = (jtv, x, v) -> ...
: transposed Jacobian atx
times vectorv
. Stores injtv
.jac_coord = (rows, cols, (vals, x) -> ....)
: sparse Jacobian atx
in triplet format.hprod = (hv, x, y, v; obj_weight=1) -> ...
: Lagrangian Hessian at(x, y)
times vectorv
. Stores inhv
.hess_coord = (rows, cols, (vals, x, y; obj_weight=1) -> ...)
: sparse Lagrangian Hessian at(x,y)
in triplet format.