Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53494
| Date | 2013-09-02 11:06 -0400 |
|---|---|
| From | Tommy Vee <vitaletom1@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Simplex Algorithm |
| References | <1PRUt.242963$ZD2.40442@fx19.iad> <mailman.477.1378115748.19984.python-list@python.org> |
| Message-ID | <mailman.493.1378134376.19984.python-list@python.org> (permalink) |
On 9/2/2013 5:55 AM, Robert Kern wrote: > 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 > Thank you, I will definitely look at these and other options. BTW, try the test scenario in the link I sent. Very simple, only 3 variables. Maximize: 2x+3y+2z Constraints: 2x+y+z <=4, x+2y+z <=7, z <= 5 The algorithm displays the Tableau after each pivot, but where is the answer for x, y and z? When I run this in Excel's Solver, I get x=0, y=3, z=1. which is indeed the maximized solution (11).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Simplex Algorithm Tommy Vee <xxxxx@xxxxxx.xxx> - 2013-09-01 21:26 -0400
Re: Simplex Algorithm Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-09-02 09:06 +0100
Re: Simplex Algorithm Tommy Vee <xxxxx@xxxxxx.xxx> - 2013-09-02 10:42 -0400
Re: Simplex Algorithm Tommy Vee <vitaletom1@gmail.com> - 2013-09-02 10:42 -0400
Re: Simplex Algorithm Robert Kern <robert.kern@gmail.com> - 2013-09-02 10:45 +0100
Re: Simplex Algorithm Robert Kern <robert.kern@gmail.com> - 2013-09-02 10:55 +0100
Re: Simplex Algorithm Tommy Vee <xxxxx@xxxxxx.xxx> - 2013-09-02 11:06 -0400
Re: Simplex Algorithm Robert Kern <robert.kern@gmail.com> - 2013-09-02 16:43 +0100
Re: Simplex Algorithm Tommy Vee <xxxxx@xxxxxx.xxx> - 2013-09-02 14:59 -0400
Re: Simplex Algorithm Tommy Vee <vitaletom1@gmail.com> - 2013-09-02 14:59 -0400
Re: Simplex Algorithm Tommy Vee <vitaletom1@gmail.com> - 2013-09-02 11:06 -0400
Re: Simplex Algorithm Tony the Tiger <tony@tiger.invalid> - 2013-09-16 13:47 -0500
csiph-web