Click or drag to resize

SimplexSolverBaseORToolsSolveNonnegative(DoubleVector, DoubleMatrix, DoubleVector, Int32, Int32, Int32, DoubleVector) Method

Solves a linear programming problem with the given constraints. The solution maximizes the objective function and its components are constrained to be nonnegative.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public void SolveNonnegative(
	DoubleVector objectiveFunction,
	DoubleMatrix constraints,
	DoubleVector rightHandSides,
	int numLessThan,
	int numGreaterThan,
	int numEqual,
	DoubleVector upperBounds
)

Parameters

objectiveFunction  DoubleVector
A vector of coefficients representing the objective function.
constraints  DoubleMatrix
A matrix of constraint coefficients.
rightHandSides  DoubleVector
A vector of right-hand sides.
numLessThan  Int32
The number of less-than constraints.
numGreaterThan  Int32
The number of greater-than constraints.
numEqual  Int32
The number of equality constraints.
upperBounds  DoubleVector
A vector of upper variable bounds.
Exceptions
ExceptionCondition
InvalidArgumentException Thrown if an upper bound is negative or zero, or a right-hand side is negative.
MismatchedSizeException Thrown if the given structures are not of compatible sizes.
Remarks
The lower variable bounds default to zero. Each row of the constraints matrix is the coefficients of a linear constraint. The first numLessThan rows represents linear constraints that are less than their corresponding right hand side, the next numGreaterThan rows represent linear constraints that are greater than their corresponding right hand sides, and the last numEqual rows represent equality constraints.
See Also