Attributes
Use the method getAttrib to retrieve the value of one or more controls. Its synopsis is one of the following:
getAttrib (attr) getAttrib ([attr1, attr2, ..., attrk]) getAttrib (attr1, attr2, ..., attrk) getAttrib ()
The first form is for obtaining the value of the attribute attr. The output will be the value of the attribute. The second and third forms are for retrieving attr1 , attr2 , ..., and attrk. Whether the attributes are declared in a list or a tuple does not matter. The result will be a dictionary coupling each attribute with its value. The last form is to obtain all attributes; the result is a dictionary coupling all attributes with their respective value.
A list of all attributes can be found on the Xpress Optimizer's reference manual. As for controls, the attribute parameters to be passed in getAttrib are lower-case strings. For a problem p the call will be as follows:
nrows = p.getAttrib ('nrow') problemsize = p.getAttrib ('nrow', 'ncol')