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,
IList<DecisionVariable> variables,
IList<double> coefficients,
ConstraintType constraintType,
double rightHandSide
)
Public Function AddLinearConstraint (
name As String,
variables As IList(Of DecisionVariable),
coefficients As IList(Of Double),
constraintType As ConstraintType,
rightHandSide As Double
) As LinearConstraint
public:
LinearConstraint^ AddLinearConstraint(
String^ name,
IList<DecisionVariable^>^ variables,
IList<double>^ coefficients,
ConstraintType constraintType,
double rightHandSide
)
member AddLinearConstraint :
name : string *
variables : IList<DecisionVariable> *
coefficients : IList<float> *
constraintType : ConstraintType *
rightHandSide : float -> LinearConstraint
Parameters
- name
- Type: SystemString
The name of the constraint. - variables
- Type: System.Collections.GenericIListDecisionVariable
A list of the variables that appear in the constraint. - coefficients
- Type: System.Collections.GenericIListDouble
A list of corresponding coefficients. - constraintType
- Type: Extreme.Mathematics.OptimizationConstraintType
A ConstraintType value that speicifies the type of constraint. - rightHandSide
- Type: SystemDouble
The right-hand side of the constraint.
Return Value
Type:
LinearConstraintThe new
LinearConstraint.
Reference