Gurobi Modeling Examples

Explore our modeling examples for the Gurobi Python API

Modeling Session 1 - More 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 minimize cost.

This is an extension of the same example from Opti 101’s first modeling session.

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.

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