This package provides an interface to CUTEst, a repository of constrained and unconstrained nonlinear programming problems for testing and comparing optimization algorithms, derived from the abstract model on NLPModels.
If you use CUTEst.jl in your work, please cite using the format given in CITATION.cff.
This package will automatically install the CUTEst binaries for your platform.
The gfortran
compiler is required to compile decoded SIF problems.
Users on all platforms except Windows must install it to use CUTEst.jl.
For Windows users, a small artifact containing gfortran.exe
is installed automatically.
No other Fortran compiler is supported.
The following command installs the CUTEst binaries and the Julia interface:
pkg> add CUTEst
After installation, you can create instances of
NLPModels models using
the CUTEstModel
constructor:
using CUTEst
nlp = CUTEstModel{Float64}("BYRDSPHR")
This model supports the same functions as other NLPModels, for example:
using NLPModels
fx = obj(nlp, nlp.meta.x0)
gx = grad(nlp, nlp.meta.x0)
Hx = hess(nlp, nlp.meta.x0)
cx = cons(nlp, nlp.meta.x0)
Jx = jac(nlp, nlp.meta.x0)
Problems can also be instantiated in single and quadruple precision:
using CUTEst, Quadmath
nlp_single = CUTEstModel{Float32}("BYRDSPHR")
nlp_quadruple = CUTEstModel{Float128}("BYRDSPHR")
A large collection of SIF files can be found here.
If the environment variable MASTSIF
is not set, CUTEst.jl
will automatically download the CUTEst
NLP test set the first time you use using CUTEst
.
Thanks to the function set_mastsif
, you can easily switch to the Maros-Meszaros QP test set
or the Netlib LP test set.
set_mastsif("sifcollection") # default set
set_mastsif("maros-meszaros")
set_mastsif("netlib-lp")
The constructor CUTEstModel{Float64}(name)
will try to find the SIF file associated with the problem name
in the current set.
- NLPModels.jl provides an AbstractModel from which CUTEstModel derives.
- AmplNLReader.jl provides an interface to AMPL models based on NLPModels.jl.
- NLPModelsJuMP.jl provides conversion from JuMP.jl / MathOptInterface.jl models to NLPModels.
- OptimizationProblems.jl provides a collection of optimization problems using the NLPModels.jl and JuMP.jl syntaxes.