Skip to content

JuliaSmoothOptimizers/CUTEst.jl

Repository files navigation

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.

Stable release Github release DOI

  • Documentation: Documentation
  • Chat: Gitter

Development version

  • Documentation: Documentation
  • Tests: Build Status Coverage Status

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

SIF problems

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.

Related Packages

GPLv3