LinearProgram.AddBinaryVariable Method

Definition

Namespace: Extreme.Mathematics.Optimization
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

AddBinaryVariable(String) Adds a binary variable to the collection.
AddBinaryVariable(String, Double) Adds a binary variable to the collection.

AddBinaryVariable(String, Double)

Adds a binary variable to the collection.
C#
public LinearProgramVariable AddBinaryVariable(
	string name,
	double cost
)

Parameters

name  String
The name of the variable.
cost  Double
The cost associated with the variable.

Return Value

LinearProgramVariable
The new DecisionVariable.

Exceptions

ArgumentException The linear program already contains a variable named name.

See Also