1 linear programming in python?
6 Answers active oldest votes up vote 9 down vote accepted Is there a reason why you have to do it in Python? If you do not have to then it is a lot more easier to do this in a modeling langage, see here. If you absouletly have to do it in Python then I would suggest PyGLPK or PyMathProg. I have been using GLPK for 8 years now and I highly recommend it, however I have never tried these Python interfaces so I cannot help you any further with that. shareimprove this answer answered May 22 ‘12 at 16:06 Ali 25.4k888145 4 +1 for "use the right tool." – djechlin May 22 ‘12 at 22:46 use PuLP, its an awesome python interface for GLPK, CPLEX or Gurobi – Tom Larkworthy Oct 7 ‘13 at 20:18 2 Anonymous downvotes aren‘t helping anybody. What is wrong with the answer? – Ali Nov 1 ‘14 at 20:47 add a comment up vote 15 down vote I‘d recommend the package cvxopt for solving convex optimization problems in Python. A short example with Python code for a linear program is in cvxopt‘s documentation here.
http://stackoverflow.com/questions/10697995/linear-programming-in-python
http://abel.ee.ucla.edu/cvxopt/examples/tutorial/lp.html
原文:http://www.cnblogs.com/hdu-2010/p/5066672.html