API Reference

This page documents the types and functions shared by the benchmark problems.

Evaluation

General constraints use the representation $l_c \leq c(x) \leq u_c$, stored in prob.lcon and prob.ucon. Rows with equal lower and upper bounds are equalities; all other rows are inequalities. Objective and constraint derivatives have separate evaluation functions.

Derivative metadata records whether an analytical evaluator is registered; it does not assert differentiability at every boundary point of a benchmark's domain. Family pages document problem-specific restrictions, and registered evaluators may throw a DomainError where an analytical derivative is undefined.

MOProblems.eval_fFunction
eval_f(prob::MOProblem, x::AbstractVector{T})

Evaluate all objective functions of prob at x.

x must have length prob.nvar. The returned vector has length prob.nobj and element type T.

source
eval_f(prob::MOProblem, x::AbstractVector{T}, i::Int)

Evaluate the i-th objective function of prob at x.

x must have length prob.nvar, and i must be between 1 and prob.nobj. The returned scalar has type T.

source
MOProblems.eval_f!Function
eval_f!(y, prob::MOProblem, x::AbstractVector{T})

Evaluate all objective functions of prob at x and write the result to y.

x must have length prob.nvar, and y must have length prob.nobj. Values are stored using the numeric type T of x.

Returns y.

source
MOProblems.eval_cFunction
eval_c(prob::MOProblem, x::AbstractVector{T})

Evaluate the constraint mapping c(x).

The returned vector has length prob.ncon and element type T. An unconstrained problem returns an empty vector.

source
eval_c(prob::MOProblem, x::AbstractVector{T}, i::Int)

Evaluate the i-th constraint function at x.

source
MOProblems.eval_c!Function
eval_c!(values, prob::MOProblem, x::AbstractVector{T})

Evaluate the constraint mapping c(x) and write it to values.

x must have length prob.nvar, and values must have length prob.ncon. Each constraint is interpreted together with prob.lcon and prob.ucon as prob.lcon[i] <= c_i(x) <= prob.ucon[i].

Returns values.

source
MOProblems.eval_jacobianFunction
eval_jacobian(prob::MOProblem, x::AbstractVector{T})

Evaluate the Jacobian matrix of the objective functions at x.

x must have length prob.nvar. The returned matrix has size (prob.nobj, prob.nvar) and element type T; each row is the gradient of one objective.

Throws an error if prob has no registered analytical Jacobian.

source
MOProblems.eval_jacobian!Function
eval_jacobian!(J, prob::MOProblem, x::AbstractVector{T})

Evaluate the registered Jacobian matrix of the objective functions at x and write the result to J.

x must have length prob.nvar, and J must have size (prob.nobj, prob.nvar). Each row of J is the gradient of one objective.

Returns J. Throws an error if prob has no registered analytical Jacobian.

source
MOProblems.eval_jacobian_rowFunction
eval_jacobian_row(prob::MOProblem, x::AbstractVector{T}, i::Int)

Evaluate the i-th row of the Jacobian matrix at x.

x must have length prob.nvar, and i must be between 1 and prob.nobj. The returned vector has length prob.nvar and element type T.

Throws an error if prob has no registered analytical Jacobian.

source
MOProblems.eval_jacobian_row!Function
eval_jacobian_row!(row, prob::MOProblem, x::AbstractVector{T}, i::Int)

Evaluate the i-th row of the Jacobian matrix at x and write the result to row.

x and row must both have length prob.nvar, and i must be between 1 and prob.nobj.

Returns row. Throws an error if prob has no registered analytical Jacobian.

source
MOProblems.eval_constraint_jacobianFunction
eval_constraint_jacobian(prob::MOProblem, x::AbstractVector{T})

Evaluate the registered Jacobian of c(x).

The returned matrix has size (prob.ncon, prob.nvar) and element type T.

source
MOProblems.eval_constraint_jacobian!Function
eval_constraint_jacobian!(J, prob::MOProblem, x::AbstractVector{T})

Evaluate the registered Jacobian of c(x) and write it to J.

J must have size (prob.ncon, prob.nvar). Each row contains the gradient of one scalar constraint. Throws an error when an analytical constraint Jacobian is not registered.

source
MOProblems.eval_hessianFunction
eval_hessian(prob::MOProblem, x::AbstractVector{T})

Evaluate the Hessian matrices of all objectives at x.

x must have length prob.nvar. The returned vector has length prob.nobj; each entry is a (prob.nvar, prob.nvar) matrix with element type T.

Throws an error if prob has no registered analytical Hessian.

source
MOProblems.eval_hessian!Function
eval_hessian!(Hs, prob::MOProblem, x::AbstractVector{T})

Evaluate the Hessian matrices of all objectives at x.

x must have length prob.nvar, Hs must have length prob.nobj, and each entry of Hs must have size (prob.nvar, prob.nvar).

Returns Hs. Throws an error if prob has no registered analytical Hessian.

source
MOProblems.eval_hessian_rowFunction
eval_hessian_row(prob::MOProblem, x::AbstractVector{T}, i::Int)

Evaluate the Hessian matrix of the i-th objective at x.

x must have length prob.nvar, and i must be between 1 and prob.nobj. The returned matrix has size (prob.nvar, prob.nvar) and element type T.

Throws an error if prob has no registered analytical Hessian.

source
MOProblems.eval_hessian_row!Function
eval_hessian_row!(H, prob::MOProblem, x::AbstractVector{T}, i::Int)

Evaluate the Hessian matrix of the i-th objective at x and write the result to H.

x must have length prob.nvar, H must have size (prob.nvar, prob.nvar), and i must be between 1 and prob.nobj.

Returns H. Throws an error if prob has no registered analytical Hessian.

source
MOProblems.eval_constraint_hessianFunction
eval_constraint_hessian(prob::MOProblem, x::AbstractVector{T})

Evaluate all registered constraint Hessians.

The returned vector has length prob.ncon; each matrix has size (prob.nvar, prob.nvar) and element type T.

source

Catalog

MOProblems.get_problem_namesFunction
get_problem_names()

Return the names of all available problems.

This function queries the static metadata (META) to list all problems implemented in the package, regardless of whether they have been instantiated.

Returns

A vector of strings containing the names of all available problems.

Example

names = get_problem_names()
println("Available problems: ", names)

# Filter problems by properties
strict_problems = filter_problems(any_strictly_convex=true)
bounded_problems = filter_problems(has_bounds=true)
source
MOProblems.filter_problemsFunction
filter_problems(;
    name_pattern::Union{Nothing, String, Regex} = nothing,
    min_vars::Int = 0,
    max_vars::Int = typemax(Int),
    min_objs::Int = 0,
    max_objs::Int = typemax(Int),
    dimension_type::Union{Nothing, Type{<:AbstractDimensionSpec}} = nothing,
    has_bounds::Union{Nothing, Bool} = nothing,
    has_jacobian::Union{Nothing, Bool} = nothing,
    has_hessian::Union{Nothing, Bool} = nothing,
    min_con_eq::Int = 0,
    max_con_eq::Int = typemax(Int),
    min_con_ineq::Int = 0,
    max_con_ineq::Int = typemax(Int),
    has_constraint_jacobian::Union{Nothing, Bool} = nothing,
    has_constraint_hessian::Union{Nothing, Bool} = nothing,
    any_strictly_convex::Union{Nothing, Bool} = nothing,
    all_strictly_convex::Union{Nothing, Bool} = nothing
)

Filter problems based on specific criteria.

Arguments

  • name_pattern::Union{Nothing, String, Regex}: pattern to match problem names.
  • min_vars::Int: minimum number of variables in the default instance.
  • max_vars::Int: maximum number of variables in the default instance.
  • min_objs::Int: minimum number of objectives in the default instance.
  • max_objs::Int: maximum number of objectives in the default instance.
  • dimension_type: required subtype of AbstractDimensionSpec.
  • has_bounds::Union{Nothing, Bool}: whether the problem has bounds.
  • has_jacobian::Union{Nothing, Bool}: whether an analytical Jacobian evaluator is registered.
  • has_hessian::Union{Nothing, Bool}: whether the problem has an analytical Hessian.
  • min_con_eq::Int: minimum number of equality constraints.
  • max_con_eq::Int: maximum number of equality constraints.
  • min_con_ineq::Int: minimum number of inequality constraints.
  • max_con_ineq::Int: maximum number of inequality constraints.
  • has_constraint_jacobian::Union{Nothing, Bool}: whether analytical first derivatives of the constraints are registered.
  • has_constraint_hessian::Union{Nothing, Bool}: whether analytical second derivatives of the constraints are registered.
  • any_strictly_convex::Union{Nothing, Bool}: whether at least one objective is strictly convex.
  • all_strictly_convex::Union{Nothing, Bool}: whether all objectives are strictly convex.

Returns

A sorted list of problem names satisfying all criteria.

source

Core Types

MOProblems.MOProblemType
MOProblem

Concrete evaluable instance of a benchmark problem.

Benchmark constructors such as ZDT1() and AP1() return MOProblem instances. Static catalog information belongs to ProblemMeta; MOProblem only stores the effective dimensions and the callables needed by the evaluation API. General constraints follow lcon <= c(x) <= ucon; equalities are the rows for which the corresponding lower and upper bounds are equal.

source
MOProblems.ProblemMetaType
ProblemMeta

Typed metadata for a benchmark problem in the package catalog. Dimension data is owned exclusively by dimension. Constraint counts distinguish equalities from inequalities, while derivative flags for objectives and constraints are tracked independently.

source
MOProblems.CoupledDimensionType
CoupledDimension(default_nvar, default_nobj)

Coupled dimensions specified by their default nvar and nobj values. Other instances preserve the difference between those defaults.

source