API
NLPModels API
AmplNLReader implements the NLPModels API.
diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 7b57023..5ba8d62 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-25T11:59:53","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-02T20:07:10","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 4b474fd..04bb608 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,2 +1,2 @@ -
AmplNLReader implements the NLPModels API.
Settings
This document was generated with Documenter.jl version 1.4.1 on Saturday 25 May 2024. Using Julia version 1.10.3.
AmplNLReader implements the NLPModels API.
Settings
This document was generated with Documenter.jl version 1.7.0 on Wednesday 2 October 2024. Using Julia version 1.10.5.
This package provides an interface to optimization problems modeled in the AMPL modeling language.
Currently, only smooth problems are supported.
This package implements the NLPModels.jl API.
Interaction with AMPL models is realized by way of the AMPL Solver Library (ASL) as implemented by David Gay.
Most, but not all, AMPL models come in the form of a model file (problem.mod
) and a data file (problem.dat
). For this reason, AmplNLReader assumes that an nl
file is available. An nl
file is the result of decoding a model and, possibly, a data file to instantiate a concrete problem. One can be generated from the command line using
ampl -ogproblem problem.mod problem.dat
where problem
should be replaced with your problem's name.
For an introduction to the AMPL modeling language and background on the ASL, see
The following command should automatically download and install AmplNLReader.jl and its dependencies (Use ]
to enter pkg>
mode):
pkg> add AmplNLReader
+Home · AmplNLReader.jl AmplNLReader.jl documentation
This package provides an interface to optimization problems modeled in the AMPL modeling language.
Currently, only smooth problems are supported.
This package implements the NLPModels.jl API.
Interaction with AMPL models is realized by way of the AMPL Solver Library (ASL) as implemented by David Gay.
Most, but not all, AMPL models come in the form of a model file (problem.mod
) and a data file (problem.dat
). For this reason, AmplNLReader assumes that an nl
file is available. An nl
file is the result of decoding a model and, possibly, a data file to instantiate a concrete problem. One can be generated from the command line using
ampl -ogproblem problem.mod problem.dat
where problem
should be replaced with your problem's name.
For an introduction to the AMPL modeling language and background on the ASL, see
- R. Fourer, D. M. Gay, and B. W. Kernighan, AMPL: A Mathematical Programming Language, Management Science 36, pp. 519-554, 1990.
- R. Fourer, D. M. Gay, and B. W. Kernighan, AMPL: A Modeling Language for Mathematical Programming, Duxbury Press / Brooks/Cole Publishing Company, 2003
- D. M. Gay, Hooking your Solver to AMPL, Technical Report 97-4-06, Computing Sciences Research Center, Bell Laboratories, Murray Hill, NJ, 1997.
- D. Orban, The Lightning AMPL Tutorial. A Guide for Nonlinear Optimization Users, GERAD Technical Report G-2009-66, 2009.
Installing
The following command should automatically download and install AmplNLReader.jl and its dependencies (Use ]
to enter pkg>
mode):
pkg> add AmplNLReader
pkg> build AmplNLReader
pkg> test AmplNLReader
Usage
julia> using AmplNLReader
@@ -21,4 +21,4 @@
x0 = 1x3 Array{Float64,2}:
0.0 0.0 3.0
y0 = 1x2 Array{Float64,2}:
- -0.0 -0.0
There is support for holding multiple models in memory simultaneously. This should be transparent to the user.
Check the NLPModels API for details on the complete API.
Contents
Settings
This document was generated with Documenter.jl version 1.4.1 on Saturday 25 May 2024. Using Julia version 1.10.3.
+ -0.0 -0.0
There is support for holding multiple models in memory simultaneously. This should be transparent to the user.
Check the NLPModels API for details on the complete API.
Settings
This document was generated with Documenter.jl version 1.7.0 on Wednesday 2 October 2024. Using Julia version 1.10.5.
AmplNLReader.AmplNLPMeta
— TypeAmplNLPMeta <: AbstractNLPModelMeta
A composite type that represents the main features of the optimization problem
optimize obj(x)
+Reference · AmplNLReader.jl Reference
Contents
Index
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 programname
: problem name
sourceSettings
This document was generated with Documenter.jl version 1.4.1 on Saturday 25 May 2024. Using Julia version 1.10.3.
+ 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 programname
: problem nameSettings
This document was generated with Documenter.jl version 1.7.0 on Wednesday 2 October 2024. Using Julia version 1.10.5.