Affine constraint types.
AffineConstraint(lhs, relation, rhs, customString=None)¶
An equality or inequality between two affine expressions.
__init__(lhs, relation, rhs, customString=None)¶
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.
linearis a pure linear expression and
boundis a constant expression.
Sparse representation of the constraint’s bounded linear form.
A sparse list representation of the constraint, given a mapping of PICOS variables to column offsets (or alternatively given an index function).
The constraint is brought into a bounded linear form A • b, where • is one of ≤, ≥, or =, depending on the constraint relation, and the rows returned correspond to the matrix [A|b].
varOffsetMap (dict) – Maps variables or variable start indices to column offsets.
indexFunction – Instead of adding the local variable index to the value returned by varOffsetMap, use the return value of this function, that takes as argument the variable and its local index, as the “column index”, which need not be an integer. When this parameter is passed, the parameter varOffsetMap is ignored.
A list of triples (J, V, c) where J contains column indices (representing scalar variables), V contains coefficients for each column index and c is a constant term. Each entry of the list represents a row in a constraint matrix.
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.
Greater-or-equal side of the constraint.
The greater-or-equal side expression in case of an inequality, otherwise the right hand side.
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.
Smaller-or-equal side of the constraint.
The smaller-or-equal side expression in case of an inequality, otherwise the left hand side.
ComplexAffineConstraint(lhs, rhs, customString=None)¶
An equality between affine expressions, at least one being complex.
Complex affine equality to real affine equality conversion.
__init__(lhs, rhs, customString=None)¶