8.5.8. MDOPsdConstr

MDOPsdConstr

Represent a PSD constraint in MindOpt application

Methods

MDOPsdConstr

Construct a PSD constraint associated with the input model

get

Retrieve the double attribute value owned by the PSD constraint by its name

get

Retrieve the value of a String attribute owned by this PSD constraint by its name

index

Retrieve the index of this PSD constraint in this model

sameAs

Test whether this PSD constraint is the same as another

set

Set the value of the double attribute owned by the PSD variable

set

Set the value of the String attribute owned by the PSD constraint

MDOPsdConstr(long model, int index)

Construct a PSD constraint associated with the input model

Parameters
  • long model – Associated model

  • int index – Index of the new PSD constraint in this model

double get(MDO.DoubleAttr attr)

Retrieve the double attribute value owned by the PSD constraint by its name

Parameters

MDO.DoubleAttr attr – Attribute name

Returns

Attribute value

string get(MDO.StringAttr attr)

Retrieve the value of a String attribute owned by this PSD constraint by its name

Parameters

MDO.StringAttr attr – Attribute name

Returns

Attribute value

int index()

Retrieve the index of this PSD constraint in this model.

Returns

The index of this PSD constraint.

bool sameAs(MDOPsdConstr c2)

Test whether this PSD constraint is the same as another

Parameters

MDOPsdConstr c2 – Another PSD constraint to be compared

Returns

True if the two are the same

void set(MDO.DoubleAttr attr, double value)

Set the value of the double attribute owned by the PSD variable.

Parameters
  • MDO.DoubleAttr attr – Attribute name

  • double value – The new value to be set.

void set(MDO.StringAttr attr, String value)

Set the value of the String attribute owned by the PSD constraint.

Parameters
  • MDO.StringAttr attr – Attribute name

  • String value – The new value to be set.