CUTEst.select_sif_problemsFunction
select_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 and max_var: set lower and upper bounds on the number of variables.

  • min_con and max_con: set lower and upper bounds on the number of linear or nonlinear constraints (excluding simple bounds on variables). ⚠ max_con=0 means: 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.

  • objtype: filter by type of objective function, following the MASTSIF classification. Accepts a number, symbol, string, or an array of these:

    • 1, :none or "none": no objective function
    • 2, :constant or "constant"
    • 3, :linear or "linear"
    • 4, :quadratic or "quadratic"
    • 5, :sum_of_squares or "sum_of_squares"
    • 6, :other or "other"
  • contype: filter by type of constraints, also from MASTSIF:

    • 1, :unc or "unc": truly unconstrained — no linear/nonlinear constraints and no variable bounds
    • 2, :fixed_vars or "fixed_vars": only fixed variables
    • 3, :bounds or "bounds": only variable bounds
    • 4, :network or "network"
    • 5, :linear or "linear": linear constraints
    • 6, :quadratic or "quadratic"
    • 7, :other or "other"

Important difference:

  • max_con=0 keeps 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: ```julia filter(p -> istrulyunconstrained(p), selectsifproblems())

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 = selectsifproblems(; minvar=10, maxvar=100, onlylinearcon=true)

Problems without nonlinear or linear constraints (may still have bounds)

filtered2 = selectsifproblems(; max_con=0)

Problems that are truly unconstrained: no constraints and no variable bounds

filtered3 = filter(istrulyunconstrained, selectsifproblems())

Problems with at least one constraint

filtered4 = selectsifproblems(; min_con=1)

source
CUTEst.build_classificationFunction
build_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.

source
CUTEst.generator_sif_problemsFunction
generator_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 .SIF extension) that satisfy the filter.

Example

for name in generator_sif_problems()
    println(name)
end
source