8.7.8. MDOGenConstr¶
- MDOGenConstr¶
Represent a general constraint in MindOpt application.
Properties
Retrieve the index of this general constraint
- Index¶
Retrieve the index of this general constraint.
Methods
Retrieve a general-constraint-owned int attribute value by its name
Retrieve a general-constraint-owned string attribute value by its name
Test if this general constraint is the same as another
Set the value of a general-constraint-owned int attribute
Set the value of a general-constraint-owned string attribute
Set the value of a general-constraint-owned double attribute
- int Get(MDO.IntAttr attr)¶
Retrieve a general-constraint-owned int attribute value by its name.
- Parameters
MDO.IntAttr attr – The attribute name.
- Returns
The attribute value.
- string Get(MDO.StringAttr attr)¶
Retrieve a general-constraint-owned string attribute value by its name.
- Parameters
MDO.StringAttr attr – The attribute name.
- Returns
The attribute value.
- bool SameAs(MDOGenConstr c2)¶
Test if this general constraint is the same as another.
- Parameters
MDOGenConstr c2 – The general constraint to be compared.
- Returns
True if these two are the same
- void Set(MDO.IntAttr attr, int value)¶
Set the value of a general-constraint-owned int attribute.
- Parameters
MDO.IntAttr attr – The attribute name.
int value – The new value to be set.
- void Set(MDO.StringAttr attr, string value)¶
Set the value of a general-constraint-owned string attribute.
- Parameters
MDO.StringAttr attr – The attribute name.
string value – The new value to be set.
- void Set(MDO.DoubleAttr attr, double value)¶
Set the value of a general-constraint-owned double attribute.
- Parameters
MDO.DoubleAttr attr – The attribute name.
double value – The new value to be set.