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

 

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

 

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

 

Intermediate

Economic Planning

In this example, you'll discover how mathematical optimization can be used to address a macroeconomic planning problem that a country may face. We'll show you how to model and solve an input-output problem encompassing the interrelationships between the different sectors of a country’s economy.

 Learn More

 

Intermediate

Efficiency Analysis

How can mathematical optimization be used to measure the efficiency of an organization? Find out in this example, where you'll learn how to formulate an Efficiency Analysis model as a linear programming problem using the Gurobi Python API and then generate an optimal solution with the Gurobi Optimizer.

 Learn More

 

Intermediate

Electrical Power Generation

Major electric power companies around the world utilize mathematical optimization to manage the flow of energy across their electrical grids. In this example, you'll discover the power of mathematical optimization in addressing a common energy industry problem: electrical power generation. We'll show you how to figure out the optimal set of power stations to turn on in order to satisfy anticipated power demand over a 24-hour time horizon. 

 Learn More

 

Intermediate

Factory Planning

Want to learn how to create an optimal production plan that will maximize your profits? In this example, we'll teach you how to solve this classic production planning problem. 

 Learn More

 

Intermediate

Food Manufacturing

If you're hungry for a mathematical optimization challenge, then try this food manufacturing problem. You'll learn how to create an optimal multi-period production plan for a product that requires a number of ingredients – each of which has different costs, restrictions, and features.

 Learn More

 

Intermediate

Logical Design

This problem is an example of constructing a circuit using the minimum number of NOR gates (devices with two inputs and one output) that will perform the logical function specified by a truth table. This problem is formulated as a binary optimization problem using the Gurobi Python API and solved with the Gurobi Optimizer.

 Learn More

 

Intermediate

Mining

Put your planning skills to the test in this example, where you'll learn how to model and solve a production planning problem that involves optimizing the operations of a group of mines over a five-year period. 

 Learn More

 

Intermediate

Opencast Mining

How can a mining company use mathematical optimization to identify which excavation locations to choose in order to maximize the gross margins of extracting ore? Try this modeling example to find out! 

 Learn More

 

Intermediate

Optimizing a power generation schedule

The electricity grid powers nearly every aspect of modern life — be it charging a phone, powering a factory, or mining Bitcoin. Managing the supply and demand of electricity can be a complex and challenging task. In this notebook, we model this decision-making problem using mathematical optimization.

 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