GRBModel.setCallback()

Set the callback object for a model. The callback() method on this object will be called periodically from the Gurobi solver. You will have the opportunity to obtain more detailed information about the state of the optimization from this callback. See the documentation for GRBCallback for additional information.

void setCallback ( GRBCallback cb )