ILOG CPLEX 11.0 User's Manual > Advanced Programming Techniques > Using Optimization Callbacks > Example: Using Callbacks lpex4.c

This example shows you how to use callbacks effectively with routines from the ILOG CPLEX Callable Library. It is based on lpex1.c, a program from the ILOG CPLEX Getting Started manual. This example about callbacks differs from that simpler one in several ways:

This callback function offers a model for graphic user interfaces that display optimization progress as well as those GUIs that allow a user to interrupt and stop optimization. If you want to provide your end-user a facility like that to interrupt and stop optimization, then you should make mycallback return a nonzero value to indicate the end-user interrupt.

The complete program lpex4.c appears online in the standard distribution at yourCPLEXinstallation/examples/src.