8.5.5. MDOQConstr¶
-
class MDOQConstr¶
Represent a quadratic constraint in MindOpt application.
Methods
Retrieve a quadratic constraint-owned double attribute value by its name
Retrieve a quadratic constraint-owned string attribute value by its name
Retrieve the index of this quadratic constraint
Test if this quadratic constraint is the same as another
Set the value of a quadratic constraint-owned double attribute
Set the value of a quadratic constraint-owned string attribute
-
double get(MDO_DoubleAttr attr)¶
Retrieve a quadratic constraint-owned double attribute value by its name.
- Parameters
MDO_DoubleAttr attr – The attribute name.
- Returns
The attribute value.
-
std::string get(MDO_StringAttr attr)¶
Retrieve a quadratic constraint-owned string attribute value by its name.
- Parameters
MDO_StringAttr attr – The attribute name.
- Returns
The attribute value.
-
int index()¶
Retrieve the index of this quadratic constraint.
- Returns
The index of this quadratic constraint.
-
bool sameAs(MDOQConstr c2)¶
Test if this quadratic constraint is the same as another.
- Parameters
MDOQConstr c2 – The quadratic constraint to be compared.
- Returns
True if these two are the same
-
void set(MDO_DoubleAttr attr, double value)¶
Set the value of a quadratic constraint-owned double attribute.
- Parameters
MDO_DoubleAttr attr – The attribute name.
double value – The new value to be set.
-
void set(MDO_StringAttr attr, const std::string &value)¶
Set the value of a quadratic constraint-owned string attribute.
- Parameters
MDO_StringAttr attr – The attribute name.
const std::string& value – The new value to be set.
-
double get(MDO_DoubleAttr attr)¶