JuliaSmoothOptimizers / CUTEst.jl

Julia's CUTEst Interface
GNU Lesser General Public License v3.0
48 stars 20 forks source link
cutest julia julia-language nlpmodels optimization

CUTEst.jl: Julia's CUTEst Interface

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.jl.

Stable release Github release DOI

Development version

How to Cite

If you use CUTEst.jl in your work, please cite using the format given in CITATION.cff.

Installing

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

Usage

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")

To retrieve the list of available SIF problems, use the function list_sif_problems:

using CUTEst

available_problems = list_sif_problems()

If you want to retrieve only problems with specific properties, you can use the function select_sif_problems:

using CUTEst

filtered_problems = select_sif_problems(; min_var=10, max_var=100, only_linear_con=true)

Tutorial

You can check an Introduction to CUTEst.jl on our site.

Related Packages

GPLv3