- 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::GenerateCutcan be used inside aCallbackAddCutcallback 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
CallbackAddCutcallback 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
CallbackAddCutcallback 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.
See also
The routines GMP::Instance::Generate, GMP::Instance::SetCallbackAddLazyConstraint, GMP::Instance::SetCallbackBranch, GMP::Instance::SetCallbackCandidate, GMP::Instance::SetCallbackHeuristic,
GMP::Instance::SetCallbackIncumbent, GMP::SolverSession::GenerateBinaryEliminationRow and GMP::SolverSession::GenerateCut.