メインコンテンツへスキップ

Obtain the current optimization result of Gurobi under jupyter-notebook

回答済み

コメント

5件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support.
  • Riley Clement
    • Gurobi Staff

    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
  • Di Lv
    • Gurobi-versary
    • First Question
    • First Comment

    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
  • Marika Karbstein
    • Gurobi Staff

    I have the same experience. And I did not find any solution for this.
    For me, the only option is to set termination parameters in the code when running Gurobi in Jupyter notebook, i.e., set TimeLimit and/or MIPGap.

    0
  • Riley Clement
    • Gurobi Staff

    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/3400

    0

投稿コメントは受け付けていません。