Background
It’s easy that one makes careless mistakes in a pivot operation. As a result, in test/exams in which calculators are allowed, I used a simple program to save time.
Answering linear programming question on Mathematics Stack Exchange, I used GNU Octave to do the tedious work.
Initial tableau
First write the LPP in standard form. I assume that $b$ and $c$ are column vectors.
c
is the objective function.A
is the coefficient matrix of the constraints. (a.k.a technology matrix)b
is the RHS of the constraints.T0
is the initial tableau.
My habit is to
- place $b$ on the RHS;
- place the objective function row at the bottom;
- omit the coefficient for $z$ since it’ll never be changed.
1 2 3 4 5 6 7 |
|
Current simplex tableau
The command basis = [3 2 6]
is used to choose the decision variables
$x_3,x_2$ and $x_6$ as the
basis. Note that the order of the entries in the array basis
is
very important. By setting this array, I don’t need to repeat
typing the same set of numbers for $B$ and $c_B$.
1 2 |
|
Inadequacies
Since I’m no longer in an LP course, I’m too lazy to write the code for finding the suitable elements for a pivot operation. We don’t need to re-develop something that has been well-developed.