NonlinearConstraint Class

Represents a row in a LinearProgram.

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
public class NonlinearConstraint : Constraint
Inheritance
Object  →  OptimizationModelEntity  →  Constraint  →  NonlinearConstraint

Remarks

A NonlinearConstraint object represents a constraint in a NonlinearProgram. NonlinearConstraint objects are created using the [o:NonlinearProgram.AddNonlinearConstraint] method of the NonlinearProgram 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. The ConstraintFunction property specifies the function whose value must lie between those bounds.

The FastConstraintGradient property specifies the gradient of the constraint function. If this value is null, a numerical approximation is used.

Properties

ConstraintFunction Gets or sets the constraint function.
ConstraintFunctionAndGradient Gets or sets a delegate that evaluates the constraint value and its gradient.
ConstraintType Gets the type of row.
(Inherited from Constraint)
FastConstraintGradient Gets or sets the gradient of the constraint function.
Gradient Gets the current value of the constraint gradient.
(Inherited from Constraint)
IsLinear Gets whether the constraint is linear.
(Overrides Constraint.IsLinear)
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.
(Inherited from Constraint)

Methods

EqualsDetermines 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>))
EvaluateConstraintAndGradient Evaluates both the constrain value and its gradient in one operation.
(Overrides Constraint.EvaluateConstraintAndGradient(Vector<Double>))
EvaluateGradient Evaluates the gradient of the constraint at the specified point.
(Overrides Constraint.EvaluateGradient(Vector<Double>))
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