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.

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search