2 %> Runs example 16.4 illustrating the
simplex method
8 %> @author Michel Bierlaire
9 %> @date Sun Mar 22 11:09:14 2015
10 A = [1 1 1 0 ; 1 -1 0 1] ;
12 c = [-1 ; -2 ; 0 ; 0 ] ;
14 [optimalbasis,unbounded] =
simplex(A,b,c,basis) ;
15 B = A(:,optimalbasis) ;
17 xfull = zeros(size(c));
18 xfull(optimalbasis) = xb ;
20 printf(
"Objective function: %e\n",c
'*xfull) function simplex(in A, in b, in c, in basis)
Applies the simplex method to solve subject to and , where , , and .