picos.constraints.con_affine¶
Affine constraint types.
Classes
- class picos.constraints.con_affine.AffineConstraint(lhs, relation, rhs, customString=None)[source]¶
Bases:
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)
wherelinear
is a pure linear expression andbound
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 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:
ConicConstraint
An equality between affine expressions, at least one being complex.
- class RealConversion[source]¶
Bases:
ConstraintConversion
Complex affine equality to real affine equality conversion.
- __init__(lhs, rhs, customString=None)[source]¶
Construct a
ComplexAffineConstraint
.- Parameters
lhs (AffineExpression) – Left hand side expression.
rhs (AffineExpression) – Right hand side expression.
customString (str) – Optional string description.
- property conic_membership_form[source]¶
Implement for
ConicConstraint
.