Scippy

SCIP

Solving Constraint Integer Programs

pub_message.h File Reference

Detailed Description

public methods for message output

Author
Tobias Achterberg
Stefan Heinz

Definition in file pub_message.h.

#include <stdarg.h>
#include "scip/def.h"
#include "scip/type_message.h"

Go to the source code of this file.

Macros

#define SCIP_THREADSAFE_MESSAGEHDLRS
 
#define SCIPerrorMessage
 
#define printErrorHeader   SCIPmessagePrintErrorHeader
 
#define printError   SCIPmessagePrintError
 
#define SCIPdebug(x)
 
#define SCIPdebugMessage   while( FALSE ) printf
 
#define SCIPdebugPrintf   while( FALSE ) printf
 
#define SCIPdebugPrintCons(x, y, z)
 
#define SCIPstatistic(x)
 
#define SCIPstatisticMessage   while( FALSE ) printf
 
#define SCIPstatisticPrintf   while( FALSE ) printf
 

Functions

SCIP_RETCODE SCIPmessagehdlrCreate (SCIP_MESSAGEHDLR **messagehdlr, SCIP_Bool bufferedoutput, const char *filename, SCIP_Bool quiet, SCIP_DECL_MESSAGEWARNING((*messagewarning)), SCIP_DECL_MESSAGEDIALOG((*messagedialog)), SCIP_DECL_MESSAGEINFO((*messageinfo)), SCIP_DECL_MESSAGEHDLRFREE((*messagehdlrfree)), SCIP_MESSAGEHDLRDATA *messagehdlrdata)
 
void SCIPmessagehdlrCapture (SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_RETCODE SCIPmessagehdlrRelease (SCIP_MESSAGEHDLR **messagehdlr)
 
SCIP_RETCODE SCIPmessagehdlrSetData (SCIP_MESSAGEHDLR *messagehdlr, SCIP_MESSAGEHDLRDATA *messagehdlrdata)
 
void SCIPmessagehdlrSetLogfile (SCIP_MESSAGEHDLR *messagehdlr, const char *filename)
 
void SCIPmessagehdlrSetQuiet (SCIP_MESSAGEHDLR *messagehdlr, SCIP_Bool quiet)
 
void SCIPmessagePrintInfo (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVPrintInfo (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintInfo (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
 
void SCIPmessageVFPrintInfo (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr, va_list ap)
 
void SCIPmessagePrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVPrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVFPrintWarning (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessagePrintDialog (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...)
 
void SCIPmessageVPrintDialog (SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintDialog (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr,...)
 
void SCIPmessageVFPrintDialog (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *formatstr, va_list ap)
 
void SCIPmessagePrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, const char *formatstr,...)
 
void SCIPmessageVPrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, const char *formatstr, va_list ap)
 
void SCIPmessageFPrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
 
void SCIPmessageVFPrintVerbInfo (SCIP_MESSAGEHDLR *messagehdlr, SCIP_VERBLEVEL verblevel, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr, va_list ap)
 
void SCIPmessagePrintErrorHeader (const char *sourcefile, int sourceline)
 
void SCIPmessagePrintError (const char *formatstr,...)
 
void SCIPmessageVPrintError (const char *formatstr, va_list ap)
 
void SCIPmessageSetErrorPrinting (SCIP_DECL_ERRORPRINTING((*errorPrinting)), void *data)
 
void SCIPmessageSetErrorPrintingDefault (void)
 
SCIP_MESSAGEHDLRDATASCIPmessagehdlrGetData (SCIP_MESSAGEHDLR *messagehdlr)
 
FILE * SCIPmessagehdlrGetLogfile (SCIP_MESSAGEHDLR *messagehdlr)
 
SCIP_Bool SCIPmessagehdlrIsQuiet (SCIP_MESSAGEHDLR *messagehdlr)
 

Macro Definition Documentation

#define SCIP_THREADSAFE_MESSAGEHDLRS

define to identify SCIP version with thread-safe version of message handlers

Definition at line 42 of file pub_message.h.

#define printErrorHeader   SCIPmessagePrintErrorHeader

define used in blockmemshell/memory.c

Definition at line 49 of file pub_message.h.

#define printError   SCIPmessagePrintError

Definition at line 50 of file pub_message.h.

#define SCIPdebug (   x)

executes command only if SCIP_DEBUG flag is set

Definition at line 74 of file pub_message.h.

#define SCIPdebugMessage   while( FALSE ) printf

prints a debugging message if SCIP_DEBUG flag is set

Definition at line 77 of file pub_message.h.

Referenced by evalAbs(), SCIPexprintCompile(), SCIPexprintCreate(), SCIPexprintEval(), SCIPexprintHessianSparsityDense(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiClear(), SCIPlpiClearState(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiEndStrongbranch(), SCIPlpiExistsDualRay(), SCIPlpiExistsPrimalRay(), SCIPlpiFree(), SCIPlpiFreeNorms(), SCIPlpiFreeState(), SCIPlpiGetBase(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetBounds(), SCIPlpiGetCoef(), SCIPlpiGetColNames(), SCIPlpiGetCols(), SCIPlpiGetDualfarkas(), SCIPlpiGetInternalStatus(), SCIPlpiGetIntpar(), SCIPlpiGetIterations(), SCIPlpiGetNCols(), SCIPlpiGetNNonz(), SCIPlpiGetNorms(), SCIPlpiGetNRows(), SCIPlpiGetObj(), SCIPlpiGetObjsen(), SCIPlpiGetObjval(), SCIPlpiGetPrimalRay(), SCIPlpiGetRealpar(), SCIPlpiGetRealSolQuality(), SCIPlpiGetRowNames(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiGetSolverName(), SCIPlpiGetState(), SCIPlpiHasDualRay(), SCIPlpiHasPrimalRay(), SCIPlpiHasStateBasis(), SCIPlpiIgnoreInstability(), SCIPlpiInfinity(), SCIPlpiIsDualFeasible(), SCIPlpiIsDualInfeasible(), SCIPlpiIsDualUnbounded(), SCIPlpiIsInfinity(), SCIPlpiIsIterlimExc(), SCIPlpiIsObjlimExc(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalFeasible(), SCIPlpiIsPrimalInfeasible(), SCIPlpiIsPrimalUnbounded(), SCIPlpiIsStable(), SCIPlpiIsTimelimExc(), SCIPlpiLoadColLP(), SCIPlpiReadLP(), SCIPlpiReadState(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetBase(), SCIPlpiSetIntpar(), SCIPlpiSetNorms(), SCIPlpiSetRealpar(), SCIPlpiSetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPlpiStrongbranchFrac(), SCIPlpiStrongbranchInt(), SCIPlpiWasSolved(), SCIPlpiWriteLP(), and SCIPlpiWriteState().

#define SCIPdebugPrintf   while( FALSE ) printf

executes printf command only if SCIP_DEBUG flag is set

Definition at line 80 of file pub_message.h.

Referenced by SCIPlpiChgBounds(), and SCIPlpiGetCoef().

#define SCIPdebugPrintCons (   x,
  y,
 
)

executes SCIPprintCons() and prints termination symbol ";\n" only if SCIP_DEBUG flag is set

Definition at line 83 of file pub_message.h.

#define SCIPstatistic (   x)

executes command only if SCIP_STATISTIC flag is set

Definition at line 101 of file pub_message.h.

#define SCIPstatisticMessage   while( FALSE ) printf

prints a statistic message if SCIP_STATISTIC flag is set

Definition at line 104 of file pub_message.h.

#define SCIPstatisticPrintf   while( FALSE ) printf

executes printf command only if SCIP_STATISTIC flag is set

Definition at line 107 of file pub_message.h.

Function Documentation

SCIP_RETCODE SCIPmessagehdlrCreate ( SCIP_MESSAGEHDLR **  messagehdlr,
SCIP_Bool  bufferedoutput,
const char *  filename,
SCIP_Bool  quiet,
SCIP_DECL_MESSAGEWARNING((*messagewarning))  ,
SCIP_DECL_MESSAGEDIALOG((*messagedialog))  ,
SCIP_DECL_MESSAGEINFO((*messageinfo))  ,
SCIP_DECL_MESSAGEHDLRFREE((*messagehdlrfree))  ,
SCIP_MESSAGEHDLRDATA messagehdlrdata 
)

Creates and captures a message handler which deals with warning, information, and dialog (interactive shell) methods.

Note
The message handler does not handle error messages. For that see SCIPmessageSetErrorPrinting()
Creating a message handler automatically captures it.
Parameters
messagehdlrpointer to store the message handler
bufferedoutputshould the output be buffered up to the next newline?
filenamename of log file, or NULL for no log
quietshould screen messages be suppressed?
messagehdlrdatamessage handler data
void SCIPmessagehdlrCapture ( SCIP_MESSAGEHDLR messagehdlr)

captures message handler

Parameters
messagehdlrmessage handler, or NULL
SCIP_RETCODE SCIPmessagehdlrRelease ( SCIP_MESSAGEHDLR **  messagehdlr)

releases message handler

Parameters
messagehdlrpointer to the message handler
SCIP_RETCODE SCIPmessagehdlrSetData ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_MESSAGEHDLRDATA messagehdlrdata 
)

sets the user data of the message handler

Parameters
messagehdlrmessage handler; must not be NULL
messagehdlrdatanew message handler data to attach to the handler
void SCIPmessagehdlrSetLogfile ( SCIP_MESSAGEHDLR messagehdlr,
const char *  filename 
)

sets the log file name for the message handler

Parameters
messagehdlrmessage handler
filenamelog file name where to copy messages into, or NULL
void SCIPmessagehdlrSetQuiet ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_Bool  quiet 
)

sets the messages handler to be quiet

Parameters
messagehdlrmessage handler
quietshould screen messages be suppressed?
void SCIPmessagePrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)

prints a message, acting like the printf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
void SCIPmessageVPrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a message, acting like the vprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessageFPrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
  ... 
)

prints a message into a file, acting like the fprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
void SCIPmessageVFPrintInfo ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
va_list  ap 
)

prints a message into a file, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessagePrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)
void SCIPmessageVPrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a warning message, acting like the vprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessageFPrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)

prints a warning message into a file, acting like the fprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
void SCIPmessageVFPrintWarning ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a warning message into a file, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessagePrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
  ... 
)

prints a dialog message that requests user interaction, acting like the printf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
void SCIPmessageVPrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
const char *  formatstr,
va_list  ap 
)

prints a dialog message that requests user interaction, acting like the vprintf() command

Parameters
messagehdlrmessage handler
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessageFPrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
  ... 
)

prints a dialog message that requests user interaction into a file, acting like the fprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
void SCIPmessageVFPrintDialog ( SCIP_MESSAGEHDLR messagehdlr,
FILE *  file,
const char *  formatstr,
va_list  ap 
)

prints a dialog message that requests user interaction into a file, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessagePrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
const char *  formatstr,
  ... 
)

prints a message depending on the verbosity level, acting like the printf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
formatstrformat string like in printf() function
void SCIPmessageVPrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
const char *  formatstr,
va_list  ap 
)

prints a message depending on the verbosity level, acting like the vprintf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessageFPrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
FILE *  file,
const char *  formatstr,
  ... 
)

prints a message into a file depending on the verbosity level, acting like the fprintf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
void SCIPmessageVFPrintVerbInfo ( SCIP_MESSAGEHDLR messagehdlr,
SCIP_VERBLEVEL  verblevel,
SCIP_VERBLEVEL  msgverblevel,
FILE *  file,
const char *  formatstr,
va_list  ap 
)

prints a message into a file depending on the verbosity level, acting like the vfprintf() command

Parameters
messagehdlrmessage handler
verblevelcurrent verbosity level
msgverblevelverbosity level of this message
filefile stream to print into, or NULL for stdout
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessagePrintErrorHeader ( const char *  sourcefile,
int  sourceline 
)

prints the header with source file location for an error message using the static message handler

Parameters
sourcefilename of the source file that called the function
sourcelineline in the source file where the function was called
void SCIPmessagePrintError ( const char *  formatstr,
  ... 
)

prints an error message, acting like the printf() command using the static message handler

Parameters
formatstrformat string like in printf() function
void SCIPmessageVPrintError ( const char *  formatstr,
va_list  ap 
)

prints an error message, acting like the vprintf() command using the static message handler

Parameters
formatstrformat string like in printf() function
apvariable argument list
void SCIPmessageSetErrorPrinting ( SCIP_DECL_ERRORPRINTING((*errorPrinting))  ,
void *  data 
)

Method to set the error printing method. Setting the error printing method to NULL will suspend all error methods.

Note
The error printing method is a static variable. This means that all occurring errors are handled via this method.
Parameters
datadata pointer which will be passed to the error printing method, or NULL
void SCIPmessageSetErrorPrintingDefault ( void  )

Method to set the error printing method to default version prints everything the stderr.

Note
The error printing method is a static variable. This means that all occurring errors are handled via this method.
SCIP_MESSAGEHDLRDATA* SCIPmessagehdlrGetData ( SCIP_MESSAGEHDLR messagehdlr)

returns the user data of the message handler

Parameters
messagehdlrmessage handler
FILE* SCIPmessagehdlrGetLogfile ( SCIP_MESSAGEHDLR messagehdlr)

returns the log file or NULL for stdout

Parameters
messagehdlrmessage handler
SCIP_Bool SCIPmessagehdlrIsQuiet ( SCIP_MESSAGEHDLR messagehdlr)

returns TRUE if the message handler is set to be quiet

Parameters
messagehdlrmessage handler