8.7.8. MDOGenConstr

MDOGenConstr

Represent a general constraint in MindOpt application.

Properties

Index

Retrieve the index of this general constraint

Index

Retrieve the index of this general constraint.

Methods

Get

Retrieve a general-constraint-owned int attribute value by its name

Get

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

SameAs

Test if this general constraint is the same as another

Set

Set the value of a general-constraint-owned int attribute

Set

Set the value of a general-constraint-owned string attribute

Set

Set the value of a general-constraint-owned double attribute

int Get(MDO.IntAttr attr)

Retrieve a general-constraint-owned int attribute value by its name.

Parameters

MDO.IntAttr attr – The attribute name.

Returns

The attribute value.

string Get(MDO.StringAttr attr)

Retrieve a general-constraint-owned string attribute value by its name.

Parameters

MDO.StringAttr attr – The attribute name.

Returns

The attribute value.

bool SameAs(MDOGenConstr c2)

Test if this general constraint is the same as another.

Parameters

MDOGenConstr c2 – The general constraint to be compared.

Returns

True if these two are the same

void Set(MDO.IntAttr attr, int value)

Set the value of a general-constraint-owned int attribute.

Parameters
  • MDO.IntAttr attr – The attribute name.

  • int value – The new value to be set.

void Set(MDO.StringAttr attr, string value)

Set the value of a general-constraint-owned string attribute.

Parameters
  • MDO.StringAttr attr – The attribute name.

  • string value – The new value to be set.

void Set(MDO.DoubleAttr attr, double value)

Set the value of a general-constraint-owned double attribute.

Parameters
  • MDO.DoubleAttr attr – The attribute name.

  • double value – The new value to be set.