VarD1Item Property

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

Consider for instance

C#
VarD1 y = Variable("y").Represents("1 if project p is carried out; 0 ow").HasIndices(p).IsBinary();
Then:
  • y[0] is the y-variable for the 0-th project,
  • y[p] is the y-variable for the p-th project,
  • y[p + 1] is the y-variable for the (p+1)-th project.

Definition

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

Parameters

i  Sca
First index of the variable.

Return Value

Var

See Also