Try our new documentation site (beta).
Gurobi Optimizer Quick Start Guide
Version 5.6, Copyright © 2013, Gurobi Optimization, Inc.
Welcome to the Gurobi Optimizer Quick Start Guide! This document provides a basic introduction to the GurobiTM Optimizer. It begins with a Software Installation Guide and information on How to Obtain and Install a Gurobi License. It continues with an example that shows you how to create a simple optimization model and solve it with the Gurobi Command Line. It then continues with a discussion of the Gurobi Interactive Shell. We suggest that all users read these first four sections.
Depending on the programming language from which you intend to use the Gurobi Optimizer, you may also wish to read the sections devoted to the Gurobi C Interface, C++ Interface, Java® Interface, Microsoft® .NET Interface, Python® Interface, MATLAB® Interface, or R Interface. Our Python interface will be of particular interest to those who wish to build models using higher-level modeling constructs.
This document continues with a File Overview, which gives a quick overview of the files that are included in the Gurobi distribution.
Additional resources
Once you are done with the Quick Start Guide, you can find additional information in a number of places:
- If you are familiar with mathematical modeling and want to dive right into the details of how to use Gurobi from one of our programming language APIs, you should consult the Gurobi Reference Manual.
- If you would like a tour of the various examples we provide with Gurobi, you should consult the Gurobi Example Tour.
- If you would like to learn more about mathematical programming or mathematical modeling, we've collected a set of references in our recommended reading section.
Getting help
If you have a question that is not answered in this document, you can
post it to the Gurobi Google
Group. If you have a
current maintenance contract with us, you can send your question to
support@gurobi.com
.
For most users, your next step is to move on to our Software Installation Guide.
- Software Installation Guide
- How to Obtain and Install a Gurobi License
- Creating a new trial or academic license
- Retrieving a license key
- Setting up a token server
- Setting up a compute server
- Creating a client license
- Testing the license
- Solving a Simple Model - The Gurobi Command Line
- The problem statement - producing coins
- The optimization model
- The model file
- Solving the model using the Gurobi command-line interface
- Interactive Shell
- Reading and optimizing a model
- Inspecting the solution
- Simple model modification
- Simple experimentation with a more difficult model
- Changing parameters
- Parameter tuning tool
- Using a gurobi.env file
- Working with multiple models
- Help
- Interface customization
- Customization through callbacks
- The Gurobi Python Interface for Python Users
- Attributes
- C Interface
- Example mip1_c.c
- Example details
- Creating the environment
- Creating the model
- Adding variables to the model
- Changing the objective sense
- Updating the model - lazy modification
- Adding constraints to the model
- Optimizing the model
- Error reporting
- Building and running the example
- C++ Interface
- Example mip1_c++.cpp
- Example details
- Creating the environment
- Creating the model
- Adding variables to the model
- Updating the model - lazy modification
- Setting the objective
- Adding constraints to the model
- Optimizing the model
- Reporting results - attributes
- Error handling
- Building and running the example
- Java Interface
- Example Mip1.java
- Example details
- Creating the environment
- Creating the model
- Adding variables to the model
- Updating the model - lazy modification
- Setting the objective
- Adding constraints to the model
- Optimizing the model
- Reporting results - attributes
- Cleaning up
- Error handling
- Building and running the example
- .NET Interface (C#)
- Example mip1_cs.cs
- Example details
- Creating the environment
- Creating the model
- Adding variables to the model
- Updating the model - lazy modification
- Setting the objective
- Adding constraints to the model
- Optimizing the model
- Reporting results - attributes
- Cleaning up
- Error handling
- Building and running the example
- Python Interface
- MATLAB Interface
- Setting up Gurobi for MATLAB
- Example
- Example details
- Building the model
- Modifying Gurobi parameters
- Solving the model
- Printing the solution
- Running the example
- R Interface
- Installing the R Package
- Example
- Example details
- Building the model
- Modifying Gurobi parameters
- Solving the model
- Printing the solution
- Running the example
- Recommended Reading
- Installing a Python IDE
- File Overview