LinearProgram.AddBinaryVariable Method

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3

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