Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What libraries should I use for linear programming in python? [closed]

Tags:

A quick search on "python linear programming" turns up a lot of hits (e.g. this one). Looking through them, I see a fair number of complaints about outdated dependencies, poor documentation, etc.

Can anybody recommend a headache-free (e.g. fast, well-documented, easy-to-install, clean API) linear programming library for python?

like image 736
Abe Avatar asked Apr 26 '11 13:04

Abe


People also ask

Which Python library provides methods to solve linear programming?

SciPy is a general-purpose package for scientific computing with Python. PuLP is a Python linear programming API for defining problems and invoking external solvers.

Which Python library is mostly used?

Pandas. Pandas (Python data analysis) is a must in the data science life cycle. It is the most popular and widely used Python library for data science, along with NumPy in matplotlib.

What is PuLP library in Python?

PuLP is a python library which can be used to solve linear programming problems. Linear Programming is used to solve optimization problems and has uses in various industries such as Manufacturing, Transportation, Food Diets etc.


2 Answers

I'd recommend looking at PULP and/or Pyomo.

like image 141
solvingPuzzles Avatar answered Oct 14 '22 10:10

solvingPuzzles


cvxopt is written by Lieven Vandenberghe and some of his collaborators. (This is the same Vandenberghe of the widely used convex optimization textbook by Boyd and Vandenberghe.) It's a general convex conic programming solver, and uses an interior point method. On the plus side it's well-documented, has many examples, and is easy to use. I believe it scales fairly well, though not as well as commercial products like Xpress, Gurobi, or cplex.

Looks like there's a pull request to scipy containing a (pure python) linear programming implementation, though. So a linear programming solver could be in scipy in the future.

like image 36
cjordan1 Avatar answered Oct 14 '22 09:10

cjordan1