Organization of the lab
The lab at a glance
7 application chapters · 3 chapters of tools · LP models only · one Colab notebook per chapter · reproducible Python/Gurobi code. The full list, chapter by chapter, is in the syllabus.
-
Self-assessment
Mock exam
A new mock exam at every start: 13 questions, 33 points, with the solutions and links to the notes.
Download as PDF
- 📘 Full lecture notes — models, worked examples, case studies, sensitivity analysis
- 📊 Lecture slides — one deck per chapter of the notes, on the downloads page
Getting started
Nothing to install: every chapter has its own notebook that opens in Colab and runs in the browser. Those who prefer to work locally find the commands and the notes on the Gurobi licence on the same page.
Essential path in four lab sessions
| Content | Learning objectives | |
|---|---|---|
| Lab 1 | Production and inventory | formulate a multi-period LP; read duals, slacks and ranges; verify a shadow price by perturbation |
| Lab 2 | Data Envelopment Analysis | build one LP per unit; read the envelopment form (peers and targets); tell weak from strong efficiency |
| Lab 3 | Newsvendor or CVaR | formulate a scenario LP; read the optimal quantile; measure the cost of protection |
| Lab 4 | Project of your choice | EV charging, arbitrage or robust and quantile regression; managerial presentation |
The most common mistakes
- Reading
.Xor.Piwithout checkingm.Status. - Forgetting
lb=-GRB.INFINITYon the free variables (\(b\) of the regression, \(\eta\) of the CVaR). - Using a shadow price outside its validity range.
- Getting the sign of the duals wrong in minimization problems.
- Updating the RHS of a constraint that contains constants on the left-hand side.
- Optimizing a single objective when the problem has two (pure minimax).
- Choosing the parameters (\(\tau\), \(\lambda\), the budget) by looking at the data used to decide.
- Reporting six decimal digits from estimates that wobble at the second.
Reproducibility
python3 -m pip install gurobipy matplotlib pandas scipy # scipy: statistical functions only
python3 python/run_all.py # regenerates data, results and figures
The slides are on the downloads page; the solutions to the exercises are distributed in class.