Gurobi Modeling Examples

Explore our modeling examples for the Gurobi Python API

Modeling Session 1 - Widget Distribution Optimization

Problem

Given demand data produced by a hypothetical machine learning model, as well as transportation costs and production capacity, determine the optimal production and shipment of widgets from a set of production facilities to distribution locations that minimizes cost.

Along with the modeling example, an exercice is provided. It contains some general questions as well as some modeling questions.

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.

View the notebook

Google Colab Link - Modeling Session without answers

Google Colab Link - Exercise without answers

Google Colab Link - Modeling Session with answers

Google Colab Link - Exercise with answers


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