https://github.com/abelsiqueira/nlpmodels.jl
An NLP Interface for JuMP Models
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
An NLP Interface for JuMP Models
Basic Info
- Host: GitHub
- Owner: abelsiqueira
- License: other
- Language: Julia
- Default Branch: master
- Size: 1.22 MB
Statistics
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
- Releases: 0
Fork of JuliaSmoothOptimizers/NLPModels.jl
Created about 10 years ago
· Last pushed over 5 years ago
https://github.com/abelsiqueira/NLPModels.jl/blob/master/
# NLPModels
This package provides general guidelines to represent optimization problems in Julia and a standardized API to evaluate the functions and their derivatives.
The main objective is to be able to rely on that API when designing optimization solvers in Julia.
Cite as
Abel Soares Siqueira, & Dominique Orban. (2019, February 6). NLPModels.jl. Zenodo.
http://doi.org/10.5281/zenodo.2558627
[](https://doi.org/10.5281/zenodo.2558627)
[](https://github.com/JuliaSmoothOptimizers/NLPModels.jl/releases/latest)
[](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/stable)
[](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/latest)
[](https://travis-ci.org/JuliaSmoothOptimizers/NLPModels.jl)
[](https://ci.appveyor.com/project/dpo/nlpmodels-jl/branch/master)
[](https://cirrus-ci.com/github/JuliaSmoothOptimizers/NLPModels.jl)
[](https://coveralls.io/github/JuliaSmoothOptimizers/NLPModels.jl?branch=master)
## Optimization Problems
Optimization problems are represented by an instance of (a subtype of) `AbstractNLPModel`.
Such instances are composed of
* an instance of `NLPModelMeta`, which provides information about the problem, including the number of variables, constraints, bounds on the variables, etc.
* other data specific to the provenance of the problem.
See the
[documentation](https://JuliaSmoothOptimizers.github.io/NLPModels.jl/latest) for
details on the models, a tutorial and the API.
## Installation
```julia
pkg> add NLPModels
```
## External models
In addition to the models available in this package, there are some external models
for specific needs:
- [AmplNLReader.jl](https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl): Interface
for [AMPL](http://www.ampl.com/);
- [CUTEst.jl](https://github.com/JuliaSmoothOptimizers/CUTEst.jl): Interface for CUTEst
problems;
- [NLPModelsJuMP.jl](https://github.com/JuliaSmoothOptimizers/NLPModelsJuMP.jl):
Converts MathOptInterface/JuMP models to and from NLPModels.
## Main Methods
If `model` is an instance of an appropriate subtype of `AbstractNLPModel`, the following methods are normally defined:
* `obj(model, x)`: evaluate *f(x)*, the objective at `x`
* `cons(model x)`: evaluate *c(x)*, the vector of general constraints at `x`
The following methods are defined if first-order derivatives are available:
* `grad(model, x)`: evaluate *f(x)*, the objective gradient at `x`
* `jac(model, x)`: evaluate *J(x)*, the Jacobian of *c* at `x` as a sparse matrix
If Jacobian-vector products can be computed more efficiently than by evaluating the Jacobian explicitly, the following methods may be implemented:
* `jprod(model, x, v)`: evaluate the result of the matrix-vector product *J(x)v*
* `jtprod(model, x, u)`: evaluate the result of the matrix-vector product *J(x)u*
The following method is defined if second-order derivatives are available:
* `hess(model, x, y)`: evaluate *L(x,y)*, the Hessian of the Lagrangian at `x` and `y`
If Hessian-vector products can be computed more efficiently than by evaluating the Hessian explicitly, the following method may be implemented:
* `hprod(model, x, v, y)`: evaluate the result of the matrix-vector product *L(x,y)v*
Several in-place variants of the methods above may also be implemented.
The complete list of methods that an interface may implement can be found in the documentation.
## Attributes
`NLPModelMeta` objects have the following attributes:
Attribute | Type | Notes
------------|--------------------|------------------------------------
`nvar` | `Int ` | number of variables
`x0 ` | `Array{Float64,1}` | initial guess
`lvar` | `Array{Float64,1}` | vector of lower bounds
`uvar` | `Array{Float64,1}` | vector of upper bounds
`ifix` | `Array{Int64,1}` | indices of fixed variables
`ilow` | `Array{Int64,1}` | indices of variables with lower bound only
`iupp` | `Array{Int64,1}` | indices of variables with upper bound only
`irng` | `Array{Int64,1}` | indices of variables with lower and upper bound (range)
`ifree` | `Array{Int64,1}` | indices of free variables
`iinf` | `Array{Int64,1}` | indices of visibly infeasible bounds
`ncon` | `Int ` | total number of general constraints
`nlin ` | `Int ` | number of linear constraints
`nnln` | `Int ` | number of nonlinear general constraints
`nnet` | `Int ` | number of nonlinear network constraints
`y0 ` | `Array{Float64,1}` | initial Lagrange multipliers
`lcon` | `Array{Float64,1}` | vector of constraint lower bounds
`ucon` | `Array{Float64,1}` | vector of constraint upper bounds
`lin ` | `Range1{Int64} ` | indices of linear constraints
`nln` | `Range1{Int64} ` | indices of nonlinear constraints (not network)
`nnet` | `Range1{Int64} ` | indices of nonlinear network constraints
`jfix` | `Array{Int64,1}` | indices of equality constraints
`jlow` | `Array{Int64,1}` | indices of constraints of the form c(x) cl
`jupp` | `Array{Int64,1}` | indices of constraints of the form c(x) cu
`jrng` | `Array{Int64,1}` | indices of constraints of the form cl c(x) cu
`jfree` | `Array{Int64,1}` | indices of "free" constraints (there shouldn't be any)
`jinf` | `Array{Int64,1}` | indices of the visibly infeasible constraints
`nnzj` | `Int ` | number of nonzeros in the sparse Jacobian
`nnzh` | `Int ` | number of nonzeros in the sparse Hessian
`minimize` | `Bool ` | true if `optimize == minimize`
`islp` | `Bool ` | true if the problem is a linear program
`name` | `ASCIIString ` | problem name
Owner
- Name: Abel Soares Siqueira
- Login: abelsiqueira
- Kind: user
- Location: Amsterdam - The Netherlands
- Company: Netherlands eScience Center
- Website: https://abelsiqueira.com
- Twitter: abel_siqueira
- Repositories: 331
- Profile: https://github.com/abelsiqueira