Optimization Model.Create Linear Constraints Method
Definition
Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Create | Creates linear constraints based on the specified coefficients. |
Create | Creates linear constraints based on the specified coefficients and bounds. |
CreateLinearConstraints(Matrix<Double>, Vector<Double>, Int32)
Creates linear constraints based on the specified coefficients.
protected ConstraintCollection CreateLinearConstraints(
Matrix<double> coefficients,
Vector<double> rightHandSides,
int equalities
)
Parameters
- coefficients Matrix<Double>
- A matrix containing the coefficients of the constraints.
- rightHandSides Vector<Double>
- A vector containing the right-hand sides of the constraints.
- equalities Int32
- The number of equality constraints.
Return Value
ConstraintCollectionA collection that contains the new constraints.
Remarks
The first equalities constraints are defined as equality constraints.
The remaining constraints are defined as less-than or equal constraints.
CreateLinearConstraints(Vector<Double>, Matrix<Double>, Vector<Double>)
Creates linear constraints based on the specified coefficients and bounds.
protected ConstraintCollection CreateLinearConstraints(
Vector<double> lowerBounds,
Matrix<double> coefficients,
Vector<double> upperBounds
)
Parameters
- lowerBounds Vector<Double>
- A vector containing the lower bounds of the constraints.
- coefficients Matrix<Double>
- A matrix containing the coefficients of the constraints.
- upperBounds Vector<Double>
- A vector containing the upper bounds of the constraints.
Return Value
ConstraintCollectionA collection that contains the new constraints.