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