Callbacks#
As you might imagine, since the actual optimization task runs on a
remote system in a Compute Server environment, Gurobi callbacks give
different behavior than they do when the task runs locally. In
particular, callbacks are both less frequent and more restrictive to
avoid communication overhead and a loss in performance. You will only
receive MESSAGE
, BARRIER
, SIMPLEX
, MIP
, MIPSOL
and
MULTIOBJ
callbacks; you will not receive PRESOLVE
or MIPNODE
callbacks. As a result, you will only have access to a subset of the
callback information that you would be able to obtain when running
locally. In particular, it is not possible to import a solution via the
respective routine (this is GRBcbsolution
in C
,
GRBCallback::setSolution
in C++
, GRBCallback.setSolution
in
Java, GRBCallback.SetSolution
in .NET
, and
Model.cbSetSolution
in Python). You can still request that the
optimization shall be terminated from any of the callbacks you receive,
though. Please refer to the Callback Code
section of the
Gurobi Reference Manual for more
information on the various callback codes.