tapios / risk-networks

Code for risk networks: a blend of compartmental models, graphs, data assimilation and semi-supervised learning
Other
2 stars 2 forks source link

Uniquely identify people with nodes; use HealthService to manage hospitalization #53

Closed glwagner closed 4 years ago

glwagner commented 4 years ago

@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:

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. The HealthService will also manage setting the weights of the contact network, since the HealthService manages the mapping of contacts (which includes "phantom edges") to "actual" edges on the contact network.

Both the KineticModel and the MasterEquationModelEnsemble 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.

glwagner commented 4 years ago

A few things discussed with @odunbar: