> Advanced Programming Techniques > Advanced MIP Control Interface > Incumbent Callback

The incumbent callback is used to reject integer feasible solutions that do not meet additional restrictions the user may wish to impose. The user callback routine will be called each time a new incumbent solution has been found, including when solutions are provided by the user's heuristic callback routine. The user callback routine is called with the new solution as input. The callback function should return a value that indicates whether or not the new solution should replace the incumbent solution.

As with other MIP control callback routines, the CPX_PARAM_MIPCBREDLP parameter influences the arguments to the user callback routine. If this parameter is set to its default value of CPX_ON (1), the solution vector that is input to the callback is a presolved vector. It contains one value for each variable in the presolved problem. The same is true of the various callback support routines (CPXcallbackglobalub, and so forth.). If the parameter is set to CPX_OFF (0), all these vectors relate to the variables of the original problem. Note that this parameter should not be changed in the middle of an optimization.