getdblattrib


Purpose
Get the value of an SLP double (real) attribute
Synopsis
function getdblattrib(Type:string, Param:integer|string) :real
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_errorcosts" or "xprs_lpobjval").
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 best bound:
writeln("Best bound = ",getdblattrib("M",2004)))
2004 is parameter xprs_bestbound

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
getdblcontrol, setdblcontrol, getintattrib


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