A matlab implementation of the Primal Simplex algorithm for optimizing linear optimization programs.
mySimplex.m
contains code to run the simplex algorithm.
Consider having the linear program in a tableau of the form
costs c | 0 |
---|---|
Matrix A | b |
This needs to be transformed into the matrix of the form
in order for mySimplex.m
to work.
Its best to call the function as in [endtableau, x_opt,z_opt]=mySimplex(T)
,
in order to output not only the optimal solution x_opt
and its optimal objective value
z_opt
, but also the corresponding endtableau
of the simplex algorithm.