Using Messages

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 .NET API correspond very closely to those in the Java API with these systematic exceptions:

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.

CPXgetchannels

Accesses logfile for pre-defined channels

IloCplex.output

IloAlgorithm::out

CPXgetlogfile

Designates logfile for pre-defined channels

IloCplex.setOut

IloAlgorithm::setOut

CPXsetlogfile

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

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

CPXflushstdchannels

Flushes and clears destination list for a channel

IloCplex.setOut(null)

IloAlgorithm::setOut(env.getNullStream)

CPXdisconnectchannel

Flushes, clears, and frees memory for a channel

----

----

CPXdelchannel

Adds destination files for a channel

IloCplex.setOut,
or IloCplex.setWarning

IloAlgorithm::setOut or IloAlgorithm::setWarning

CPXaddfpdest

Deletes destination files for a channel

IloCplex.setOut(null), or IloCplex.setWarning

IloAlgorithm::setOut(env.getNullStream), also IloAlgorithm::setWarning

CPXdelfpdest

Creates a new channel

----

----

CPXaddchannel

Sends a message into a channel

Send output to result of IloCplex.output

Send output to result of IloCplex::out

CPXmsg

Adds destination functions for a channel

----

----

CPXaddfuncdest

Deletes destination functions for a channel

----

----

CPXdelfuncdest

Obtains the string that corresponds to an error code

IloException.toString

Output operator of IloCplex::Exception

CPXgeterrorstring