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.
First write the LPP in standard form. I assume that $b$ and $c$ are column vectors.
cis the objective function.
Ais the coefficient matrix of the constraints. (a.k.a technology matrix)
bis the RHS of the constraints.
T0is 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
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
very important. By setting this array, I don’t need to repeat
typing the same set of numbers for $B$ and $c_B$.
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.