CONOPT
Loading...
Searching...
No Matches
Message handler methods

Functions

 pyconopt.Conopt.setMessageHandler (self, msghandler)
 sets the message handler to the user supplied handler.
 
 pyconopt.Conopt.sendMessage (self, msg)
 sends a message to the message handler
 
 pyconopt.Conopt.setVerbosityLevel (self, verblevel)
 sets the verbosity level for messaging
 

Detailed Description

Methods for loading and using a user-defined message handler.

CONOPT includes a default message handler. This passes all messages to the standard out and error messages to the standard error. It is possible to load a user-defined message handler using these methods of the CONOPT api.

/*!

Function Documentation

◆ setMessageHandler()

pyconopt.Conopt.setMessageHandler ( self,
msghandler )

sets the message handler to the user supplied handler.

The pointer to the supplied message handler is stored in the interface object. The user is responsible for the creation and destruction of the message handler object.

Parameters
msghandlera user defined ConoptMessageHandler object

Definition at line 1598 of file pyconopt.py.

◆ sendMessage()

pyconopt.Conopt.sendMessage ( self,
msg )

sends a message to the message handler

Parameters
msgA string for the message that will be processed in the message handler

Definition at line 1612 of file pyconopt.py.

◆ setVerbosityLevel()

pyconopt.Conopt.setVerbosityLevel ( self,
verblevel )

sets the verbosity level for messaging

The verbosity level is:

  • None – turn off all output
  • Normal – normal output, iteration log to stdout and error to stderr
  • Error – more detailed iteration log to stdout, error to stdout and stderr
  • Debug – extensive iteration log, error to stdout and stderr
Parameters
verblevelthe verbosity level for the message handler

Definition at line 1623 of file pyconopt.py.