LinearProgramVariable Class

Represents a variable in a LinearProgram.

Definition

Namespace: Extreme.Mathematics.Optimization
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public class LinearProgramVariable : DecisionVariable
Inheritance
Object  →  OptimizationModelEntity  →  DecisionVariable  →  LinearProgramVariable

Remarks

The DecisionVariable class represents a variable in a LinearProgram. DecisionVariable objects are created using the linear program's AddVariable(String, Double) method of the OptimizationModel class. They may also be created when a constraint is added using the AddLinearConstraint(String, Double, Double) method.

Each variable has a Name, which may be generated automatically. The LowerBound and UpperBound properties specify the lower and upper bounds. The Cost property specifies the cost associated with the variable. This is the coefficient of the variable in the objective function. After the solution of the linear program has been computed, the Value property returns the value of the variable in the optimal solution.

Properties

Cost Gets the cost associated with the variable.
IsInteger Gets or sets whether the variable is restricted to integer values.
(Inherited from DecisionVariable)
LowerBound Gets or sets the lower bound of the variable.
(Inherited from OptimizationModelEntity)
Name Gets the name of the variable.
(Inherited from OptimizationModelEntity)
Position Gets the position of the current instance in the collection.
(Inherited from OptimizationModelEntity)
UpperBound Gets or sets the upper bound of the variable.
(Inherited from OptimizationModelEntity)
Value Gets the value of the variable after the optimal solution has been found.
(Inherited from DecisionVariable)

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also