Adds a binary variable to the collection.
Namespace:
Extreme.Mathematics.Optimization
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public LinearProgramVariable AddIntegerVariable(
string name,
double cost
)
Public Function AddIntegerVariable (
name As String,
cost As Double
) As LinearProgramVariable
public:
LinearProgramVariable^ AddIntegerVariable(
String^ name,
double cost
)
member AddIntegerVariable :
name : string *
cost : float -> LinearProgramVariable
Parameters
- name
- Type: SystemString
The name of the variable. - cost
- Type: SystemDouble
The cost associated with the variable.
Return Value
Type:
LinearProgramVariableThe new
DecisionVariable.
Exception | Condition |
---|
ArgumentException |
The linear program already contains a variable named name.
|
Reference