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

GMP::Instance::SetCallbackIncumbent

The procedure GMP::Instance::SetCallbackIncumbent installs a callback procedure that is called every time a new incumbent solution is found during the solution process of a MIP model.

GMP::Instance::SetCallbackIncumbent(
     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 callback procedure should have exactly one argument; a scalar input element parameter into the set AllSolverSessions.
  • The CallbackIncumbent 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.
  • The functionality of the procedure GMP::Instance::SetCallbackIncumbent has been changed between AIMMS versions 4.68 and 4.69. In AIMMS version 4.68 and older this procedure was named GMP::Instance::SetCallbackNewIncumbent. That procedure has become deprecated. AIMMS version 4.68 and older already contained a procedure that was named GMP::Instance::SetCallbackIncumbent but that procedure has been renamed to GMP::Instance::SetCallbackCandidate.