Linear Program.Add Variable Method
Definition
Namespace: Extreme.Mathematics.Optimization
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Add | Adds a variable to the collection. |
Add | Adds a variable to the collection. |
Add | Adds a variable to the collection. |
Add | Adds a variable to the collection. |
AddVariable(String, Double)
Adds a variable to the collection.
public LinearProgramVariable AddVariable(
string name,
double cost
)
Parameters
Return Value
LinearProgramVariableThe new DecisionVariable.
Remarks
The lower bound for the variable is zero. It has no upper bound.
Exceptions
Argument | The linear program already contains a variable named name. |
AddVariable(String, Double, Double, Double)
Adds a variable to the collection.
public LinearProgramVariable AddVariable(
string name,
double cost,
double lowerBound,
double upperBound
)
Parameters
- name String
- The name of the variable.
- cost Double
- The cost associated with the variable.
- lowerBound Double
- The lower bound for the variable.
- upperBound Double
- The upper bound for the variable.
Return Value
LinearProgramVariableThe new DecisionVariable.
Exceptions
Argument | The linear program already contains a variable named name. |