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 offatx. Stores ingx.objgrad = (gx, x) -> (f, gx):fand gradient offatx. Stores ingx.hprod = (hv, x, v; obj_weight=1) -> ...: Hessian atxtimes vectorv. Stores inhv.hess_coord = (rows, cols, (vals, x; obj_weight=1) -> ...): sparse Hessian atxin 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.lconanduconare the constraint bounds.jprod = (jv, x, v) -> ...: Jacobian atxtimes vectorv. Stores injv.jtprod = (jtv, x, v) -> ...: transposed Jacobian atxtimes vectorv. Stores injtv.jac_coord = (rows, cols, (vals, x) -> ....): sparse Jacobian atxin 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 atxiny;nequ::Intthe number of residuals (i.e., the length ofyabove).
Keyword Arguments
jprod :: J <: Function: a function such thatjprod(u, x, v)stores the product between the residual Jacobian atxand the vectorvinu;jtprod :: Jt <: Function: a function such thatjtprod(u, x, v)stores the product between the transpose of the residual Jacobian atxand the vectorvinu;jac_coord = (rows, cols, (vals, x) -> ....): sparse Jacobian atxin triplet format.
All other keyword arguments are passed through to the NLPModelMeta constructor.