manbet体育手机客户端


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.VarHintValandVarHintPri, the variable hint information.BranchPriority, the variable branch priority vector.Lazy, the lazy attribute for each constraint.VTag,CTagandQCTag, the tagged elements of the model.VBasisandCBasis, the basis information for variables and constraints.PStartandDStart, 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 090000
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 differentSECTION MIPSTART. Whenever an attribute file is loaded into a model, eachSECTION MIPSTARTwill 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.