Obtain the current optimization result of Gurobi under jupyter-notebook
AnsweredI'm using Gurobi to solve a mixed-integer linear programming problem in a web-based jupyter notebook. The optimality gap is currently about 3%, and I'd like to obtain the current solution and stop the further computation. How can I deal with that
-
Hi Di,
Jupyter Notebooks have different implementations, depending on where they are hosted, but typically there should be an "interrupt" or "stop" button in the interface.
If you use this then Gurobi will stop at the next available point (it may not be immediate). You can then query the solution and objective value as per usual.- Riley
0 -
Thank you very much! I have clicked the "interrupt" button, but it doesn't react for a while(about 5 minutes). And the jupyter is still running (with *) on the left. Is this normal?
0 -
Note that this is not Gurobi specific - failure to reliably interrupt the Jupyter kernel is a long standing issue:
https://github.com/ipython/ipython/issues/34000
Please sign in to leave a comment.
Comments
4 comments