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

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

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

AddTerm

Add a PSD term to this PSD expression

AddTerm

Add a linear term to this PSD expression

AddTerms

Add linear terms to this PSD expression

GetCoeff

Retrieve the coefficients in the ith PSD term

GetPsdVar

Retrieve the PSD variable in the ith PSD term

MDOPsdExpr

Construct a PSD expression

MDOPsdExpr

Construct a PSD expression with a PSD term

MDOPsdExpr

Construct a PSD expression with a linear expression

MDOPsdExpr

Construct a PSD expression from another PSD expression

Remove

Delete the ith PSD term from this PSD expression

Remove

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.

bool Remove(MDOPsdVar v)

Delete All PSD terms that contain the specified PSD variable

Parameters

MDOPsdVar v – PSD variable to delete

Returns

True if at least one term is deleted.