Example
6. Find the
maximum of
subject
to the constraints:
Solution 6.
Enter the objective function and constraints.
![[Graphics:../Images/LinearProgrammingMod_gr_442.gif]](../Images/LinearProgrammingMod_gr_442.gif)
Use the Mathematica subroutine LinearProgramming to find the solution (note carefully the "-" signs in front of the matrix and vector in the second and third arguments).
Use the simplex algorithm to find this solution.
Enter the coefficients of the decision variables and right side of the tableau.
Mathematica will fill in the columns for the slack
variables and append a column of zeros which will be use to calculate
the ratios
for determining the pivot rows.
![[Graphics:../Images/LinearProgrammingMod_gr_450.gif]](../Images/LinearProgrammingMod_gr_450.gif)
Run the subroutine SimplexMethod.
![[Graphics:../Images/LinearProgrammingMod_gr_452.gif]](../Images/LinearProgrammingMod_gr_452.gif)
![[Graphics:../Images/LinearProgrammingMod_gr_453.gif]](../Images/LinearProgrammingMod_gr_453.gif)
![[Graphics:../Images/LinearProgrammingMod_gr_454.gif]](../Images/LinearProgrammingMod_gr_454.gif)
![[Graphics:../Images/LinearProgrammingMod_gr_455.gif]](../Images/LinearProgrammingMod_gr_455.gif)
![[Graphics:../Images/LinearProgrammingMod_gr_456.gif]](../Images/LinearProgrammingMod_gr_456.gif)
There are no negative coefficients in the bottom row, so we are done.
Aside. The bottom line of the tableau corresponds to the augmented objective function
From column 1 and row 1 we see that
. From
column 2 and row 3 we see that
. From
column 3 and row 2 we see that
. From
column 4 and row 4 we see that
. The
final point
is
the optimal feasible
solution. The simplex method has moved from the
origin along the edges to the point
. The
value of the objective function at the solution point is located in
the bottom row of the column "
", i.e.
.
![]()
We are done!
Aside. The
slack variables could be computed from (4)
using the initial coefficients of the tableau:
for
rows
in the
tableau.
The bottom line of the tableau corresponds to the augmented objective function.
![[Graphics:../Images/LinearProgrammingMod_gr_470.gif]](../Images/LinearProgrammingMod_gr_470.gif)
(c) John H. Mathews 2005