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

Very long execution time for adding constraints

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three 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 why not try our AI Gurobot?.
  • Gwyneth Butera
    • Gurobi Staff

    There are many useful suggestions on how to improve the time to build your model in our Knowledge Base article How do I improve the time to build my model?

    In particular, I see that you repeat the same query on the data frame many times:

    Matrice.iloc[x1][x2]

    I think you can probably save a lot of time by storing that value in a variable just before the inner loop:

    for x3 in list3:

    You can probably find other ways to improve the time spent iterating in the various loops.

    G.

    0
  • hamza addi
    • Gurobi-versary
    • Curious
    • Conversationalist

    Hello,

    thank you very much for you response,i tried the trick you mentionned above and the execution time dropped from

    2 hours and a half

    to

    1 hour.

    I'm trying to explore other options.

     

    Best regards,

    Hamza

    0

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