linear programming in python?

前端 未结 7 1196

I need to make a linear programming model. Here are the inequalities I\'m using (for example):

6x + 4y <= 24
x + 2y <= 6
-x + y <= 1
y <= 2
         


        
7条回答
  •  Happy的楠姐
    2020-12-12 17:49

    The other answers have done a good job providing a list of solvers. However, only PuLP has been mentioned as a Python library to formulating LP models.

    Another great option is Pyomo. Like PuLP, you can send the problem to any solver and read the solution back into Python. You can also manipulate solver parameters. A classmate and I compared the performance of PuLP and Pyomo back in 2015 and we found Pyomo could generate .LP files for the same problem several times more quickly than PuLP.

提交回复
热议问题