seirsplus icon indicating copy to clipboard operation
seirsplus copied to clipboard

Support for prioritizing testing according to time since last test

Open boazbk opened this issue 4 years ago • 1 comments

If number of tests available per time period is smaller than the total eligible population, at the moment the TTI loop selects the people chosen to test at random. However, it may make sense to do so based on the time people were last tested.

For example, if we test 1/2 of the population once a week, then if we select people at random then 1/4 would be tested twice in the same week and 1/4 won't be tested at all.

This pull request adds an array testedTime as an attribute to ExtSEIRSNetworkModel and adds a parameter test_priority to run_tti_sim. The default value for test_priority is random which is the current strategy. However, if the test_priority parameter contains last_tested then the pool to be tested is sorted according to the last time they were tested, breaking ties randomly.

If the test priority contains degree_oblivious then we ignore degrees in choosing the degree pool. This makes sense if the people making decisions on testing policies do not have full information on the social network.

Assuming you are interested, other enhancements I'd like to add (in a future pull request) is support for differentiating between node subgroups in:

  1. External infections (for example staff and patients in nursing home have very different probability to be infected externally).

  2. Testing policies for random testing (there could be different again for staff / patients)

I also can push code to run many simulations in parallel on a multi CPU machine.

boazbk avatar Aug 18 '20 17:08 boazbk

As an example as to why it makes sense to do this, here are the results of 100 runs with the current random testing policy as opposed to the priority testing policy using the parameters in the notebook https://github.com/ryansmcgee/seirsplus/blob/master/examples/Extended_SEIRS_Workplace_TTI_Demo.ipynb

priority_vs_random

You can see that the average overall number of infected people is slightly smaller when we use priority testing, and there is a more noticeable drop in the tail of the distribution.

boazbk avatar Aug 26 '20 18:08 boazbk