Skip to contents

ConvexOptimizationProblem(f, u0, p, constraints, lb, ub, int, sense) is the experimental convex optimization problem of SciMLBase: an objective f(u, p) (or an OptimizationFunction()), a start, conic constraints, optional bounds (both or neither), a mask int of integer variables and the sense "MinSense" or "MaxSense". It is solved with ConvexMOI() and ConeConstraint() constraints. HomotopyNonlinearFunction(f, polynomialize, unpolynomialize, denominator, polynomial_jac) is the polynomial form of a nonlinear system for homotopy continuation, with the maps between the original and the polynomial variables. ODEInputFunction(f, ...) is the right hand side f(x, u, p, t) of a system with states x and inputs u, with optional derivatives (jac with respect to x, controljac with respect to u).

Usage

ConvexOptimizationProblem(
  f,
  u0,
  p = NullParameters(),
  constraints = NULL,
  lb = NULL,
  ub = NULL,
  int = NULL,
  sense = c("MinSense", "MaxSense"),
  ...
)

HomotopyNonlinearFunction(
  f,
  polynomialize = function(u, p) u,
  unpolynomialize = function(u, p) list(u),
  denominator = NULL,
  polynomial_jac = NULL,
  ...
)

ODEInputFunction(
  f,
  mass_matrix = NULL,
  analytic = NULL,
  tgrad = NULL,
  jac = NULL,
  controljac = NULL,
  jvp = NULL,
  vjp = NULL,
  jac_prototype = NULL,
  controljac_prototype = NULL,
  sparsity = jac_prototype,
  paramjac = NULL,
  observed = NULL,
  sys = NULL
)

Arguments

f

The objective, residual or right hand side.

u0

The start.

p

The parameters.

constraints

Constraints, or NULL.

lb, ub

Bounds, or NULL.

int

A logical mask of integer variables, or NULL.

sense

"MinSense" or "MaxSense", or the objects MinSense and MaxSense.

...

Further fields.

polynomialize, unpolynomialize

Maps from the original variables to the polynomial ones and back.

denominator

The denominators of the polynomial form.

polynomial_jac

The Jacobian of the polynomial form.

mass_matrix, analytic, tgrad, jac, controljac, jvp, vjp, jac_prototype, controljac_prototype, sparsity, paramjac, observed, sys

Optional parts of the function.

Value

An object of the named class.

Examples

cp <- ConvexOptimizationProblem(function(u, p) sum(u^2), c(1, 2), lb = c(0, 0), ub = c(3, 3))
cp$sense
#> [1] "MinSense"
hf <- HomotopyNonlinearFunction(function(u, p) u^2 - 2)
hf$f(2, NULL)
#> [1] 2
inf <- ODEInputFunction(function(x, u, p, t) -x + u)
inf$f(1, 0.5, NULL, 0)
#> [1] -0.5