The main goal of CUTEst.jl
is to create a CUTEstModel
, which rely on the API provided by NLPModels.jl
.
CUTEst.CUTEstModel
— TypeCUTEstModel{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 tosifdecoder
. These can be used to change parameters of the model.
Keyword arguments
precision::Symbol
: Specifies the precision of theCUTEstModel
. Options are:single
,:double
(default), or:quadruple
. This keyword argument is not supported when using a constructor with a data typeT
.decode::Bool
: Whether to callsifdecoder
. Defaults totrue
.verbose::Bool
: Iftrue
, enables verbose output during the decoding process. Passed tosifdecoder
.efirst::Bool
: Iftrue
, places equality constraints first.lfirst::Bool
: Iftrue
, places linear (or affine) constraints first.lvfirst::Bool
: Iftrue
, places nonlinear variables first.
The second constructor based on the keyword argument precision
is type-unstable.
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