Beginner's implementation of a simplex solver.
A very simple implementation for a class project in C++
Tested on Ubuntu 11.04 and Mac OSX
cd into directory
make
./solver FILENAME
or, to run the 5 benchmarking tests in the /tests folder just run:
./solver
If this fails to run you probably need the Armadillo library:
sudo apt-get install libarmadillo0
I have implemented a general form simplex solver for linear programs. Problems are initialized using an intilization phase as described in Sankaranarayanan's General Initialization Phase notes. The primal simplex method for general LP problems is implmented as described in Chapter 9 of Vanderbei's Linear Programming book.
The program is written in C++ but uses the Armadillo matricies libraries for more dynamic and optimized matrix operations.
To ensure termination I used the least subscript/Bland's rule after the program hits the 50th step. The program aborts if it runs for over 1000 pivots as a debugging feature.
5 examples where testing on this solver:
The objective functions were solved using glpk solver for comparison.
For benchmarking each of the 5 tests were run 100,000 times and the total time was added up. The program was then optimized to lower the average running time.
BENCHMARKING 500,000 SOLUTIONS
2.97919 Solver's initial run time after it was finished 0.124841 Changed matricies to reference variables
95.81% speed up, not bad. I'm tired...