Try our new documentation site (beta).
Filter Content By
Version
Text Search
${sidebar_list_label} - Back
Filter by Language
Example details
Let us now walk through the example, line by line, to understand how it achieves the desired result of optimizing the indicated model.
The example begins by importing the Gurobi functions and classes:
from gurobipy import *Gurobi Python applications should always start with this line.
Note that in order for this command to succeed, the Python application
needs to know how to find the Gurobi functions and classes. Recall
that you have two options here. The first is to use the Python files
that are included with our distribution. You would run this example
by typing gurobi.bat mip1.py
(Windows) or
gurobi.sh mip1.py
(Linux and Mac). The second option is to
install the Gurobi functions and classes into your own
Python installation.