BDI-pathogens / OpenABM-Covid19

OpenABM-Covid19: an agent-based model for modelling the spread of SARS-CoV-2 (coronavirus) and control interventions for the Covid-19 epidemic
GNU General Public License v3.0
114 stars 76 forks source link

Ignore events scheduled beyond the end of MAX_TIME #140

Closed p-robot closed 4 years ago

p-robot commented 4 years ago

Events scheduled to occur beyond the end of the MAX_TIME macro (as defined in constant.h) are still currently scheduled despite the length of the event list arrays only being length MAX_TIME. This behaviour only occurs if the simulation is run for a long period of time (close to MAX_TIME) or if the waiting time distributions are set to be very long. The behaviour introduced here is that if the event is scheduled to be beyond MAX_TIME then it's not schedule and this event is ignored.