Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LP Simplex algorithm in C++ [closed]

I need the robust C++ source code of the simplex algorithm (is a popular algorithm for numerical solution of the linear programming problem).

Please, no links to wikipedia. I need good source code in C++, using templates, clear user-friendly names and work very well.

Preferably algorithm must check the unstable floating-point calculation.

like image 623
Alexey Malistov Avatar asked Aug 26 '09 11:08

Alexey Malistov


People also ask

Does simplex algorithm always terminate?

While degeneracy is the rule in practice and stalling is common, cycling is rare in practice. A discussion of an example of practical cycling occurs in Padberg. Bland's rule prevents cycling and thus guarantees that the simplex algorithm always terminates.

What is simplex LP method?

Simplex method is an approach to solving linear programming models by hand using slack variables, tableaus, and pivot variables as a means to finding the optimal solution of an optimization problem. Simplex tableau is used to perform row operations on the linear programming model as well as for checking optimality.

When should I stop simplex algorithm?

Therefore, the most negative number in the bottom row corresponds to the most positive coefficient in the objective function and indicates the direction we should head. The pivot column is the column with the most negative number in its bottom row. If there are no negatives in the bottom row, stop, you are done.

What is the stopping rule for a minimization in a linear programming problem using the simplex approach?

The objective function of the minimization problem reaches its minimum if and only if the objective function of its dual reaches its maximum. And when they do, they are equal.


2 Answers

This one is a C++ library: http://soplex.zib.de. But the license has some restrictions regarding commercial use.

This one has a liberal license, but is in C: http://aldebaran.devinci.fr/~cagnol/promotion2007/cs302/gsl/multimin/simplex.c.html Probably you can write a thin wrapper.

like image 188
Vijay Mathew Avatar answered Oct 20 '22 19:10

Vijay Mathew


The Computational Infrastucture for Operations Research (COIN-OR) provides open-source software for the operations research community, especially around numerical optimization. The CLP project, managed by John Forrest from IBM, implements the simplex algorithm for linear programming in C++.

like image 33
Julien Avatar answered Oct 20 '22 18:10

Julien