When I was at PyCon, I had a number of people ask me what resources they could use to to learn more about mathematical optimisation. I thought I’d share my list in this article – if there’s any good content out there I may have missed, please reach out and I’d love to add it to this page!
Articles
- Mathematical Optimization: A Powerful Tool for the Energy Industry
- Hands-On Linear Programming: Optimization With Python
- Linear Programming (Brilliant)
- What is Linear Programming? Definition, Methods and Problems
- Linear Programming (BYJU’S)
- Linear Programming (GeeksForGeeks)
- Pyomo Cookbook
Courses
- Free optimisation course created by Gurobi and Georgia Tech available on Udemy
- DataCamp course on optimisation using Python’s Pulp library
Videos
- Operations Research Video Course
- UT Austin Tutorials
Books
Python Libraries
To build a mathematical optimisation, you need to do two things: formulate the program, and then pass it to a solver program.
In terms of open source tools, I tend to formulate my model using Pyomo, developed by the National Renewable Energy Laboratory (NREL). You can then use the HiGHS solver (developed by the University of Edinburgh) to solve your model. Both of these libraries are easy to install via pip. Pyomo also has the advantage of allowing you to swap solvers without having to rewrite your program.
As I tend to build a lot of extremely large and complex models (especially ones with a lot of binary or integer variables), I end up using commercial solvers like Gurobi a fair bit. Gurobi has a lot of excellent Python libraries too like gurobipy and gurobipy-pandas.