Graphics Programs Reference
In-Depth Information
y=
425/8
double([x, y])
ans =
21.8750
53.1250
The acreage that results in the maximum profit is 21.875 for wheat and
53.125 for barley. In that case the profit is
P = 143*x + 60*y
P=
50525/8
format bank; double(P)
ans =
6315.63
that is, $6,315.63.
This problem illustrates and is governed by the Fundamental Theorem of
Linear Programming , stated here in two variables:
A linear expression ax + by , defined over a closed bounded convex set
S whose sides are line segments, takes on its maximum value at a
vertex of S and its minimum value at a vertex of S .If S is unbounded,
there may or may not be an optimum value, but if there is, it occurs at a
vertex. (A convex set is one for which any line segment joining two
points of the set lies entirely inside the set.)
In fact the SIMULINK toolbox has a built-in function, simlp , that
implements the solution of a linear programming problem. The optimization
toolbox has an almost identical function called linprog . You can learn
about either one from the online help. We will use simlp on the above
problem. After that we will use it to solve two more complicated problems
involving more variables and constraints. Here is the beginning of the
output from help simlp :
SIMLP Helper function for GETXO; solves linear programming
problem.
Search WWH ::




Custom Search