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?
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.
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.
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.
I'd recommend looking at PULP and/or Pyomo.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With