8.7.7. MDOSOS¶
- MDOSOS¶
Represent SOS constraints in MindOpt applications
Properties
Retrieve the index of this SOS constraint in the model
- Index¶
Retrieve the index of this SOS constraint in the model
Methods
Retrieve the int attribute value owned by the SOS constraint by name
Check whether this SOS constraint is the same as another SOS constraint
Set the value of the int attribute owned by the SOS constraint
- int Get(MDO.IntAttr attr)¶
Retrieve the int attribute value owned by the SOS constraint by name
- Parameters
MDO.IntAttr attr – Attribute name
- Returns
Property value
- bool SameAs(MDOSOS other)¶
Check whether this SOS constraint is the same as another SOS constraint.
- Parameters
MDOSOS other – Compared SOS constraints
- Returns
Return True if the two constraints are the same
- void Set(MDO.IntAttr attr, int value)¶
Set the value of the int attribute owned by the SOS constraint.
- Parameters
MDO.IntAttr attr – Attribute name
int value – The new value to be set.