Optimisation for Artificial Intelligence, a 4-day course
« Previous | Up ↑ | Next »
In the notebook, we illustrated how the linprog
function in scipy.optimize
implements the simplex, provided we construct the A
, b
and c
matrices.
We implemented below the steel manufacturing problem with the linprog
function (note the equality and inequality constraints).
This process of constructing such large matrices is error-prone, and in practice, we use dedicated libraries:
the PuLP library, with the default open-source solver CBC. This solver falls behind its commercial counterparts but is sufficient for demonstration purposes within this course. It is possible to run a PuLP model with both solvers below (without catchy customisations);
the IBM Decision Optimization CPLEX Modeling docplex
for Python. Be careful as it may fall behind your version of Python. You are entitled to an academic license for education purposes if you register online. Commercial use is prohibited.
the Gurobi Python interface. You are entitled to an academic license for education purposes if you register online. Commercial use is prohibited.
code/
folder an implementation of the steel manufacturing problem with the three libraries. Implement the pasta production problem with the library of your choice.
« Previous | Up ↑ | Next »