Jump-Start Your Optimization Discovery

Explore our modeling examples below, access them via GitHub, or download the entire collection. You can also check out examples for other programming languages, or dive into our functional code. MIP developers: Be sure to check out ticdat.

  • Difficulty

  • Business Needs

 

Intermediate

Agricultural Pricing

Try this example to learn how to use mathematical optimization to tackle a common, but critical agricultural pricing problem:  Determining the prices and demand for a country's dairy products in order to maximize total revenue derived from the sales of those products. You will learn how to model this problem as a quadratic optimization problem using the Gurobi Python API and solve it using the Gurobi Optimizer.

 Learn More

 

Introductory

Airline Planning After Flight Disruption

Weather events are a major threat to the airline industry. This notebook walks through the optimization problem of deciding which flights to operate and which flights to cancel after a weather disruption.

 Learn More

 

Introductory

Avocado Price Optimization

This example optimizes avocado prices to maximize revenue using a quadratic program. The relationship between price and demand is modeled using linear regression.

 Learn More

 

Intermediate

Best Feature Selection for Forecasting

In this example, you will learn how to perform linear regression with feature selection using mathematical programming. We'll show you how to construct a mixed-integer quadratic programming (MIQP) model of this linear regression problem, implement this model in the Gurobi Python API, and generate an optimal solution.

 Learn More

 

Beginner

Cell Tower Coverage Problem

A simple covering problem that builds a network of cell towers to provide signal coverage to the largest number of people possible.

 Learn More

 

Beginner

Combining Machine Learning and Optimization Modeling in Fantasy Basketball

Fantasy sports has turned into a mainstream activity over the last ten to twenty years with leagues now working with popular fantasy sports sites as official partners. If you’re not familiar with fantasy sports, the goal is to select players from a slate of real games to fill out a virtual lineup.

 Learn More

 

Advanced

Constraint Optimization

If you are looking to improve your modeling skills, then try this tricky constraint optimization problem. We'll show you how to model this problem as a linear programming problem using the Gurobi Python API and solve it using the Gurobi Optimizer.

 Learn More

 

Beginner

COVID-19 Facility Capacity Optimization

This COVID-19 Healthcare Facility Capacity Optimization problem shows you how to determine the optimal location and capacity of healthcare facilities.

 Learn More

 

Beginner

Curve Fitting

Try this Jupyter Notebook Modeling Example to learn how you can fit a function to a set of observations. We will formulate this regression problem as a linear programming problem using the Gurobi Python API and then solve it with the Gurobi Optimizer.

 Learn More

 

Intermediate

Customer Assignment

Sharpen your mathematical optimization modeling skills with this example, in which you will learn how to select the location of facilities based on their proximity to customers. We'll demonstrate how you can construct a mixed-integer programming (MIP) model of this facility location problem, implement this model in the Gurobi Python API, and generate an optimal solution using the Gurobi Optimizer.

 Learn More

 

Advanced

Decentralization Planning

Ready for a mathematical optimization modeling challenge? Put your skills to the test with this example, where you'll learn how to model and solve a decentralization planning problem. You'll have to figure out – given a set of departments of a company, and potential cities where these departments can be located – the "best" location for each department in order to maximize gross margins.

 Learn More

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search