picos.constraints.con_affine

Affine constraint types.

Classes

class picos.constraints.con_affine.AffineConstraint(lhs, relation, rhs, customString=None)[source]

Bases: picos.constraints.constraint.ConicConstraint

An equality or inequality between two affine expressions.

__init__(lhs, relation, rhs, customString=None)[source]

Construct an AffineConstraint.

Parameters
  • lhs (AffineExpression) – Left hand side expression.

  • relation (str) – Constraint relation symbol.

  • rhs (AffineExpression) – Right hand side expression.

  • customString (str) – Optional string description.

bounded_linear_form()[source]

Bounded linear form of the constraint.

Separates the constraint into a linear function on the left hand side and a constant bound on the right hand side.

Returns

A pair (linear, bound) where linear is a pure linear expression and bound is a constant expression.

property conic_membership_form[source]

Implement for ConicConstraint.

property ge0

Expression constrained to be greater than or equal to zero.

The expression posed to be greater than or equal to zero in case of an inequality, otherwise the left hand side minus the right hand side.

property greater

Greater-or-equal side of the constraint.

The greater-or-equal side expression in case of an inequality, otherwise the right hand side.

property le0

Expression constrained to be lower than or equal to zero.

The expression posed to be less than or equal to zero in case of an inequality, otherwise the left hand side minus the right hand side.

property lmr[source]

Left hand side minus right hand side.

property rml[source]

Right hand side minus left hand side.

property smaller

Smaller-or-equal side of the constraint.

The smaller-or-equal side expression in case of an inequality, otherwise the left hand side.

class picos.constraints.con_affine.ComplexAffineConstraint(lhs, rhs, customString=None)[source]

Bases: picos.constraints.constraint.ConicConstraint

An equality between affine expressions, at least one being complex.

class RealConversion[source]

Bases: picos.constraints.constraint.ConstraintConversion

Complex affine equality to real affine equality conversion.

classmethod convert(con, options)[source]

Implement convert.

classmethod dual(auxVarPrimals, auxConDuals, options)[source]

Implement dual.

classmethod predict(subtype, options)[source]

Implement predict.

__init__(lhs, rhs, customString=None)[source]

Construct a ComplexAffineConstraint.

Parameters
property conic_membership_form[source]

Implement for ConicConstraint.