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

Be sparse in constructing Vars and Constrs or let Gurobi deal with it

回答済み

コメント

2件のコメント

  • 正式なコメント
    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.

  • Marika Karbstein
    • Gurobi Staff

    Hi Zlatan,

    This is not so easy to answer.
    It is indeed the case that Gurobi will remove unneeded variables and constraints in presolve.
    I do not know with which number of removable variables/constraints this would be remarkable in performance. However, adding many more variables and/or constraints than actually needed can also lead to a longer model-building time. So, you could save time twice by not adding redundant variables and/or constraints.

    I think the following questions could help to decide on the approach:

    • How important is a little performance improvement?
    • How often is the model adapted?
      (Who will make the adaptions?)
    • What is the ratio of the number of redundant variables/constraints to the total number of variables and constraints?

    I assume you chose the community on purpose for this question. I just want to remind you that since you are a commercial user of Gurobi, you can also open a support request.

    Best regards,
    Marika

    0

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