GMP::Instance::SetCallbackCandidate installs a
callback procedure that is called every time an incumbent solution is
found during the solution process of a MIP model. By using the procedure
GMP::SolverSession::RejectIncumbent the incumbent solution can be
GMP::SolverSession::RejectIncumbent is not called
CallbackCandidate callback procedure then the incumbent
solution will be accepted and replace the best incumbent solution found
by so far.
GMP::Instance::SetCallbackCandidate( GMP, ! (input) a generated mathematical program callback ! (input) an AIMMS procedure )
The procedure returns 1 on success, or 0 otherwise.
The callback procedure should have exactly one argument; a scalar input element parameter into the set
CallbackCandidatecallback procedure should have a return value of
0, if you want the solution process to stop, or
1, if you want the solution process to continue.
If the return value is 0 (i.e., interrupt the solution process) then the incumbent solution will not be accepted!
To remove the callback the empty element should be used as the callback argument.
If an incumbent callback procedure is installed by using the procedure
GMP::Instance::SetCallbackIncumbent, then that callback will be called after the candidate callback procedure if the incumbent solution is not rejected inside the candidate callback.
CallbackCandidatecallback procedure will only be called when solving mixed integer programs with CPLEX.