The GurobiTM distribution includes an extensive set of examples that illustrate commonly used features of the Gurobi libraries. Most examples have versions for C, C++, C#, Java, Visual Basic, and Python. A few, however, illustrate features that are specific to the Python interface.
This document provides a brief tour of these examples. We won't go through each example in detail. Instead, we'll start with an Overview of the set of tasks that you are likely to want to perform with the Gurobi Optimizer. Later sections will then describe how specific examples accomplish each of these tasks. We suggest that you browse the example source code (in a text editor, or in another browser window) while reading this document. This document includes Source Code for all of the examples, in all available languages. Source files are also available in the examples directory of the Gurobi distribution.
A brief note for users of the Gurobi MATLAB® and R interfaces: our interfaces to these languages are built around the assumption that you will use the rich matrix-oriented capabilities of the underlying languages to build your optimization models. Thus, our examples for these languages don't attempt to show you how to build models. We have instead chosen to provide a few simple examples that demonstrate how to pass matrices into our interface.
If you would like further details on any of the Gurobi routines used in these examples, please consult the Gurobi Reference Manual.