Gurobi Modeling Examples

Explore our modeling examples for the Gurobi Python API

Opti 202 Day 2 Exercises

Problems

We expand upon the now-classic widget problem even more by incorporting piecewise linear modeling, nonlinear components, and practical ways to deal with uncertainty.

There is also a basic portfolio optimization problem that maximizes the worst case among three potential scenarios.

Beware Spoilers!

We also put completed versions of the modeling notebook and the exercise in the repo. If you want to work through the notebooks without everything filled in make sure not to open the completed versions.

Note that you must sign in with a Google account to be able to run the code in Colab.

Google Colab Link - Exercise Set 2 without answers

Google Colab Link - Exercise Set 2 with answers


For details on licensing or on running the notebooks, see the overview on Modeling Examples

© Gurobi Optimization, LLC