MathProgExtensionsVariable Method

Initiates a variable builder for different dimensions (VarD0, VarD1, VarD2, etc.).

Builder pattern is used for creating all mathematical symbols, to make creating rather complicated variants more convenient.

C#
VarD0 maxTardiness = Variable("maxTard").Represents("Maximum tardiness of all tasks").IsContinuous().IsNonnegative();

VarD1 y = Variable("y").Represents("Whether or not location p is included in the design").HasIndices(p).IsBinary();

VarD2 x = Variable("x").Represents("Amount of flow on each edge (i, j)").HasIndices(i, j).IsContinuous().WithBounds(0.0, getEdgeCapacity);

// or definitions can be omitted; however, they might be useful in automatically generated LaTex, html or text documentations.
VarD0 maxTardiness = Variable("maxTard").IsContinuous().IsNonnegative();
VarD1 y = Variable("y").HasIndices(p).IsBinary();
VarD2 x = Variable("x").HasIndices(i, j).IsContinuous().WithBounds(0.0, getEdgeCapacity);

Definition

Namespace: Orx.MathProg
Assembly: Orx.MathProg (in Orx.MathProg.dll) Version: 1.0.0
C#
public static VariableBuilderKey Variable(
	string key
)

Parameters

key  String
Key of the variable.

Return Value

VariableBuilderKey

See Also