8.7.7. MDOSOS

MDOSOS

Represent SOS constraints in MindOpt applications

Properties

Index

Retrieve the index of this SOS constraint in the model

Index

Retrieve the index of this SOS constraint in the model

Methods

Get

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

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

bool 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.