I am working on an agent-based model and I would like to run the following command 1,000 times:
model = MyModel()
for i in range(100):
model.step()
I decided to use the while loop:
repetition = 0
maxRepetition = 1000
while repetition <= maxRepetition:
model = MyModel()
for i in range(100):
model.step()
repetition += 1
Nonetheless, it takes this loop a huge amount of time to conclude (more than 1 hour). Could anyone please recommend me a more efficient procedure?