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

Building a model with more than 2 billion nonzeros: GRBnewmodel vs GRBXaddvars

回答済み

コメント

3件のコメント

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

    You can either

    • initialize all variables and bounds at the beginning in GRBnewmodel and then add the constraints using GRBXaddconstrs or
    • create an empty model in GRBnewmodel and then add the variables using GRBXaddvars.

    I would not expect a massive performance difference between the two approaches.

    In any case, I would recommend defining the variable bounds when adding the variables and not as range constraints.

    1
  • jake roth
    • Gurobi-versary
    • Curious
    • Conversationalist

    Thanks!

    0

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