Gurobi Python Modeling Challenge

Practice your modeling skills, and win cool prizes!

The best way to improve your modeling skills and to learn Gurobi is to get your hands on one of our Jupyter Notebook Modeling Examples, and get started. To take part in the Gurobi Python Modeling Challenge, you’ll need basic Python programming skills. You’ll get exposure to Gurobi’s Python API, and will solve the Facility Location Problem.


How to Enter the Challenge

There are three simple steps to complete the challenge:

  • Install Gurobi Optimizer v9.1.
  • Download and work through the existing Facility Location Jupyter Notebook Modeling Example, which can be accessed by clicking on the link below.
  • Complete the Challenge Task, answer the Challenge Questions, and submit your entry.

That’s it! You’ll be entered into our raffle for a chance to win one of our incredible prizes!



Gurobi Founders

Grand Prize Second Place Third Place

  • A One-hour Chat with the Gurobi Founder of your choice:​ Ed Rothberg, CEO; Zonghao Gu, CTO; or Robert Bixby, Senior Advisor.
  • They'll answer any questions you may have, and can coach you on what it takes to build your skills in optimization.
  • You'll also receive a Gurobi jacket and the grand prize trophy!
  • Gurobi Founders

  • Patagonia Vest with Gurobi logo
  • Gurobi Founders

  • Patagonia Backpack with Gurobi logo
  • How to Get Started

    • Ensure you have Python 2.7, 3.6, 3.7, 3.8, or 3.9 installed.
    • Ensure you have Jupyter Notebook installed. Consult the Jupyter Notebook install page for instructions here.
    • Use the Gurobi Optimizer V9.1.
    • If you don’t have a Gurobi license, you can install the Gurobi Optimizer V9.1 limited license that allows you to solve small optimization problems with these instructions.
      • Install gurobipy for Gurobi V9.1 from Gurobi’s PyPI server using the command

        python -m pip install -i gurobipy

        Consult our Quick Start Guide for detailed instructions.

    • Existing Commercial users current on their maintenance and support with an existing 9.0 license, and existing eligible academic users, can upgrade to 9.1 immediately by visiting the Downloads (while logged in) page. Commercial users with an older version of Gurobi should contact to get this new release.


    Challenge Instructions

    • Understand the problem, the associated model formulation, and the implementation of the model using the Gurobi Python API.
    • Read the challenge task, and implement your solution approach in the Jupyter Notebook using the Gurobi Python API.
    • Answer the challenge questions by filling out the entry form.


    Facility Location Problem

    Facility Location Problem

    In this example, we solve a facility location problem where we want to build warehouses to supply a certain number of supermarkets. We construct a mixed-integer programming (MIP) model of this problem, implement this model in the Gurobi Python API, and compute an optimal solution.


    Download the Facility Location Jupyter Notebook Modeling Example

    Click on the button below to download the Facility Location Jupyter Notebook modeling example.


    Facility Location Modeling Example


    The Challenge Task

    The supermarket chain previously had unlimited funds available for shipping and now has a budget of 2 million Great British Pounds (GBP) for shipments from warehouses to supermarkets. Reformulate the model using the Gurobi Python API to consider this shipments’ budget and solve the new model with the Gurobi Optimizer V9.1.


    Challenge Questions

    In order to complete the challenge, be sure you can answer these questions:

    • What is the optimal total fixed cost?
    • What is the optimal location to build each warehouse?
    • What is the optimal total shipment cost?
    • What is the optimal percentage of shipments from each warehouse to the supermarkets?


    Once you have completed the Facility Location Example…

    • Fill out the Entry Form and ensure you answer the Challenge Questions to enter the raffle.
    • Email us at, if you have any questions.


    Facility Location Problem Entry Form


    Challenge Start Date:

    • Tuesday, November 10, 2020, at 3 PM ET.


    Challenge End Date:

    • Friday, January 15, 2021, at 6 PM ET.



    • Must be a registered attendee of the INFORMS Annual meeting.
    • Must be 18 years or older.
    • Entry must be submitted by the Challenge end date of Friday, January 15, 2021, at 6 PM ET.


    Winner Announcement

    Winners will be chosen and contacted via email on Tuesday, January 19, 2021.


    Any Questions?

    Please email us at