Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/usage/how_to_run.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ The following inputs specify the disease parameters:
Probability of death when in hospital, in the ICU, for age groups: 0-4, 5-17, 18-29, 30-49, 50-64, 65 and over.
* ``disease.ventCVF`` (`list of float`, default ``0.20 0.20 0.20 0.45 0.45 1.0``)
Probability of death when in hospital, on ventilator, for age groups: 0-4, 5-17, 18-29, 30-49, 50-64, 65 and over.
* ``disease.unhospCVF`` (`list of float`, default ``0.0 0.0 0.0 0.0 0.0 0.0``)
Probability of death when not in hospital, for age groups: 0-4, 5-17, 18-29, 30-49, 50-64, 65 and over.

`Note`: for ``agent.number_of_diseases > 1``, the disease parameters that are common
to all the diseases can be specified as above. Any parameter that is `different for a specific disease`
Expand Down
2 changes: 2 additions & 0 deletions examples/inputs.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,5 @@ disease.hospCVF = 0 0 0 0 0 0
disease.icuCVF = 0 0 0 0 0 0.26
# Probability of death when on a ventilator, for age groups 0-4, 5-17, 18-29, 30-49, 50-64, 64+
disease.ventCVF = 0.20 0.20 0.20 0.45 0.45 1.0
# Probability of death when not in hospital, for age groups 0-4, 5-17, 18-29, 30-49, 50-64, 64+
disease.unhospCVF = 0.0 0.0 0.0 0.0 0.0 0.0
2 changes: 2 additions & 0 deletions src/DiseaseParm.H
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ struct DiseaseParm {
{Real(0), Real(0), Real(0), Real(0), Real(0), Real(0.26)},
{Real(0.20), Real(0.20), Real(0.20), Real(0.45), Real(0.45),
Real(1.0)}};
/*! Probabilites of dying while *not* in hospital for age groups */
Real m_unhospToDeath[AgeGroups::total] = {Real(0), Real(0), Real(0), Real(0), Real(0), Real(0)};

DiseaseParm (const std::string& dname) {
memset(disease_name, 0, 50);
Expand Down
1 change: 1 addition & 0 deletions src/DiseaseParm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ void DiseaseParm::readInputs (const std::string& a_pp_str /*!< Parmparse string
queryArray(pp, "CHR", m_CHR, AgeGroups::total);
queryArray(pp, "CIC", m_CIC, AgeGroups::total);
queryArray(pp, "CVE", m_CVE, AgeGroups::total);
queryArray(pp, "unhospCVF", m_unhospToDeath, AgeGroups::total);
queryArray(pp, "hospCVF", m_hospToDeath[DiseaseStats::hospitalization], AgeGroups::total);
queryArray(pp, "icuCVF", m_hospToDeath[DiseaseStats::ICU], AgeGroups::total);
queryArray(pp, "ventCVF", m_hospToDeath[DiseaseStats::ventilator], AgeGroups::total);
Expand Down
6 changes: 6 additions & 0 deletions src/HospitalModel.H
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ void HospitalModel<PCType, PTDType, PType>::treatAgents (PCType& a_agents, /*!<
ParallelForRNG(np, [=] AMREX_GPU_DEVICE (int i, RandomEngine const& engine) noexcept {
if (!inHospital(i, ptd)) {
// agent is not in hospital
// determine if agent dies anyway.
if (Random(engine) < disease_parm_d->m_unhospToDeath[age_group_ptr[i]]) {
is_alive_ptr[i] = 0;
flag_status_ptr[i] *= -1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line need not be here. I don't think it's doing anything (multiplying 0 by -1) but is misleading (flag_status_ptr is used for tracking hospitalized/ICU/vent agents who recover or die).

status_ptrs[d][i] = Status::dead;
}
Comment on lines +126 to +131
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is the HospitalModel, it may be confusing to have this code here. Why not have it in DiseaseStatus::updateAgents() (using, say a marked_for_death flag similar to marked_for_hosp)?

return;
}
if (counter_ptrs[d][i] == Math::floor(incubation_per_ptrs[d][i])) {
Expand Down
Loading