Initializing help system before first use

problem.printmsg

problem.printmsg


Purpose
Print a message string according to the current settings for Xpress Nonlinear output
Synopsis
problem.printmsg (msgtype, msg)
Arguments
MsgType 
Integer containing the message type. The following types are system-defined:
Information message
Warning message
Error message
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.
status = p.attributes.xslp_status
if status == 0:
  p.printmsg (1, "Fully converged solution")
if status & xp.xslp_maxtime:
  p.printmsg (3, "Max time exceeded")
if status & xp.xslp_convergedobjucc:
  p.printmsg (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 callbacks.