Callback Functions
In many instances, solving a model can be a lengthy operation. Given this, it may be useful to provide some device to keep the user posted as to the progress of the optimization. The standard interactive version of LINGO displays a status window showing the iteration count, objective value, and various other model statistics each time the solver is invoked. In addition, the user has the ability to interrupt the solver by clicking on a button in the status window. You can provide similar functionality to users through the LINGO DLL by supplying LINGO with a callback function—so named because your code calls the LINGO solver, and the LINGO solver then calls back to your supplied callback routine.
In the Specifying a Callback Function section, the calling sequences used in establishing a callback function are discussed. After that, there are sample callback routines to the Visual C++ and Visual Basic staff scheduling examples.