Decision Variable Class
Represents a variable in a OptimizationModel.
Definition
Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public class DecisionVariable : OptimizationModelEntity
- Inheritance
- Object → OptimizationModelEntity → DecisionVariable
- Derived
Remarks
The DecisionVariable class represents a variable in a OptimizationModel. DecisionVariable objects are created using the linear program's AddVariable(String, Double, Double) method of the OptimizationModel class. They may also be created when a constraint is added using the [o:OptimizationModel.AddLinearConstraint] method.
Each variable has a Name, which may be generated automatically. The LowerBound and UpperBound properties specify the lower and upper bounds. After the solution of the model has been computed, the Value property returns the value of the variable in the optimal solution.
Properties
IsInteger | Gets or sets whether the variable is restricted to integer values. |
Lower |
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) |
Upper |
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. |
Methods
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
Get | Serves as the default hash function. (Inherited from Object) |
Get | Gets the Type of the current instance. (Inherited from Object) |
Memberwise | Creates a shallow copy of the current Object. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Operators
Implicit(DecisionVariable to Double) | Implicitly converts a decision variable to a double-precision floating-point number. |