Gurobi Optimizer Quick Start Guide - macOS
![\scalebox{1.0}{\includegraphics[width=3in]{logo.png}}](https://www.gurobi.com/wp-content/plugins/hd_documentations/documentation/10.0/quickstart_mac/img1.svg?x61957)
Welcome to the GurobiTM Optimizer Quick Start Guide for macOS users! This document provides a basic introduction to the Gurobi Optimizer, including:
- Information on Obtaining a Gurobi License.
- A Software Installation Guide, which includes information on Retrieving and Setting Up your License.
- An example of how to create a simple optimization model and solve it with the Gurobi Command Line, and
- A discussion of the Gurobi Interactive Shell.
We suggest that all users read these first five sections.
Once you have done this, you will probably want to choose a programming environment from which to use Gurobi. If you don't have a strong preference, we recommend that you use our Python® interface, which provides a number of benefits. First, Python is a very nice programming language that can be used for anything from experimentation to prototyping to deployment. Beyond this, though, our Python interface includes a set of higher-level modeling constructs that make it much easier to build optimization models. We also include instructions for installing the Anaconda Python distribution, which includes both a graphical development environment (Spyder) and a notebook-style interface (Jupyter).
If you already have a preferred programming language, you can select from among our available interfaces:
- C interface,
- C++ interface,
- Java® interface,
- Microsoft® .NET interface,
- Python interface,
- MATLAB® interface, or
- R interface.
At the end of the Quick Start Guide, you'll find a File Overview that lists the files included in the Gurobi distribution.
Additional resources
Once you are done with the Quick Start Guide, the next step is to explore these additional resources:
- If you are familiar with mathematical modeling and are ready to use Gurobi from one of our programming language APIs, consult the Gurobi Reference Manual.
- If you would like to see examples of ways to use Gurobi, consult the Gurobi Example Tour.
- If you are a Gurobi Compute Server user, consult the Gurobi Remote Services Reference Manual.
- If you would like to learn more about mathematical programming or 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, please visit the Gurobi support site at https://support.gurobi.com. There, you can read knowledge base articles and join the community discussion forum. Also, if you have a current maintenance contract, you can use the Gurobi support site to submit a request to the Gurobi support team.
Ready to get started? Your first step is to Obtain a License.
- Obtaining a Gurobi License
- Software Installation Guide
- Retrieving and Setting Up a Gurobi License
- Free Academic license
- Named-User or Single-Machine or Single-Use license
- Web License Service (WLS) client license
- Floating license
- Compute Server license
- Starting Gurobi Remote Services
- Using an Instant Cloud license
- Testing your license
- Setting environment variables
- 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
- Attributes
- C Interface
- Example mip1_c.c
- Example details
- Creating the environment
- Creating the model
- Adding variables to the model
- Changing the objective sense
- 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
- 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
- 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
- Setting the objective
- Adding constraints to the model
- Optimizing the model
- Reporting results - attributes
- Cleaning up
- Error handling
- Building and running the example
- NuGet package
- Python Interface
- Python Installation Options
- Python Tools
- gurobipy, the Gurobi Python Interface
- Simple Python Example
- Python Matrix Example
- Python Dictionary Example
- Running the examples
- 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
- File Overview