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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

◆ Before the program calls CPXlpopt, the default optimizer from the <strong>ILOG</strong> <strong>CPLEX</strong>Callable Library, it sets the callback function by calling CPXsetlpcallbackfunc. Itunsets the callback immediately after optimization.This callback function offers a model for graphic user interfaces that display optimizationprogress as well as those GUIs that allow a user to interrupt and stop optimization. If youwant to provide your end-user a facility like that to interrupt and stop optimization, then youshould make mycallback return a nonzero value to indicate the end-user interrupt.The complete program lpex4.c appears online in the standard distribution atyour<strong>CPLEX</strong>installation/examples/src.Example: Controlling Cuts iloadmipex5.cppThis example shows how to use the cut callback in the context of solving the noswot model.This is a relatively small model from the MIPLIB 3.0and MIPLIB 2003 test-sets, consistingonly of 128 variables. This model is very hard to solve by itself. In fact, until the release of<strong>ILOG</strong> <strong>CPLEX</strong> version 6.5, it appeared to be unsolvable even after days of computation.While it is now solvable directly, the computation time is still substantial. However, cuts canbe derived, the addition of which make the problem solvable in a matter of minutes orseconds. These cuts, expressed as pseudo C++, look like this:x21 - x22

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

Saved successfully!

Ooh no, something went wrong!