Closed glwagner closed 4 years ago
regarding the set
in what context were we getting duplicate entries? Was it when we search for hospital seeking nodes?
The other changes are fine - our model doesn't yet involve R->S as you note, so i am happy with the edges not being replaced.
regarding the set in what context were we getting duplicate entries? Was it when we search for hospital seeking nodes?
We were not getting duplicate entries.
The point is that sets let us write
subset = large_group - group_to_ignore
which is simple. Sets do not allow duplicate entries, either. This is a downside if you expect to get duplicate entries. Since we don't expect duplicate entries, we can use sets.
The other changes are fine - our model doesn't yet involve R->S as you note, so i am happy with the edges not being replaced.
The point of the change is so that supporting this transition is possible (and also to make the function of the code more explicit).
The main purpose of this PR is to remove the field
.patient_capacity
fromHealthService
. TheHealthService
now has an infinite capacity. It also removes.waiting_list
.A few other changes are:
Set
s are used rather than lists for patients. This obviates duplicate entries and simplifies filtering operations.edges
are not added to current hospital patients. This has no effect on the current model, but will in the case that resistant people can transition to susceptible (immunity has finite lifetime). This is important for some diseases and may be important for COVID-19. Because this is a simple change, we include it in this PR.ContactSimulator
between discharged and current patients, and not to remove edges fromContactSimulator
between new patients and previous patients (which do not exist because they were removed when the previous patient was admitted). This change is intended to makes the code's function more explicit and clear.We have also changed printing for
EpidemicSimulator
andHealthService
. Runningexamples/simple_epidemic.py
now produces output likeevery
static_contact_interval
.