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.

Using Diagnostic Routines for Debugging<strong>ILOG</strong> <strong>CPLEX</strong> also provides diagnostic routines to look for common errors in the definitionof problem data. In the standard distribution of <strong>ILOG</strong> <strong>CPLEX</strong>, the file check.c contains thesource code for these routines:◆◆◆◆◆◆◆◆CPXcheckcopylpCPXcheckcopylpwnamesCPXcheckcopyqpsepCPXcheckcopyquadCPXcheckaddrowsCPXcheckaddcolsCPXcheckchgcoeflistCPXcheckvals◆CPXcheckcopyctype◆◆CPXcheckcopysosCPXNETcheckcopynetEach of those routines performs a series of diagnostic tests of the problem data and issueswarnings or error messages whenever it detects a potential error. To use them, you mustcompile and link the file check.c. After compiling and linking that file, you will be able tostep through the source code of these routines with a debugger to help isolate problems.If you have observed anomalies in your application, you can exploit this diagnosticcapability by calling the appropriate routines just before a change or copy routine. Thediagnostic routine may then detect errors in the problem data that could subsequently causeinexplicable behavior.Those checking routines send all messages to one of the standard <strong>ILOG</strong> <strong>CPLEX</strong> messagechannels. You capture that output by setting the parameter CPX_PARAM_SCRIND (if youwant messages directed to your screen) or by calling the routine CPXsetlogfile.CallbacksThe Callable Library supports callbacks so that you can define functions that will be calledat crucial points in your application:◆◆◆during the presolve process;once per iteration in a linear programming or quadratic programming routine; andat various points, such as before node processing, in a mixed integer optimization.In addition, callback functions can call CPXgetcallbackinfo to retrieve informationabout the progress of an optimization algorithm. They can also return a value to indicate120 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

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

Saved successfully!

Ooh no, something went wrong!