8.7.4. MDOPsdExpr¶
- MDOPsdExpr¶
Represents a PSD expression in a MindOpt application. The PSD expression contains the PSD item and optionally a linear expression.
Properties
Retrieve the linear expression contained in this PSD expression
Retrieve the number of PSD terms contained in a PSD expression
Retrieve the value of this PSD expression after the problem is resolved
- LinExpr¶
Retrieve the linear expression contained in this PSD expression
- Size¶
Retrieve the number of PSD terms contained in a PSD expression.
- Value¶
Retrieve the value of this PSD expression after the problem is resolved
Methods
Add a PSD term to this PSD expression
Add a linear term to this PSD expression
Add linear terms to this PSD expression
Retrieve the coefficients in the ith PSD term
Retrieve the PSD variable in the ith PSD term
Construct a PSD expression
Construct a PSD expression with a PSD term
Construct a PSD expression with a linear expression
Construct a PSD expression from another PSD expression
Delete the ith PSD term from this PSD expression
Delete All PSD terms that contain the specified PSD variable
- void AddTerm(MDOMatrix coeff, MDOPsdVar var)¶
Add a PSD term to this PSD expression
- Parameters
MDOMatrix coeff – The coefficients of the new PSD term to be added
MDOPsdVar var – The PSD variable of the new PSD term to be added
- void AddTerm(double coeff, MDOVar var)¶
Add a linear term to this PSD expression.
- Parameters
double coeff – The coefficient of the new linear term to be added
MDOVar var – The variable of the new linear term to be added
- void AddTerms(double[] coeff, MDOVar[] var)¶
Add linear terms to this PSD expression.
- Parameters
double[] coeff – The coefficients of the new linear term to be added.
MDOVar[] var – The variables of the new linear term to be added.
- MDOMatrix GetCoeff(int i)¶
Retrieve the coefficients in the ith PSD term.
- Parameters
int i – The index of the PSD term
- Returns
The coefficients in the ith PSD term
- MDOPsdVar GetPsdVar(int i)¶
Retrieve the PSD variable in the ith PSD term
- Parameters
int i – The index of the PSD term
- Returns
The PSD variable contained in the ith PSD term
- MDOPsdExpr()¶
Construct a PSD expression.
- MDOPsdExpr(MDOPsdVar var, MDOMatrix coeff)¶
Construct a PSD expression with a PSD term
- Parameters
MDOPsdVar var – The PSD variable of the PSD term
MDOMatrix coeff – The coefficients of PSD term
- MDOPsdExpr(MDOLinExpr le)¶
Construct a PSD expression with a linear expression
- Parameters
MDOLinExpr le – The linear expression
- MDOPsdExpr(MDOPsdExpr another)¶
Construct a PSD expression from another PSD expression
- Parameters
MDOPsdExpr another – Another PSD expression
- void Remove(int i)¶
Delete the ith PSD term from this PSD expression
- Parameters
int i – The index of the PSD term to be deleted.