Reference
Contents
Index
AmplNLReader.AmplMPECModel
— TypeAmplMPECModel
Smooth reformulation for an Ampl model with complementarity constraints.
The nonlinear program
\[\begin{aligned} min_x \quad & f(x)\\ \mathrm{s.t.} \quad & c_L ≤ c(x) ≤ c_U,\\ & g_L ≤ g(x) ⟂ x ≥ x_L, \end{aligned}\]
is reformulated as
\[\begin{aligned} min_x \quad & f(x)\\ \mathrm{s.t.} \quad & c_L ≤ c(x) ≤ c_U,\\ & g_L ≤ g(x) \\ & x_L ≤ x \\ & Diag(g(x)) x ≤ 0 \end{aligned}\]
Return the original model if it does not have complementarity constraints.
AmplNLReader.AmplNLPMeta
— TypeAmplNLPMeta <: 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.
AmplNLPMeta(nvar; kwargs...)
Create an AmplNLPMeta
with nvar
variables. The following keyword arguments are accepted:
x0
: initial guesslvar
: vector of lower boundsuvar
: vector of upper boundsnbv
: number of linear binary variablesniv
: number of linear non-binary integer variablesnlvb
: number of nonlinear variables in both objectives and constraintsnlvo
: number of nonlinear variables in objectives (includes nlvb)nlvc
: number of nonlinear variables in constraints (includes nlvb)nlvbi
: number of integer nonlinear variables in both objectives and constraintsnlvci
: number of integer nonlinear variables in constraints onlynlvoi
: number of integer nonlinear variables in objectives onlynwv
: number of linear network (arc) variablesncon
: number of general constraintsy0
: initial Lagrange multiplierslcon
: vector of constraint lower boundsucon
: vector of constraint upper boundsnnzo
: number of nonzeros in all objectives gradientsnnzj
: number of elements needed to store the nonzeros in the sparse Jacobianlin_nnzj
: number of elements needed to store the nonzeros in the sparse Jacobian of linear constraintsnln_nnzj
: number of elements needed to store the nonzeros in the sparse Jacobian of nonlinear constraintsnnzh
: number of elements needed to store the nonzeros in the sparse Hessiannlin
: number of linear constraintsnnln
: number of nonlinear general constraintsnnnet
: number of nonlinear network constraintsnlnet
: number of linear network constraintslin
: indices of linear constraintsnln
: indices of nonlinear constraintsnnet
: indices of nonlinear network constraintslnet
: indices of linear network constraintsminimize
: true if optimize == minimizenlo
: number of nonlinear objectivesislp
: true if the problem is a linear programn_cc
: number of complementarity constraintscvar
: indices of variables appearing in complementarity constraints (0 if constraint is regular)name
: problem name