Skip to content

Downloads

All the material of the course, in PDF, updated at every publication of the site. Text, figures and data are under the CC BY 4.0 licence; the Python scripts under the MIT licence.

The three sets of notes

If you want the whole course to read offline, start from these three PDFs: they are the core of the material. What comes after is supplementary.

  • Modelling


    The methodological part: what a MIP model is, logic and binary variables, the fourteen links between variables with their proofs, relaxations, duality and bounds, constructive heuristics, and the step to Python/Gurobi.

    notes-1-modelling.pdf

  • Numerical problems


    The fifteen numerical models, from EX 1 to EX 15: explicit data, few variables, one step per technique. They are read to get the measure of things before the general problems.

    notes-2-numerical.pdf

  • Problems with a symbolic model


    The twenty-three problems of the three families and the mixed problems: statement, symbolic model, instance, heuristic, dual of the relaxation, optimum, additional questions and one variant worked out in full.

    notes-3-symbolic.pdf

The other documents

  • How to work with the course


    How the course is built, how every exercise is built and how the exam is built: the path, the grading criteria, the typical discussion questions, the most common mistakes, and the reproducibility of the numbers.

    course-organization.pdf

  • Problems to model


    For practice — solutions reserved for instructors.

    Forty problems presented as they would arise in practice, with no model written in advance: twenty with explicit numerical data and twenty in symbolic form.

    exercises.pdf

  • The slides


    One hundred and fifty slides: the method and the fourteen links, the sandwich of the bounds, and then every model and every problem --- one slide for each of the fifteen numerical models, the statement and the model of each of the twenty-three problems, and the forty problems to model. The models are generated from the same sources as the notes.

    mip-slides.pdf

  • The code


    One script per model, the generated notebooks, the data in CSV. Everything is regenerated with one command and every number is checked by an assert.

    mip-modelling

Regenerating everything

python3 -m pip install gurobipy pandas matplotlib mkdocs-material
python3 python/run_all.py            # data, figures, models and notebooks
python3 python/check_numbers.py      # every number quoted in the texts
python3 -m mkdocs build --strict     # the site

The licence shipped with the gurobipy pip package (2000 variables, 2000 constraints) is enough for every instance of the course.

The Gurobi licence

python3 -m pip install gurobipy

The pip package ships a demo licence (up to 2000 variables and 2000 constraints): enough for every instance of this course. On startup the line Restricted license - for non-production use only appears: that is normal.

Full academic licence, free of charge:

  1. register at https://portal.gurobi.com with an institutional email;
  2. request a Named-User Academic License;
  3. run the grbgetkey XXXXXXXX-... command shown by the portal (it needs the university network or the VPN);
  4. the licence lands in ~/gurobi.lic and from then on there is no size limit.