Builder pattern is used for creating all mathematical symbols, to make creating rather complicated variants more convenient.
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);
public static VariableBuilderKey Variable(
string key
)