The main goal of CUTEst.jl is to create a CUTEstModel, which rely on the API provided by NLPModels.jl.

CUTEst.CUTEstModelType
CUTEstModel{T}(name, args...; kwargs...)
CUTEstModel(name, args...; precision::Symbol=:double, decode::Bool=true,
            verbose::Bool=false, efirst::Bool=true, lfirst::Bool=true, lvfirst::Bool=true)

Creates a CUTEstModel following the API of NLPModels.jl. This model must be finalized before creating a new one with the same name and precision T. Finalize the current model by calling finalize(nlp) to avoid conflicts.

Arguments

  • name::AbstractString: The name of the SIF problem to load.
  • args...: Additional arguments passed directly to sifdecoder. These can be used to change parameters of the model.

Keyword arguments

  • precision::Symbol: Specifies the precision of the CUTEstModel. Options are :single, :double (default), or :quadruple. This keyword argument is not supported when using a constructor with a data type T.
  • decode::Bool: Whether to call sifdecoder. Defaults to true.
  • verbose::Bool: If true, enables verbose output during the decoding process. Passed to sifdecoder.
  • efirst::Bool: If true, places equality constraints first.
  • lfirst::Bool: If true, places linear (or affine) constraints first.
  • lvfirst::Bool: If true, places nonlinear variables first.
Warning

The second constructor based on the keyword argument precision is type-unstable.

Coexistance of multiple CUTEst models

Each CUTEstModel is, in theory, independent, and we can create as many models as we want :

  • all CUTEstModel instances are based on different problems
  • all CUTEstModel instances are based on the same problem but with different precisions
Warning

If we have CUTEstModel instances for the same problem and precision, but with variable parameters (such as size), we encounter an issue due to the shared library generated after decoding the problem, suffixed only with the name of the problem and its precision.

Examples

using CUTEst

# Create a CUTEstModel with the name "CHAIN" and a parameter adjustment
nlp = CUTEstModel{Float64}("CHAIN", "-param", "NH=50")
display(nlp)
finalize(nlp)  # Finalize the current model

# Create another CUTEstModel with different parameters
nlp = CUTEstModel{Float64}("CHAIN", "-param", "NH=100")
display(nlp)
finalize(nlp)  # Finalize the new model
source