VarD2Item Property

Returns the variable at the (i,j)-th position. Note that the indices can be any scalar (constant for the mathematical model) expression.

Consider for instance

C#
VarD2 x = Variable("x").Represents("flow on arc (i, j)").HasIndices(i, j).IsContinuous().IsNonnegative();
Then:
  • x[0, 1] is the x-variable for arc (0, 1),
  • x[i, j] is the x-variable for arc (i, j),
  • x[0, j] is the x-variable for arc (0, j),
  • x[source[c], j] is the x-variable for arc (source[c], j), where source[c] is the source node of commodity c.

Definition

Namespace: Orx.MathProg
Assembly: Orx.MathProg (in Orx.MathProg.dll) Version: 1.0.0
C#
public Var this[
	Sca i,
	Sca j
] { get; }

Parameters

i  Sca
First index of the variable.
j  Sca
Second index of the variable.

Return Value

Var

See Also