Optimization Model.Add Variable Method
Definition
Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Add | Adds a variable to the collection. |
Add | Adds a variable to the collection. |
AddVariable(String)
Adds a variable to the collection.
public DecisionVariable AddVariable(
string name
)
Parameters
- name String
- The name of the variable.
Return Value
DecisionVariableThe new DecisionVariable.
Remarks
The lower bound for the variable is zero. It has no upper bound.
Exceptions
Argument | The optimization model already contains a variable named name. |
AddVariable(String, Double, Double)
Adds a variable to the collection.
public DecisionVariable AddVariable(
string name,
double lowerBound,
double upperBound
)
Parameters
- name String
- The name of the variable.
- lowerBound Double
- The lower bound for the variable.
- upperBound Double
- The upper bound for the variable.
Return Value
DecisionVariableThe new DecisionVariable.
Exceptions
Argument | The optimization model already contains a variable named name. |