svec_psdcone

(class from pyomo.core.kernel.conic)

class pyomo.core.kernel.conic.svec_psdcone(x)[source]

Bases: _ConicBase

A domain consisting of vectorizations of the lower-triangular part of a positive semidefinite matrx, with the non-diagonal elements additionally rescaled. In other words, if a vector ‘x’ of length \(n = d(d+1)/2\) belongs to this cone, then the matrix:

\[\begin{split}\begin{array}{rcclcl} sMat(x) = [\;\; [& x[1], & x[2]/\sqrt{2}, &...,& x[d]/\sqrt{2} &], \\ [&x[2]/\sqrt{2},& x[d+1], &...,& x[2d-1]/\sqrt{2} &], \\ & & \vdots & & & \\ [&x[d]/\sqrt{2},&x[2d-1]/\sqrt{2},&...,&x[d(d+1)/2]/\sqrt{2}&] \;\;] \end{array}\end{split}\]

will be restricted to be a positive-semidefinite matrix.

Parameters:

x (variable) – An iterable of variables with length \(d(d+1)/2\).

__init__(x)[source]

Methods

__init__(x)

activate()

Activate this object.

as_domain(x)

Builds a conic domain.

check_convexity_conditions([relax])

Returns True if all convexity conditions for the conic constraint are satisfied.

clone()

Returns a copy of this object with the parent pointer set to None.

deactivate()

Deactivate this object.

getname([fully_qualified, name_buffer, ...])

Dynamically generates a name for this object.

has_lb()

Returns False when the lower bound is None or negative infinity

has_ub()

Returns False when the upper bound is None or positive infinity

to_bounded_expression([evaluate_bounds])

Attributes

active

The active status of this object.

body

The body of the constraint

bounds

The bounds of the constraint as a tuple (lb, ub)

ctype

The object's category type.

equality

A boolean indicating whether this is an equality constraint

expr

Get the expression on this constraint.

lb

The value of the lower bound of the constraint

local_name

The object's local name within the context of its parent.

lower

The expression for the lower bound of the constraint

lslack

Lower slack (body - lb).

name

The object's fully qualified name.

parent

The object's parent (possibly None).

rhs

The right-hand side of the constraint

slack

min(lslack, uslack).

storage_key

The object's storage key within its parent

ub

The value of the upper bound of the constraint

upper

The expression for the upper bound of the constraint

uslack

Upper slack (ub - body).

x

Member Documentation

activate()

Activate this object.

classmethod as_domain(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).

Return type:

block

check_convexity_conditions(relax=False)

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.

clone()

Returns a copy of this object with the parent pointer set to None.

A clone is almost equivalent to deepcopy except that any categorized objects encountered that are not descendents of this object will reference the same object on the clone.

deactivate()

Deactivate this object.

getname(fully_qualified=False, name_buffer={}, convert=<class 'str'>, relative_to=None)

Dynamically generates a name for this object.

Parameters:
  • fully_qualified (bool) – Generate a full name by iterating through all ancestor containers. Default is False.

  • convert (function) – A function that converts a storage key into a string representation. Default is the built-in function str.

  • relative_to (object) – When generating a fully qualified name, generate the name relative to this block.

Returns:

If a parent exists, this method returns a string representing the name of the object in the context of its parent; otherwise (if no parent exists), this method returns None.

has_lb()

Returns False when the lower bound is None or negative infinity

has_ub()

Returns False when the upper bound is None or positive infinity

property active

The active status of this object.

property body

The body of the constraint

property bounds

The bounds of the constraint as a tuple (lb, ub)

property ctype

The object’s category type.

property equality

A boolean indicating whether this is an equality constraint

property expr

Get the expression on this constraint.

property lb

The value of the lower bound of the constraint

property local_name

The object’s local name within the context of its parent. Alias for obj.getname(fully_qualified=False).

property lower

The expression for the lower bound of the constraint

property lslack

Lower slack (body - lb). Returns None if a value for the body can not be computed.

property name

The object’s fully qualified name. Alias for obj.getname(fully_qualified=True).

property parent

The object’s parent (possibly None).

property rhs

The right-hand side of the constraint

property slack

min(lslack, uslack). Returns None if a value for the body can not be computed.

property storage_key

The object’s storage key within its parent

property ub

The value of the upper bound of the constraint

property upper

The expression for the upper bound of the constraint

property uslack

Upper slack (ub - body). Returns None if a value for the body can not be computed.