LinearProgramming¶
Finds a vector x minimizing c . x subject to m . x >= b and x >= 0,
solved with an exact simplex so the answer stays rational:
A {value, sign} pair in place of a bare right-hand side picks the relation:
1 for >=, 0 for ==, -1 for <=:
A fourth argument replaces the default x >= 0. It may be a single lower bound
shared by every variable, a vector of lower bounds, or a matrix of
{lower, upper} pairs:
A bound may be Infinity or -Infinity, which leaves the variable free in that
direction:
Bounds that leave nothing feasible are reported like any other infeasible problem:
$ wo 'LinearProgramming[{1, 1}, {{1, 2}, {3, 1}}, {3, 4}, {{5, 0}, {5, 0}}]'
LinearProgramming::lpsnf: No solution can be found that satisfies the constraints.
LinearProgramming[{1, 1}, {{1, 2}, {3, 1}}, {3, 4}, {{5, 0}, {5, 0}}]
A bound specification of the wrong shape is refused: