CUTEst.select_sif_problems
— Functionselect_sif_problems(; min_var=1, max_var=Inf, min_con=0, max_con=Inf,
objtype=*, contype=*, only_free_var=false,
only_bnd_var=false, only_linear_con=false,
only_nonlinear_con=false, only_equ_con=false,
only_ineq_con=false, custom_filter=*)
Returns a subset of the CUTEst problems using the classification file classf.json
.
Keyword arguments
min_var
andmax_var
set the number of variables in the problem;min_con
andmax_con
set the number of constraints in the problem (usemax_con=0
for unconstrained ormin_con=1
for constrained);only_*
flags are self-explaining. Note that they appear in conflicting pairs. Both can be false, but only one can be true.objtype
is the classification of the objective function according to the MASTSIF classification. It can be a number, a symbol, a string, or an array of those.1
,:none
or"none"
means there is no objective function;2
,:constant
or"constant"
means the objective function is a constant;3
,:linear
or"linear"
means the objective function is a linear functional;4
,:quadratic
or"quadratic"
means the objective function is quadratic;5
,:sum_of_squares
or"sum_of_squares"
means the objective function is a sum of squares;6
,:other
or"other"
means the objective function is none of the above.
contype
is the classification of the constraints according to the same MASTSIF classification file.1
,:unc
or"unc"
means there are no constraints at all;2
,:fixed_vars
or"fixed_vars"
means the only constraints are fixed variables;3
,:bounds
or"bounds"
means the only constraints are bounded variables;4
,:network
or"network"
means the constraints represent the adjacency matrix of a (linear) network;5
,:linear
or"linear"
means the constraints are linear;6
,:quadratic
or"quadratic"
means the constraints are quadratic;7
,:other
or"other"
means the constraints are more general.
custom_filter
: A function to apply additional filtering to the problem data. This data is provided as a dictionary with the following fields:"objtype"
: String representing the objective function type. It can be one of the following:"none"
,"constant"
,"linear"
,"quadratic"
,"sum_of_squares"
,"other"
"contype"
: String representing the constraint type. It can be one of the following:"unc"
,"fixed_vars"
,"bounds"
,"network"
,"linear"
,"quadratic"
,"other"
"regular"
: Boolean indicating whether the problem is regular or not."derivative_order"
: Integer representing the order of the highest derivative available.
"origin"
: String indicating the origin of the problem. Possible values are"academic"
,"modelling"
, or"real"
."has_interval_var"
: Boolean indicating whether the problem includes interval variables."variables"
: Dictionary with fields related to variables:"can_choose"
: Boolean indicating whether you can change the number of variables via parameters."number"
: Integer representing the number of variables (default if"can_choose"
is true)."fixed"
: Integer representing the number of fixed variables."free"
: Integer representing the number of free variables."bounded_below"
: Integer representing the number of variables bounded only from below."bounded_above"
: Integer representing the number of variables bounded only from above."bounded_both"
: Integer representing the number of variables bounded from both below and above.
"constraints"
: Dictionary with fields related to constraints:"can_choose"
: Boolean indicating whether you can change the number of constraints via parameters."number"
: Integer representing the number of constraints (default if"can_choose"
is true)."equality"
: Integer representing the number of equality constraints."ineq_below"
: Integer representing the number of inequalities of the formc(x) ≥ cl
."ineq_above"
: Integer representing the number of inequalities of the formc(x) ≤ cu
."ineq_both"
: Integer representing the number of inequalities of the formcl ≤ c(x) ≤ cu
."linear"
: Integer representing the number of linear constraints."nonlinear"
: Integer representing the number of nonlinear constraints.
filtered_problems1 = select_sif_problems(; min_var=10, max_var=100, only_linear_con=true)
filtered_problems2 = select_sif_problems(; max_con=0)
filtered_problems3 = select_sif_problems(; min_con=1)
CUTEst.build_classification
— Functionbuild_classification()
Creates the file classf.json
, running each problem in CLASSF.DB
and extracting the necessary information. It should be left alone, unless you think it is not updated. If you do, please open an issue.