• 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.

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