Constraint¶

class
picos.constraints.
Constraint
(typeTerm, customString=None, printSize=False)¶ Bases:
abc.ABC
An abstract base class for optimization constraints.
Implementations
need to implement the abstract methods
_str
,_expression_names
,_get_size
,_get_slack
and_set_dual
,need to oberwrite
_variable_names
, if applicable, andare supposed to call
Constraint.__init__
from within their own implementation of__init__
.
Attributes Summary
Methods Summary
copy_with_new_vars
(newVars[, newCons])delete
()Deletes the constraint from the problem it is assigned to.
Whether the constraint states exactly that the left hand side is greater or equal than the right hand side.
Whether the constraints states the equality between the left hand side and the right hand side.
Whether the constraint states exactly that the left hand side is smaller or equal than the right hand side.
Whether the constraints states an inequality between the left hand side and the right hand side.
is_meta
()is_real
()Attributes Documentation

EQ
= '='¶

GE
= '>'¶

LE
= '<'¶

dual
¶

size
¶

slack
¶
Methods Documentation

constring
()¶

copy_with_new_vars
(newVars, newCons=None)¶

delete
()¶ Deletes the constraint from the problem it is assigned to.

expressions
()¶

is_complex
()¶

is_decreasing
()¶ Whether the constraint states exactly that the left hand side is greater or equal than the right hand side.

is_equality
()¶ Whether the constraints states the equality between the left hand side and the right hand side.

is_increasing
()¶ Whether the constraint states exactly that the left hand side is smaller or equal than the right hand side.

is_inequality
()¶ Whether the constraints states an inequality between the left hand side and the right hand side.

is_meta
()¶

is_real
()¶

keyconstring
()¶