Adds a linear constraint to the optimization model.
Namespace:
Extreme.Mathematics.Optimization
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public LinearConstraint AddLinearConstraint(
string name,
ConstraintType constraintType,
double rightHandSide
)
Public Function AddLinearConstraint (
name As String,
constraintType As ConstraintType,
rightHandSide As Double
) As LinearConstraint
public:
LinearConstraint^ AddLinearConstraint(
String^ name,
ConstraintType constraintType,
double rightHandSide
)
member AddLinearConstraint :
name : string *
constraintType : ConstraintType *
rightHandSide : float -> LinearConstraint
Parameters
- name
- Type: SystemString
The name of the new constraint. - constraintType
- Type: Extreme.Mathematics.OptimizationConstraintType
A ConstraintType value that specifies
the type of constraint. - rightHandSide
- Type: SystemDouble
The right-hand side of the constraint.
Return Value
Type:
LinearConstraintA
LinearConstraint object that represents the new constraint.
Exception | Condition |
---|
ArgumentException |
The optimization model already contains a constraint named name.
|
Reference