SetAlias(String) Method

Creates and returns an alias of the set; however with a new key (recommended).

Alias allows to reuse a set definition in different places; such as i and j in the following flow balance constraint example.

C#
int numNodes = 10;
Set i = Set("i").Represents("A node of the network").HasElementsUntil(numNodes);
Set j = i.Alias("j");

Constraint flowBal = forall(i)
                    | sum(over(j), x[i, j]) == sum(over(j), x[j, i]) + supply[i];

Definition

Namespace: Orx.MathProg
Assembly: Orx.MathProg (in Orx.MathProg.dll) Version: 1.0.0
C#
public Set Alias(
	string newKey
)

Parameters

newKey  String
Key of the alias set to be created.

Return Value

Set

See Also