Linear Constraint Class
Represents a linear constraint in an optimization model.
Definition
Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
public class LinearConstraint : Constraint
- Inheritance
- Object → OptimizationModelEntity → Constraint → LinearConstraint
- Derived
Remarks
A LinearConstraint object represents a linear constraint in a OptimizationModel. LinearConstraint objects are created using the [o:OptimizationModel.AddLinearConstraint] method of the OptimizationModel class.
Each constraint has a Name, which may be generated automatically. The LowerBound and UpperBound properties specify the left and right hand sides of the constraint.
Properties
Constraint |
Gets the type of row.
(Inherited from Constraint) |
Gradient |
Gets the current value of the constraint gradient.
(Inherited from Constraint) |
IsLinear |
Gets whether the constraint is linear.
(Overrides Constraint.IsLinear) |
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 current value of the constraint.
(Inherited from Constraint) |
Methods
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Evaluate |
Evaluates the constraint at the specified point.
(Overrides Constraint.Evaluate(Vector<Double>)) |
Evaluate |
Evaluates both the constrain value and its gradient in one operation.
(Overrides Constraint.EvaluateConstraintAndGradient(Vector<Double>)) |
Evaluate |
Evaluates the gradient of the constraint at the specified point.
(Overrides Constraint.EvaluateGradient(Vector<Double>)) |
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) |