Reference
Contents
Index
ManualNLPModels.NLPModel
— Typenlp = 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 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:
lvar = -Inf * ones(nvar)
: vecteur of lower bounds onx
.uvar = Inf * ones(nvar)
: vecteur of upper bounds onx
.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.
ManualNLPModels.NLSModel
— Typemodel = 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 thatr(y, x)
stores the residual atx
iny
;nequ::Int
the number of residuals (i.e., the length ofy
above).
Keyword Arguments
jprod :: J <: Function
: a function such thatjprod(u, x, v)
stores the product between the residual Jacobian atx
and the vectorv
inu
;jtprod :: Jt <: Function
: a function such thatjtprod(u, x, v)
stores the product between the transpose of the residual Jacobian atx
and the vectorv
inu
;jac_coord = (rows, cols, (vals, x) -> ....)
: sparse Jacobian atx
in triplet format.
All other keyword arguments are passed through to the NLPModelMeta
constructor.