Skip to content

A Matlab implementation of the Primal Simplex algorithm for optimizing linear optimization programs

Notifications You must be signed in to change notification settings

MJimitater/simplex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplex

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 \min { cx , | , Ax=b, x \geq 0} in a tableau of the form

costs c 0
Matrix A b

This needs to be transformed into the matrix T of the form

\begin{align*} T =      \begin{bmatrix}     c_1 & \ldots &  c_n  &  0 \     A_{1,1} & \ldots & A_{1,n} & b_1\     \vdots  & \vdots & \vdots & \vdots \     A_{n,1} & \ldots & A_{n,n} & b_n\     \end{bmatrix} \end{align*}

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.

About

A Matlab implementation of the Primal Simplex algorithm for optimizing linear optimization programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages