sasoptpy.Variable.set_bounds

Variable.set_bounds(self, *, lb=None, ub=None)[source]

Changes bounds on a variable

Parameters
lbfloat or Expression

Lower bound of the variable

ubfloat or Expression

Upper bound of the variable

Examples

>>> x = so.Variable(name='x', lb=0, ub=20)
>>> print(repr(x))
sasoptpy.Variable(name='x', lb=0, ub=20, vartype='CONT')
>>> x.set_bounds(lb=5, ub=15)
>>> print(repr(x))
sasoptpy.Variable(name='x', lb=5, ub=15, vartype='CONT')