8.4.8. MDOPsdConstr

class MDOPsdConstr

Represent a PSD constraint in MindOpt application.

Methods

get

Retrieve a PSD constraint-owned double attribute value by its name

get

Retrieve a PSD constraint-owned string attribute value by its name

index

Retrieve the index of this PSD constraint

sameAs

Test if this PSD constraint is the same as another

set

Set the value of a PSD variable-owned double attribute

set

Set the value of a PSD constraint-owned string attribute

double get(MDO_DoubleAttr attr)

Retrieve a PSD 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 PSD 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 PSD constraint.

Returns

The index of this PSD constraint.

bool sameAs(MDOPsdConstr c2)

Test if this PSD constraint is the same as another.

Parameters

MDOPsdConstr c2 – The PSD constraint to be compared.

Returns

True if these two are the same

void set(MDO_DoubleAttr attr, double value)

Set the value of a PSD variable-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 PSD constraint-owned string attribute.

Parameters
  • MDO_StringAttr attr – The attribute name.

  • const std::string& value – The new value to be set.