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 of

    • 0, 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.