OptimizationModel.AddVariable Method

Definition

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

Overload List

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

AddVariable(String)

Adds a variable to the collection.
C#
public DecisionVariable AddVariable(
	string name
)

Parameters

name  String
The name of the variable.

Return Value

DecisionVariable
The new DecisionVariable.

Remarks

The lower bound for the variable is zero. It has no upper bound.

Exceptions

ArgumentException The optimization model already contains a variable named name.

AddVariable(String, Double, Double)

Adds a variable to the collection.
C#
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

DecisionVariable
The new DecisionVariable.

Exceptions

ArgumentException The optimization model already contains a variable named name.

See Also