# Models

The following is a list of packages implement the NLPModels API.

If you want your package listed here, open a Pull Request.

If you want to create your own interface, check these Guidelines.

## Model internals

NLPModels.NLPModelMetaType
NLPModelMeta <: AbstractNLPModelMeta

A composite type that represents the main features of the optimization problem

optimize    obj(x)
subject to  lvar ≤    x    ≤ uvar
lcon ≤ cons(x) ≤ ucon

where x is an nvar-dimensional vector, obj is the real-valued objective function, cons is the vector-valued constraint function, optimize is either "minimize" or "maximize".

Here, lvar, uvar, lcon and ucon are vectors. Some of their components may be infinite to indicate that the corresponding bound or general constraint is not present.

NLPModelMeta(nvar; kwargs...)

Create an NLPModelMeta with nvar variables. The following keyword arguments are accepted:

• x0: initial guess
• lvar: vector of lower bounds
• uvar: vector of upper bounds
• nlvb: number of nonlinear variables in both objectives and constraints
• nlvo: number of nonlinear variables in objectives (includes nlvb)
• nlvc: number of nonlinear variables in constraints (includes nlvb)
• ncon: number of general constraints
• y0: initial Lagrange multipliers
• lcon: vector of constraint lower bounds
• ucon: vector of constraint upper bounds
• nnzo: number of nonzeros in the gradient
• nnzj: number of elements needed to store the nonzeros in the sparse Jacobian
• nnzh: number of elements needed to store the nonzeros in the sparse Hessian
• nlin: number of linear constraints
• nnln: number of nonlinear general constraints
• lin: indices of linear constraints
• nln: indices of nonlinear constraints
• minimize: true if optimize == minimize
• islp: true if the problem is a linear program
• name: problem name
source
NLPModels.NLSMetaType
NLSMeta

Base type for metadata related to a nonlinear least-squares model.

NLSMeta(nequ, nvar; kwargs...)

Create a NLSMeta with nequ equations and nvar variables. The following keyword arguments are accepted:

• x0: initial guess
• nnzj: number of elements needed to store the nonzeros of the Jacobian of the residual
• nnzh: number of elements needed to store the nonzeros of the sum of Hessians of the residuals
• lin: indices of linear constraints
• nln: indices of nonlinear constraints
source
NLPModels.nls_metaFunction
nls_meta(nls)

Returns the nls_meta structure of nls. Use this instead of nls.nls_meta to handle models that have internal models.

For basic models nls_meta(nls) is defined as nls.nls_meta, but composite models might not keep nls_meta themselves, so they might specialize it to something like nls.internal.nls_meta.

source