Jupyter Notebook Modeling Examples

We’ve developed examples to give you a starting point to learn how to build your own models with our Jupyter Notebook Modeling.

These Jupyter Notebook modeling examples illustrate important features of the Gurobi Python API modeling objects, such as adding decision variables, building linear expressions, adding constraints, and adding an objective function for a mathematical optimization model. In addition, they explain more advanced features such as generalized constraints, piece-wise linear functions, multi-objective hierarchical optimization, as well as typical types of constraints such as allocation constraints, balance constraints, sequencing constraints, precedence constraints, etc. These modeling examples also show how the modeling objects of Gurobi and the typical type of constraints can be used in different contexts.


These modeling examples:

  • Illustrate the broad applicability of mathematical optimization.
  • Show how to build mathematical optimization models.
  • Are coded using the Gurobi Python API in Jupyter Notebook.


Modeling Examples:


Modeling Tutorials:


Commercial License

Commercial Users: Gurobi allows you to try a free, full-featured, commercial evaluation license for 30 days. During that time, you’ll also get:

  • Free benchmarking services
  • Free model tuning services
  • Access to Gurobi’s world-class technical support
  • Two free hours of one-on-one consulting services

Can’t view the form? Please click here to open it in a new window.

Note to Academic Users: Academic users at recognized degree-granting institutions should get a free academic license instead and not a commercial evaluation license.

Evaluation licenses are reserved for our commercial users who first want to verify it fits with their needs.

Students, teachers and researchers can quickly secure a free academic license.

You can get your free license and learn about our academic program here.

Thank you! The information has been submitted successfully.