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.

Choose Clarity First, Efficiency LaterCode first for clarity. Get your code working accurately first so that you maintain a goodunderstanding of what it is doing. Then, once it works correctly, look for opportunities toimprove performance.Debug EffectivelyUsing Diagnostic Routines for Debugging on page 120, contains tips and guidelines fordebugging an application that uses the <strong>ILOG</strong> <strong>CPLEX</strong> Callable Library. In that context, asymbolic debugger as well as other widely available development tools are quite helpful toproduce error-free code.Test Correctness, Test PerformanceEven a program that has been carefully debugged so that it runs correctly may still containerrors or “features” that inhibit its performance with respect to execution speed, memoryuse, and so forth. Just as the <strong>ILOG</strong> <strong>CPLEX</strong> Interactive Optimizer can aid in your tests forcorrectness, it can also help you improve performance. It uses the same routines as theComponent Libraries; consequently, it requires the same amount of time to solve a problemcreated by a Concert or Callable Library application.Use one of these methods, specifying a file type of SAV, to create a binary representation ofthe problem object from your application in a SAV file.◆◆◆◆IloCplex::exportModelIloCplex.exportModelCplex.ExportModelCPXwriteprobThen read that representation into the Interactive Optimizer, and solve it there.If your application sets parameters, use the same settings in the Interactive Optimizer.If you find that your application takes significantly longer to solve the problem than does theInteractive Optimizer, then you can probably improve the performance of your application.In such a case, look closely at issues like memory fragmentation, unnecessary compileroptions, inappropriate linker options, and programming practices that slow the applicationwithout causing incorrect results (such as operations within a loop that should be outside theloop).Using the Interactive Optimizer for DebuggingThe <strong>ILOG</strong> <strong>CPLEX</strong> Interactive Optimizer distributed with the Component Libraries offers away to see what is going on within the <strong>ILOG</strong> <strong>CPLEX</strong> part of your application when youobserve peculiar behavior in your optimization application. The commands of the Interactive138 <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!