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

Get the iterations and ObjVal, while "model.optimize(mycallback)" is running

回答済み

コメント

4件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff Gurobi Staff
    This post is more than three 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 why not try our AI Gurobot?.
  • Matthias Miltenberger
    • Gurobi Staff Gurobi Staff

    Hi Gerrit,

    If you want to query simplex information you need to use the SIMPLEX callback, i.e. use where=2. Please have a look at the callback documentation and also at the callback examples in your Gurobi installation.

    Cheers,
    Matthias

    0
  • Tanmoy Das
    • Gurobi-versary
    • Investigator
    • Collaborator

    I also want to get the objective values (two objectives in my moo problem) in each iteration.
     Callback function gives me some ideas. I know my model went through 19 simplex iterations. I need the values of obj1 & obj2 for each iteration. How can I get it in Python API (MIP problem)?

     

     

    0
  • Matthias Miltenberger
    • Gurobi Staff Gurobi Staff

    Hi Tanmoy,

    In that case, you would need to use ObjNumber to specify the objective you want to query.

    Best regards,
    Matthias

    0

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