# Conic Constraints

A collection of classes that provide an easy and performant way to declare conic constraints. The Mosek solver interface includes special handling of these objects that recognizes them as convex constraints. Other solver interfaces will treat these objects as general nonlinear or quadratic expressions, and may or may not have the ability to identify their convexity.

## Summary

 `pyomo.core.kernel.conic.quadratic`(r, x) A quadratic conic constraint of the form: `pyomo.core.kernel.conic.rotated_quadratic`(r1, ...) A rotated quadratic conic constraint of the form: `pyomo.core.kernel.conic.primal_exponential`(r, ...) A primal exponential conic constraint of the form: `pyomo.core.kernel.conic.primal_power`(r1, r2, ...) A primal power conic constraint of the form: `pyomo.core.kernel.conic.dual_exponential`(r, ...) A dual exponential conic constraint of the form: `pyomo.core.kernel.conic.dual_power`(r1, r2, ...) A dual power conic constraint of the form:

## Member Documentation

class `pyomo.core.kernel.conic.``quadratic`(r, x)[source]

Bases: `_ConicBase`

A quadratic conic constraint of the form:

x^2 + … + x[n-1]^2 <= r^2,

which is recognized as convex for r >= 0.

Parameters: r (`variable`) – A variable. x (list[`variable`]) – An iterable of variables.
classmethod `as_domain`(r, x)[source]

Builds a conic domain. Input arguments take the same form as those of the conic constraint, but in place of each variable, one can optionally supply a constant, linear expression, or None.

Returns: A block object with the core conic constraint (block.q) expressed using auxiliary variables (block.r, block.x) linked to the input arguments through auxiliary constraints (block.c). block
`check_convexity_conditions`(relax=False)[source]

Returns True if all convexity conditions for the conic constraint are satisfied. If relax is True, then variable domains are ignored and it is assumed that all variables are continuous.

class `pyomo.core.kernel.conic.``rotated_quadratic`(r1, r2, x)[source]

Bases: `_ConicBase`

A rotated quadratic conic constraint of the form:

x^2 + … + x[n-1]^2 <= 2*r1*r2,

which is recognized as convex for r1,r2 >= 0.

Parameters: r1 (`variable`) – A variable. r2 (`variable`) – A variable. x (list[`variable`]) – An iterable of variables.
classmethod `as_domain`(r1, r2, x)[source]

Builds a conic domain. Input arguments take the same form as those of the conic constraint, but in place of each variable, one can optionally supply a constant, linear expression, or None.

Returns: A block object with the core conic constraint (block.q) expressed using auxiliary variables (block.r1, block.r2, block.x) linked to the input arguments through auxiliary constraints (block.c). block
`check_convexity_conditions`(relax=False)[source]

Returns True if all convexity conditions for the conic constraint are satisfied. If relax is True, then variable domains are ignored and it is assumed that all variables are continuous.

class `pyomo.core.kernel.conic.``primal_exponential`(r, x1, x2)[source]

Bases: `_ConicBase`

A primal exponential conic constraint of the form:

x1*exp(x2/x1) <= r,

which is recognized as convex for x1,r >= 0.

Parameters: r (`variable`) – A variable. x1 (`variable`) – A variable. x2 (`variable`) – A variable.
classmethod `as_domain`(r, x1, x2)[source]

Builds a conic domain. Input arguments take the same form as those of the conic constraint, but in place of each variable, one can optionally supply a constant, linear expression, or None.

Returns: A block object with the core conic constraint (block.q) expressed using auxiliary variables (block.r, block.x1, block.x2) linked to the input arguments through auxiliary constraints (block.c). block
`check_convexity_conditions`(relax=False)[source]

Returns True if all convexity conditions for the conic constraint are satisfied. If relax is True, then variable domains are ignored and it is assumed that all variables are continuous.

class `pyomo.core.kernel.conic.``primal_power`(r1, r2, x, alpha)[source]

Bases: `_ConicBase`

A primal power conic constraint of the form:
sqrt(x^2 + … + x[n-1]^2) <= (r1^alpha)*(r2^(1-alpha))

which is recognized as convex for r1,r2 >= 0 and 0 < alpha < 1.

Parameters: r1 (`variable`) – A variable. r2 (`variable`) – A variable. x (list[`variable`]) – An iterable of variables. alpha (float, `parameter`, etc.) – A constant term.
classmethod `as_domain`(r1, r2, x, alpha)[source]

Builds a conic domain. Input arguments take the same form as those of the conic constraint, but in place of each variable, one can optionally supply a constant, linear expression, or None.

Returns: A block object with the core conic constraint (block.q) expressed using auxiliary variables (block.r1, block.r2, block.x) linked to the input arguments through auxiliary constraints (block.c). block
`check_convexity_conditions`(relax=False)[source]

Returns True if all convexity conditions for the conic constraint are satisfied. If relax is True, then variable domains are ignored and it is assumed that all variables are continuous.

class `pyomo.core.kernel.conic.``dual_exponential`(r, x1, x2)[source]

Bases: `_ConicBase`

A dual exponential conic constraint of the form:

-x2*exp((x1/x2)-1) <= r

which is recognized as convex for x2 <= 0 and r >= 0.

Parameters: r (`variable`) – A variable. x1 (`variable`) – A variable. x2 (`variable`) – A variable.
classmethod `as_domain`(r, x1, x2)[source]

Builds a conic domain. Input arguments take the same form as those of the conic constraint, but in place of each variable, one can optionally supply a constant, linear expression, or None.

Returns: A block object with the core conic constraint (block.q) expressed using auxiliary variables (block.r, block.x1, block.x2) linked to the input arguments through auxiliary constraints (block.c). block
`check_convexity_conditions`(relax=False)[source]

Returns True if all convexity conditions for the conic constraint are satisfied. If relax is True, then variable domains are ignored and it is assumed that all variables are continuous.

class `pyomo.core.kernel.conic.``dual_power`(r1, r2, x, alpha)[source]

Bases: `_ConicBase`

A dual power conic constraint of the form:

sqrt(x^2 + … + x[n-1]^2) <= ((r1/alpha)^alpha) * ((r2/(1-alpha))^(1-alpha))

which is recognized as convex for r1,r2 >= 0 and 0 < alpha < 1.

Parameters: r1 (`variable`) – A variable. r2 (`variable`) – A variable. x (list[`variable`]) – An iterable of variables. alpha (float, `parameter`, etc.) – A constant term.
classmethod `as_domain`(r1, r2, x, alpha)[source]

Builds a conic domain. Input arguments take the same form as those of the conic constraint, but in place of each variable, one can optionally supply a constant, linear expression, or None.

Returns: A block object with the core conic constraint (block.q) expressed using auxiliary variables (block.r1, block.r2, block.x) linked to the input arguments through auxiliary constraints (block.c). block
`check_convexity_conditions`(relax=False)[source]

Returns True if all convexity conditions for the conic constraint are satisfied. If relax is True, then variable domains are ignored and it is assumed that all variables are continuous.