solnp_standardize_problem: Standardize an Optimization Problem to NLP Standard Form

View source: R/benchmark_suite.R

solnp_standardize_problemR Documentation

Standardize an Optimization Problem to NLP Standard Form

Description

Converts a problem specified with two-sided inequalities and nonzero equality right-hand sides to the standard nonlinear programming (NLP) form.

Usage

solnp_standardize_problem(prob)

Arguments

prob

A list specifying the problem in SOLNP-compatible format, with components fn, eq_fn, eq_jac, eq_b, ineq_fn, ineq_jac, ineq_lower, ineq_upper, and others.

Details

The standard form given by the following set of equations:

\min_x\ f(x)

\textrm{subject to}\quad e(x) = 0

\qquad\qquad\qquad g(x) \leq 0

Specifically:

  • All equality constraints are standardized to e(x) = e(x) - b = 0

  • Each two-sided inequality l \leq g(x) \leq u is converted to one or two one-sided constraints: l - g(x) \leq 0, g(x) - u \leq 0

The returned problem object has all equalities as e(x) = 0, all inequalities as g(x) \leq 0, and any right-hand side or bounds are absorbed into the standardized constraint functions.

Value

A list with the same structure as the input, but with eq_fn and ineq_fn standardized to the forms e(x) = 0 and g(x) \leq 0, and with eq_b, ineq_lower, and ineq_upper removed.

See Also

solnp_problem_suite

Examples

# Alkylation problem
p <- solnp_problem_suite(suite = "Other", number = 1)
ps <- solnp_standardize_problem(p)
ps$eq_fn(ps$start)    # standardized equalities: e(x) = 0
ps$ineq_fn(ps$start)  # standardized inequalities: g(x) <= 0


Rsolnp documentation built on June 20, 2025, 5:07 p.m.