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

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

回答済み

コメント

2件のコメント

  • Silke Horn
    • Gurobi Staff 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

サインインしてコメントを残してください。