tnoulas / UrbanEpidemicSim

5 stars 2 forks source link

vectorize infected population movement #9

Closed kpelechrinis closed 4 years ago

kpelechrinis commented 4 years ago

I have updated the code for the population movement to remove for loops and replace them with list comprehensions. This requires also some Person class functions that have been added. It speed up the simulation by about 50% (earlier epochs are quicker, since the execution time depends on the number of infected individuals).