dime-worldbank / Disease-Modelling-SSA

This repository contains the code for an agent-based model used for COVID-19 in Sub-Saharan Africa. The original code was written in Python by Aivin Solatorio and is since being developed in Java. Complimentary risk modelling has been conducted in R as an intermediate product and is also part of this repo
MIT License
6 stars 2 forks source link

Scheduling events which do not influence the epidemiology of the disease cause a difference in the number of covid cases at the end of the simulation #28

Open RobertManningSmith opened 5 months ago

RobertManningSmith commented 5 months ago

When creating a test suite for the covid testing and spurious symptom section of the model I found that even when an event does nothing but print out a line of text, this changed the resulting number of cases predicted by the simulation.

This can be seen in the branch redo_testing_from_scratch. The only change to the main code base so far is that a new function (CovidTesting.Testing) is called from the worldbanksimcovid19sim class (line 199). This file only prints out a line of text.

I created a testing file: CovidTestingTesting.java which runs the simulation with and without covidTesting being called, but produces a different total amount of covid infections being created

swise5 commented 5 months ago

Discussed and confirmed - this is an issue with the fact that the scheduler pulls from the RNG and therefore scheduling a new behaviour (however dummy-tastic) means that the infectious behaviour will encounter different random numbers. We can create a separate RNG to exclusively serve the infectious disease model and not be influenced by scheduling.