On 2013-09-02 02:26, Tommy Vee wrote:
Anyone know where I can get an easy to use Python class or algorithm for the
Simplex optimization algorithm?  I've tried the one in the link below, but I
can't figure out if a) I'm using it properly, or b) where to get the solution.
BTW, I tried some test scenarios using MS Excel's "Solver" and just can't get
this algorithm to match Excel's results (which is spot on).

http://taw9.hubpages.com/hub/Simplex-Algorithm-in-Python

BTW, if I can't something to work, I'm going to be forced to use the VBA
programmatic Excel interface. That wouldn't be too bad, but the data comes from
a DB and getting it properly positioned to use Excel's "Solver" is very
painful.  A Python approach would be much cleaner.

Can you show some of the test scenarios that you tried? There are different conventions in how to represent a linear programming problem, and different solvers may choose different conventions. You may have to convert between representations.

You may have better luck with the PuLP interface:

  https://pypi.python.org/pypi/PuLP

PuLP itself is just a modelling language rather than a solver, but the sources do contain compiled binaries for the CoinMP solver so it will work out-of-box on popular platforms, like Windows.

  https://projects.coin-or.org/CoinMP

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to