getintattrib


Purpose
Get the value of an SLP integer attribute
Synopsis
function getintattrib(Type:string, Param:integer|string) :integer
Arguments
Type 
A character string beginning with "L" for the linear problem or "M" for the MIP (integer) problem in MISLP
Param 
The number or name of the required parameter. The number is given in the header file for the corresponding Xpress module (for example, xprs.h or xslp.h). If the name is used, it must be preceded by "XSLP_" or "XPRS_" as appropriate (for example, "xslp_ufs" or "xprs_cols").
Return value
The current value of the attribute (parameter set by the system) in the appropriate problem
Example
The following code fragment from a callback within a MISLP optimization prints the current node and its parent:
writeln("Node:   ",getintattrib("M",1013))
writeln("Parent: ",getintattrib("M",1027))
1013 is parameter xprs_nodes
1027 is parameter xprs_parentnode
Further information
The get...control and get...attrib functions are identical to getparam for the linear problem (Type="L"). During MISLP, MIP-specific information must be retrieved from the MIP problem (Type="M") because the linear problem is solving only subproblems and is not in MIP mode. Note that the required parameter can be specified as an integer or as a name. Specifying as an integer is generally more efficient. The value corresponding to a particular parameter can be found in the header file for the appropriate module (xprs.h or xslp.h). This function is also useful for setting parameters which have not been defined by name in the Mosel system.
Related topics
getdblattrib, getintcontrol, setintcontrol


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.