Procedure GMP::Instance::SetCallbackAddCut(GMP, callback)


The procedure GMP::Instance::SetCallbackAddCut installs a callback procedure adding cuts during the solution process of a MIP model.

     GMP,            ! (input) a generated mathematical program
     callback        ! (input) an AIMMS procedure



An element in AllGeneratedMathematicalPrograms.


A reference to a procedure in the set AllIdentifiers.

Return Value

The procedure returns 1 on success, or 0 otherwise.


  • The procedure GMP::SolverSession::GenerateCut can be used inside a CallbackAddCut callback procedure to add cuts during the MIP branch-and-cut process.

  • The callback procedure should have exactly one argument; a scalar input element parameter into the set AllSolverSessions.

  • The CallbackAddCut 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 CallbackAddCut callback procedure will only be called when solving mixed integer programs with CPLEX, Gurobi or ODH-CPLEX.

  • This procedure can also be used for MIQP and MIQCP problems.