8.5.9. MDOPsdVar¶
- MDOPsdVar¶
Represent a PSD variable in MindOpt application
Methods
Create a PSD variable in the model
Retrieve the int attribute value owned by a PSD variable by its name
Retrieve a String attribute value owned by a PSD variable by its name
Retrieve the matrix attribute value owned by the PSD variable by its name
Set the index of this PSD variable
Retrieve the index of this PSD variable
Test whether this PSD variable is the same as another
Set the value of the int attribute owned by the PSD variable
Sets the value of the String attribute owned by the PSD variable
Set the value of the matrix attribute owned by the PSD variable
Set the index of this PSD variable
Converts the current PSD variable to a string
- MDOPsdVar(long model, int index)¶
Create a PSD variable in the model
- Parameters
long model – Associated model
int index – The index of the new PSD variable in the model.
- int get(MDO.IntAttr attr)¶
Retrieve the int attribute value owned by a PSD variable by its name
- Parameters
MDO.IntAttr attr – Attribute name
- Returns
Attribute value
- String get(MDO.StringAttr attr)¶
Retrieve a String attribute value owned by a PSD variable by its name
- Parameters
MDO.StringAttr attr – Attribute name
- Returns
Attribute value
- MDOMatrix get(MDO.MatAttr attr)¶
Retrieve the matrix attribute value owned by the PSD variable by its name
- Parameters
MDO.MatAttr attr – Attribute name
- Returns
Attribute value
- int setIndex()¶
Set the index of this PSD variable
- Returns
New index for this PSD variable
- int index()¶
Retrieve the index of this PSD variable
- Returns
Index of this PSD variable
- bool sameAs(MDOPsdVar v2)¶
Test whether this PSD variable is the same as another
- Parameters
MDOPsdVar v2 – PSD variable to compare
- Returns
True if the two are the same
- void set(MDO.IntAttr attr, int value)¶
Set the value of the int attribute owned by the PSD variable.
- Parameters
MDO.IntAttr attr – Attribute name
int value – The new value to be set.
- void set(MDO.StringAttr attr, String& value)¶
Sets the value of the String attribute owned by the PSD variable.
- Parameters
MDO.StringAttr attr – Attribute name
String& value – The new value to be set.
- void set(MDO.MatAttr attr, MDOMatrix value)¶
Set the value of the matrix attribute owned by the PSD variable.
- Parameters
MDO.MatAttr attr – Attribute name
MDOMatrix value – The new value to be set.
- int setIndex()¶
Set the index of this PSD variable
- Returns
New index for this PSD variable
- String toString()¶
Converts the current PSD variable to a string.
- Returns
The string format of the PSD variable.