View source: R/benchmark_suite.R
solnp_standardize_problem | R Documentation |
Converts a problem specified with two-sided inequalities and nonzero equality right-hand sides to the standard nonlinear programming (NLP) form.
solnp_standardize_problem(prob)
prob |
A list specifying the problem in SOLNP-compatible format, with components
|
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.
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.
solnp_problem_suite
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.