sasoptpy.Constraint.get_value¶
-
Constraint.
get_value
(self, rhs=False)[source]¶ Returns the current value of the constraint
- Parameters
- rhsboolean, optional
When set to True, includes constant values to the value of the constraint. Default is False.
Examples
>>> x = so.Variable(name='x', init=2) >>> c = so.Constraint(x ** 2 + 2 * x <= 15, name='c') >>> print(c.get_value()) 8 >>> print(c.get_value(rhs=True)) -7