sasoptpy.ConstraintGroup.get_name

ConstraintGroup.get_name(self)[source]

Returns the name of the constraint group

Returns
namestring

Name of the constraint group

Examples

>>> m = so.Model(name='m')
>>> x = m.add_variable(name='x')
>>> indices = ['a', 'b', 'c']
>>> y = m.add_variables(indices, name='y')
>>> c1 = m.add_constraints((x + y[i] <= 4 for i in indices),
                           name='con1')
>>> print(c1.get_name())
con1