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

High CPU time when defnining a high dimensional variable

回答済み

コメント

1件のコメント

  • 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

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