首页 > 编程语言 > 详细

Python 科学计算 (问题汇集)

时间:2015-12-22 15:59:38      阅读:243      评论:0      收藏:0      [点我收藏+]

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 arent helping anybody. What is wrong with the answer? – Ali Nov 1 14 at 20:47
add a comment
up vote
15
down vote
    

Id recommend the package cvxopt for solving convex optimization problems in Python. A short example with Python code for a linear program is in cvxopts documentation here.
detials

http://stackoverflow.com/questions/10697995/linear-programming-in-python

http://abel.ee.ucla.edu/cvxopt/examples/tutorial/lp.html

 

Python 科学计算 (问题汇集)

原文:http://www.cnblogs.com/hdu-2010/p/5066672.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!