Gurobi Modeling Examples

Explore our modeling examples for the Gurobi Python API

Factory Planning


Factory Planning 1

This model is an example of a production planning problem. In such problems, the goal is to create an optimal production plan to maximize profit.

More information on this type of model can be found in example # 3 of the fifth edition of Modeling Building in Mathematical Programming by H. P. Williams on pages 255-256 and 300-302.

This modeling example is at the intermediate level, where we assume that you know Python and are familiar with the Gurobi Python API. In addition, you should have some knowledge about building mathematical optimization models.

View the notebook

Google Colab Link


Factory Planning 2

This model extends the Factory Planning I example above to add complexity whereby the month where each machine is down will, instead of being fixed, be determined as a part of the optimized plan.

More information on this type of model can be found in example # 4 of the fifth edition of Modeling Building in Mathematical Programming by H. P. Williams on pages 256 and 302-303.

This modeling example is at the intermediate level, where we assume that you know Python and are familiar with the Gurobi Python API. In addition, you should have some knowledge about building mathematical optimization models.

View the notebook

Google Colab Link


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

© Gurobi Optimization, LLC