Closed glwagner closed 4 years ago
A few things discussed with @odunbar:
HealthService
has .hospital_beds
HealthService
which simulates contacts between
health care workers and hospital_beds
. I'm not sure the best way to abstract ideas, but HealthService
may need to run its own ContactSimulator
. Food for thought.HealthService
manages connecting occupied .hospital_beds
with health care workers, and ensuring that edges between patients in .hospital_beds
and the community are severed.HealthService
needs to keep track of edges between patients in .hospital_beds
and the community, so that when patients are .discharge
d, those edges can be restored.HealthService
for the given population we are considering. Basically, we need to identify health care workers in a given population (who are connected to hospital_beds
, as well as specify the number of hospital_beds
.HealthService
with information about the population (mostly ages), as well as our specified number of hospital beds. This will allow us to quickly understand the effect of changing the number of hospital beds on the evolution of the epidemic.HealthService
is essential!
@odunbar, @agarbuno, and I propose to make the size of the contact network equal to the size of the population, omitting placeholder nodes.
The
ContactSimulator
will simulate all possible contacts, which includes contacts between healthcare workers and hospital beds.Given the hospitalization state of a population, some of these edges are "phantom edges", since they represent connections between community members and people who are hospitalized, or connections between heath care workers and empty hospital beds.
In consequence:
len(contact_network) = population
n_contacts = population + hospital_beds
The
HealthService
keeps track of who is in the hospital. This mapping determines the structure of the contact network, because when a node is hospitalized, their neighbors change. TheHealthService
will also manage setting the weights of the contact network, since theHealthService
manages the mapping of contacts (which includes "phantom edges") to "actual" edges on the contact network.Both the
KineticModel
and theMasterEquationModelEnsemble
will simulate an epidemic on the "actual" contact network, which does not include placeholder nodes.There are two advantages of this approach. One is that it corresponds more closely to the "true" system --- nodes represent people, and "hospitalization" changes the contact network, not the "identity" of a node.
The second advantage is corollary to the first: clinical information attached to nodes does not need to be "copied" to placeholder nodes when somebody is hospitalized (which requires extra lines of code for the correct simulation of an epidemic with correct rates). "Hospitalization" merely implies a change in the contact network, not a change in the clinical parameters of a node. This reduces the complexity of the code; the hospitalization procedure is the sole domain of the
HealthService
.