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

High CPU time when defnining a high dimensional variable

回答済み

コメント

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.
  • Mario Ruthmair
    • Gurobi Staff

    Hi,

    Are you saying that creating the variables with "model.addVars( N1, N2, N3, ... )" takes a long time?

    The main question is whether all variables in N1 x N2 x N3 x ... are needed in your model. If not, it makes sense to predefine a list of tuples that corresponds to a subset of the complete cross-product, and use this in "model.addVars( tuples )".

    Best regards,
    Mario

    0

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