2 %> Algorithm 16.3: Pivoting of the
simplex tableau. Implementation of algorithm 16.3 of \cite Bier15-book
4 %> @note Tested with \ref run1612pivoting.m
8 %> @author Michel Bierlaire
9 %> @date Sun Mar 22 12:43:21 2015
10 %> @ingroup Algorithms
14 %> @param tab the
simplex tableau
15 %> @param l the row of the pivot
16 %> @param j the column of the pivot
17 %> @
return newtab the pivoted tableau
19 [mtab,ntab] = size(tab) ;
21 error(
"The row of the pivot exceeds the size of the tableau") ;
24 error(
"The column of the pivot exceeds the size of the tableau") ;
27 if (abs(thepivot) < realmin)
28 error(
"The pivot is too close to zero") ;
31 thepivotrow = tab(l,:) ;
35 newtab(l,:) = newtab(l,:) / thepivot ;
37 mult = -newtab(i,j) / thepivot ;
38 newtab(i,:) = newtab(i,:) + mult * thepivotrow ;
function twoPhasesSimplex(in A, in b, in c)
Solve a linear optimization problem in standard form using the tableau simplex with two phases subje...
function simplexTableau(in tab, in rowindex)
Solve a linear optimization problem in standard form using the tableau simplex.
function pivoting(in tab, in l, in j)
Pivot the tableau.
function simplex(in A, in b, in c, in basis)
Applies the simplex method to solve subject to and , where , , and .