Try our new documentation site (beta).
Filter Content By
Version
Text Search
Table of contents
Filter by Language
C API Details
C++ API Details
Java API Details
.NET API Details
Python API Details
Attributes
GRBVar
Gurobi variable object. Variables are always associated with a
particular model. You create a variable object by adding a variable
to a model (using
GRBModel.addVar), rather
than by using a GRBVar
constructor.
The methods on variable objects are used to get and set variable
attributes. For example, solution information can be queried by
calling get(GRB.DoubleAttr.X
).
Note, however, that it is generally more efficient to query attributes
for a set of variables at once. This is done using the attribute
query method on the GRBModel
object
(GRBModel.get).
Subsections








