Closed arindamsaha1507 closed 12 months ago
Hi @djgroen and @mzrghorbani,
Just to let you know, incorporating weighted probabilities leads to a significant slowing down of the code. In my test with Calarasi for 10 days, the simulation takes 17 min instead of 6 min.
Please have a look at commit 0ccc4c1 if it can be more efficient.
Hi Arindam,
Perhaps you could put an unweighted np.random.choice as part of the "else:" branch in your modified code, and move the weighted one to your main if branch?
That should save at least some initialisation time.
Weighted random choice operations are hard to optimize, but this could be a way to reduce the number of their occurrences :).
Hi @djgroen,
I tested with your suggestion... doesn't seem to work... still 17 mins.
I think the if statement is causing the delay?
Modified according to #8