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_varandmax_var: set lower and upper bounds on the number of variables.min_conandmax_con: set lower and upper bounds on the number of linear or nonlinear constraints (excluding simple bounds on variables). ⚠max_con=0means: keep only problems with no nonlinear or linear constraints; variable bounds are not counted as constraints here, so bound-constrained problems will still be included.only_*flags: mutually exclusive filters to select problems with only:- free variables (
only_free_var=true) - bounded variables (
only_bnd_var=true) - linear constraints (
only_linear_con=true) - nonlinear constraints (
only_nonlinear_con=true) - equality constraints (
only_equ_con=true) - inequality constraints (
only_ineq_con=true)
These can all be false, but at most one can be true.
- free variables (
objtype: filter by type of objective function, following the MASTSIF classification. Accepts a number, symbol, string, or an array of these:1,:noneor"none": no objective function2,:constantor"constant"3,:linearor"linear"4,:quadraticor"quadratic"5,:sum_of_squaresor"sum_of_squares"6,:otheror"other"
contype: filter by type of constraints, also from MASTSIF:1,:uncor"unc": truly unconstrained — no linear/nonlinear constraints and no variable bounds2,:fixed_varsor"fixed_vars": only fixed variables3,:boundsor"bounds": only variable bounds4,:networkor"network"5,:linearor"linear": linear constraints6,:quadraticor"quadratic"7,:otheror"other"
⚠ Important difference:
max_con=0keeps problems that may still have variable bounds (i.e., bound-constrained).contype="unc"keeps only problems that have no constraints at all (no nonlinear constraints, no linear constraints, and no bounds).
If you want to filter by truly unconstrained problems after selection, use:
filter(p -> is_truly_unconstrained(p), select_sif_problems())custom_filter: a function for additional filtering. Receives a dictionary with metadata, for example:
"objtype": "none", "constant", "linear", "quadratic", "sum_of_squares", "other"
"contype": "unc", "fixed_vars", "bounds", "network", "linear", "quadratic", "other"
"regular": Bool
"derivative_order": Int
"origin": "academic", "modelling", "real"
"has_interval_var": Bool
"variables": number and types of variables ("number", "fixed", "free", etc.)
"constraints": number and types of constraints ("number", "linear", "nonlinear", etc.)Examples
Problems with 10–100 variables and only linear constraints
filtered1 = select_sif_problems(; min_var=10, max_var=100, only_linear_con=true)Problems without nonlinear or linear constraints (may still have bounds)
filtered2 = select_sif_problems(; max_con=0)Problems that are truly unconstrained: no constraints and no variable bounds
filtered3 = filter(is_truly_unconstrained, select_sif_problems())Problems with at least one constraint
filtered4 = 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.
CUTEst.generator_sif_problems — Functiongenerator_sif_problems(; libsif_folder=libsif_path, filter=name -> true)Return a generator of problem names in the libsif_folder satisfying the filter predicate.
Arguments
libsif_folder: Directory to look for SIF files (default:libsif_path).filter: Function to filter problem names (default: include all,name -> true).
Returns
- A generator of problem names (without
.SIFextension) that satisfy thefilter.
Example
for name in generator_sif_problems()
println(name)
end