Returns the location of the extremum (i.e. minimum or maximum) of a linear programming problem.
The coordinates of the location of the extremum (i.e. maximum or minimum) of the linear programming problem. That is, a point in N-dimensional space returned as an array of doubles where the first term of the array corresponds to the first coordinate, the second term to the second coordinate and so on.
Application to the Factory Example
Since in the Factory example (see Factory Example description) the linear object function represents the profit level of the factory, the returned solution to the simplex method represents the product mix of the factory which will result in the maximum profit. By then substituting this product mix back into the linear object function we will be able to see the exact profit level which can be achieved by the factory.
Defining the Linear Programming Problem
The linear programming problem is passed to the method by specifying the array of coefficients of the linear object function and by using two 2-dimensional double arrays in order to describe the set of inequality and equality constraints which the solution of the linear programming problem must satisfy. Below we explicitly describe how a given linear programming problem, that is an object function together with a set of inequality and equality constraints can be mapped into the parameters which will be provided to the (simplex) method.
All linear (programming) object functions f can be written in the following form:
N is the number of variables considered, coefficientsi
are the set of coefficients of the linear function and
x1,...,xN are the coordinates
(i.e. the degrees of freedom of the problem) of the solution set over which a point where the extremum
(i.e. maximum or minimum) of the linear function is sought.The solution set is spanned by the coordinates
x1,...,xNx which are
subject to a set of inequality and equality constraints. That is, the solution set over which an
extremum is sought is any combination of coordinates which satisfies the given constraints. These
inequality and equality constraints are supplied in the form of 2 dimensional double arrays, where
each line of the 2 dimensional array corresponds to the coefficients within a linear equality or
inequality constraint. That is, in order to express the following inequality:
N + 1th term),
according to the following convention:
The equality constraints for the problem are expressed in a similar fashion to the inequality constraints, where the coefficients are listed in order followed by a real number. The equalities should be collected within a two-dimensional array in a similar way to the inequalities and passed as a parameter to the method. In particular, each equality is expressed in the following form: c1 * x1 + c2 * x2 + ... + cN * xN + b = 0, for which you will need to provide the following array within the equality two-dimensional array:
| Exception Type | Condition |
|---|---|
| LinearProgrammingException | Thrown if either the region given by the constraints is empty or if the function is unbounded on the region. |
LinearProgramming Class | WebCab.COM.Math.Optimization.LinearProgramming Namespace | MultiLinearSimplex