Try our new documentation site (beta).


ATTR format

A Gurobi attribute (ATTR) file is used to store, and read, attribute information of a model -- provided by the user or generated during a previous solution call -- that affects the optimization process.

More precisely, this file stores -- if available -- the following attributes: X, the primal solution to the last optimization call. Start, all the stored MIP start vectors. Partition, the variable partition. VarHintVal and VarHintPri, the variable hint information. BranchPriority, the variable branch priority vector. Lazy, the lazy attribute for each constraint. VTag, CTag and QCTag, the tagged elements of the model. VBasis and CBasis, the basis information for variables and constraints. PStart and DStart, the simplex-start information for variables and constraints.

Any line starting with the character '#', or empty lines, are considered as comments, and will be discarded at reading time. The file should start by a line of the form
GRB_ATTR_FILE_VERSION 090001
which indicate the version of the file. Older versions are backward-compatible. Then follows a number of sections, each storing one set of attributes. Each section starts with one of the following:

  • SECTION SOLUTION
  • SECTION MIPSTART
  • SECTION PARTITION
  • SECTION VARHINTS
  • SECTION BRANCHPRIORITY
  • SECTION LAZYCONSTRS
  • SECTION BASIS
  • SECTION PSTART
  • SECTION DSTART
  • SECTION VTAG
  • SECTION CTAG
  • SECTION QCTAG

For those attributes for which there is a dedicated file extension, the following format is exactly the same as described in the corresponding file format description.

For sections involving other variable attributes, each line is a tuple describing the variable name, and the attribute(s) value related to it. Variables with attribute values at default may be omitted.

For sections involving other constraint attributes, each line is a tuple describing the constraint name, and the attribute(s) value related to it. Constraints with attribute values at default may be omitted.

If a model has multiple MIP starts, each of them will be saved in a different SECTION MIPSTART. Whenever an attribute file is loaded into a model, each SECTION MIPSTART will be loaded into a new MIP start vector.

The tags of variables and constraints must be enclosed in double quotes. If the tag itself contains a double quote, this needs to be escaped by a backslash. Moreover, if the tag contains a backslash, this also needs to be escaped, which yields two consecutive backslashes. For example, if a variable named “V01” has as a tag the string: “My Tag"\”, the corresponding line in the attribute file will contain:

V01 "My Tag \"\"
Note that tags can only consist of US-ASCII printable characters.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search

Gurobi Optimization