8.5.6. MDOSOS

MDOSOS

Represent SOS constraints in MindOpt applications

Methods

get

Retrieve the int attribute value owned by the SOS constraint by name

index

Retrieve the index of this SOS constraint in the model

sameAs

Check whether this SOS constraint is the same as another SOS constraint

set

Set the value of the int attribute owned by the SOS constraint

int get(MDO.IntAttr attr)

Retrieve the int attribute value owned by the SOS constraint by name

Parameters

MDO.IntAttr attr – Attribute name

Returns

Property value

int index()

Retrieve the index of this SOS constraint in the model

Returns

The index of this SOS constraint.

boolean sameAs(MDOSOS other)

Check whether this SOS constraint is the same as another SOS constraint.

Parameters

MDOSOS other – Compared SOS constraints

Returns

Return True if the two constraints are the same

void set(MDO.IntAttr attr, int value)

Set the value of the int attribute owned by the SOS constraint.

Parameters
  • MDO.IntAttr attr – Attribute name

  • int value – The new value to be set.