Evaluates the coefficients of the linear object function of the dual problem when the primal problem is given.
The coefficients of the object function of the dual problem of the given linear programming problem.
Below we describe the convention under which the primal problem is passed to the method and give a motivation for the dual problem of the primal problem using the factory example.
Interpretation of the Dual Problem of the Factory Problem Example
In the case of the Factory Example (see Factory Example description) the transformation of the primal linear programming problem (i.e. the given problem) into its dual problem; corresponds essentially to viewing the same problem from another angle. More precisely, for our factory problem the primal problem is of the following form:
Defining the Primal Linear Programming Problem
The given linear programming problem known as the primal 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 need to be provided to this method.
Though in order to evaluate the coefficients of the dual problems object function we do not required knowledge of the primal problems object function we show the template by which the primal problems object function is given is illustrate its familiarity with how the dual problems object function is returned (see notes below) and by implication its relationship to the duals function.
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 an extremum
(i.e. minimum or maximum) 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:
When there are no equality or inequality constraints
If the considered primal linear programming problem does not have any equality or inequalities constraints then the corresponding 2-dimension array parameter should be given as either an empty array (i.e. {}) or as a NULL array.
Form of the Returned duals Object Function
The (returned) dual object function like the primal's object function (see notes above) is given as an array of its coefficients. This is possible since all dual problems object functions take the following form:
M real numbers where M is the number
of constraints (inequality or equality) and the yj's are the dual variables.LinearProgramming Class | WebCab.COM.Math.Optimization.LinearProgramming Namespace | Evaluates the inequality constraints of the dual problem when the primal problem is given. | Evaluates the equality constraints of the dual problem when the primal problem is given.