Constraint Class

Serves as a base class for classes that represent constraints in an optimization model.

Definition

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

Remarks

A Constraint object represents a constraint in a OptimizationModel. Constraint objects are created using the AddLinearConstraint(String, ConstraintType, Double) 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

ConstraintType Gets the type of row.
Gradient Gets the current value of the constraint gradient.
IsLinear Gets whether the constraint is linear.
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 current value of the constraint.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Evaluate Evaluates the constraint at the specified point.
EvaluateConstraintAndGradient Evaluates both the constrain value and its gradient in one operation.
EvaluateGradient Evaluates the gradient of the constraint at the specified point.
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