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

GMP::Instance::SetCallbackAddCut

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

GMP::Instance::SetCallbackAddCut(
     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

  • The procedure GMP::SolverSession::GenerateCut can be used inside a CallbackAddCut callback procedure to add cuts during the MIP branch & 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.