XSLPprintmsg
XSLPprintmsg |
Purpose
Print a message string according to the current settings for Xpress NonLinear output
Synopsis
int XPRS_CC XSLPprintmsg(XSLPprob Prob, int MsgType, char *Msg);
Arguments
Prob
|
The current SLP problem.
|
||||||
MsgType
|
Integer containing the message type. The following types are system-defined:
Other message types can be used and passed to a user-supplied message handler.
|
||||||
Msg
|
Character string containing the message.
|
Example
The following example checks the SLP optimization status and prints an informative message for some of the possible values.
int Status; XSLPgetintattrib(Prob, XSLP_STATUS, &Status); if (!Status) XSLPprintmsg(Prob, 1, "Fully converged solution"); if (Status & XSLP_MAXTIME) XSLPprintmsg(Prob, 3, "Max time exceeded"); if (Status & XSLP_CONVERGEDOBJUCC) XSLPprintmsg(Prob, 1, "Solution with unimportant " "unconverged values");
Further information
If
MsgType is outside the range 1 to 4, any message handler written to handle the standard message types may not print the message correctly. One of the uses of the function is to provide a unified means of logging from the XSLP callbacks.