sasoptpy.Constraint.set_direction

Constraint.set_direction(self, direction)[source]

Changes the direction of a constraint

Parameters
directionstring

Direction of the constraint

Possible values are

  • E for equality (=) constraints

  • L for less than or euqal to (<=) constraints

  • G for greater than or equal to (>=) constraints

Examples

>>> c1 = so.Constraint(exp=3 * x - 5 * y <= 10, name='c1')
>>> print(repr(c1))
sasoptpy.Constraint( 3.0 * x  -  5.0 * y  <=  10, name='c1')
>>> c1.set_direction('G')
>>> print(repr(c1))
sasoptpy.Constraint( 3.0 * x  -  5.0 * y  >=  10, name='c1')