- Procedure GMP::Instance::SetCallbackHeuristic(GMP, callback)
GMP::Instance::SetCallbackHeuristic
The procedure GMP::Instance::SetCallbackHeuristic
installs a
callback procedure that is called during the solution process of a MIP
model every time the subproblem has been solved to optimality.
GMP::Instance::SetCallbackHeuristic(
GMP, ! (input) a generated mathematical program
callback ! (input) an AIMMS procedure
)
Arguments
- GMP
An element in
AllGeneratedMathematicalPrograms
.- callback
A reference to a procedure in the set
AllIdentifiers
.
Return Value
The procedure returns 1 on success, or 0 otherwise.
Note
This callback is not called when the subproblem is infeasible or cut off.
The callback should supply the solver with a heuristically-derived integer solution.
The callback procedure should have exactly one argument; a scalar input element parameter into the set
AllSolverSessions
.The
CallbackHeuristic
callback procedure should have a return value of0, if you want the solution process to stop, or
1, if you want the solution process to continue.
To remove the callback the empty element should be used as the callback argument.
A
CallbackHeuristic
callback procedure will only be called when solving mixed integer programs with CPLEX, Gurobi or ODH-CPLEX.
See also
The routines GMP::Solution::RetrieveFromSolverSession
, GMP::Solution::SendToModel
, GMP::Solution::RetrieveFromModel
, GMP::Solution::SendToSolverSession
, GMP::Instance::Generate
,
GMP::Instance::SetCallbackAddCut
, GMP::Instance::SetCallbackAddLazyConstraint
, GMP::Instance::SetCallbackBranch
, GMP::Instance::SetCallbackCandidate
and GMP::Instance::SetCallbackIncumbent
.