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 that you can also query attributes for a set of variables at once. This is done using the attribute query method on the GRBModel object (GRBModel::get).



Subsections