Using messages

These message-handling utilities control messages sent to the screen and to files.

CPLEX message-handling utilities give users complete control over messages sent to the screen and to files. They also provide support for the creation of user-defined messages.

Note:

Names of classes, methods, and symbolic constants in the C#.NET API correspond very closely to those in the Java API with these systematic exceptions:

  • In the Java API, the names of classes begin with the prefix Ilo, whereas in C#.NET they do not.

  • In the Java API, the names of methods conventionally begin with a lowercase letter, for example, addCols, whereas in the C#.NET API, the names of methods conventionally begin with an uppercase (that is, capital) letter, for example, AddCols according to Microsoft practice.

Purpose Java API C++ API C API
Accesses CPLEX default channels IloCplex. output, IloCplex. warning IloCplex:: out, IloCplex:: warning. IloCplex derives from IloAlgorithm and thus inherits its methods. CPXXgetchannels and CPXgetchannels
Accesses logfile for pre-defined channels IloCplex. output IloAlgorithm:: out CPXXgetlogfilename and CPXgetlogfilename
Designates logfile for pre-defined channels IloCplex. setOut IloAlgorithm:: setOut CPXXsetlogfilename and CPXsetlogfilename
Flushes all message destinations for a channel Use java.io.OutputStream.flush on result of IloCplex. output Use ostream::flush on result of IloCplex:: out CPXXflushchannel and CPXflushchannel
Causes CPLEX default channels to be flushed Use java.io.OutputStream.flush on result of IloCplex. output Use ostream::flush on result of IloCplex:: out CPXXflushstdchannels and CPXflushstdchannels
Flushes and clears destination list for a channel IloCplex. setOut (null) IloAlgorithm:: setOut (env, getNullStream) CPXXdisconnectchannel and CPXdisconnectchannel
Sends a message into a channel Send output to result of IloCplex. output Send output to result of IloCplex:: out CPXXmsgstr and CPXmsgstr
Adds destination functions for a channel ---- ---- CPXXaddfuncdest and CPXaddfuncdest
Deletes destination functions for a channel ---- ---- CPXXdelfuncdest and CPXdelfuncdest
Obtains the string that corresponds to an error code IloException .toString Output operator of IloCplex_Exception CPXXgeterrorstring and CPXgeterrorstring