12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Managing Log FilesAs <strong>ILOG</strong> <strong>CPLEX</strong> is working, it can record messages to a log file. By default, the InteractiveOptimizer creates the log file in the directory where it is running, and it names the filecplex.log. If such a file already exists, <strong>ILOG</strong> <strong>CPLEX</strong> adds a line indicating the currenttime and date and then appends new information to the end of the existing file. That is, itdoes not overwrite the file, and it distinguishes different sessions within the log file. Bydefault, there is no log file for Component Library applications.You can locate the log file where you like, and you can rename it. Some users, for example,like to create a specifically named log file for each session. Also you can close the log file incase you do not want <strong>ILOG</strong> <strong>CPLEX</strong> to record messages to its default log file.The following sections show you the commands for managing a log file.◆ Creating, Renaming, Relocating Log Files on page 149◆ Closing Log Files on page 149Creating, Renaming, Relocating Log Files◆◆◆In the Interactive Optimizer, use the command set logfile filename, substitutingthe name you prefer for the log file. In other words, use this command to rename orrelocate the default log file.From the Callable Library, first use the routine CPXfopen to open the target file; then usethe routine CPXsetlogfile. The <strong>ILOG</strong> <strong>CPLEX</strong> Reference <strong>Manual</strong> documents bothroutines.From Concert, use the setOut method to send logging output to the specified outputstream.Closing Log Files◆◆◆If you do not want <strong>ILOG</strong> <strong>CPLEX</strong> to record messages in a log file, then you can close thelog file from the Interactive Optimizer with the command set logfile *.By default, routines from the Callable Library do not write to a log file. However, if youwant to close a log file that you created by a call to CPXsetlogfile, callCPXsetlogfile again, and this time, pass a NULL pointer as its second argument.From Concert, use the setOut method with env.getNullStream as argument, whereenv is an IloEnv object, to stop sending logging output to an output stream.<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 149

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!