Allow for agents to die directly (without hospitalization)#96
Allow for agents to die directly (without hospitalization)#96atmyers wants to merge 5 commits intodevelopmentfrom
Conversation
|
Hi @atmyers by default m_unhospToDeath is set to a zero array, so we should see the same results as with the main branch right? I observed some small differences in case and death counts. |
|
unless the random number generator gives us a negative value... |
|
Hi @tannguyen153 - I noticed that too - the answer changes slightly bc the number of random number checks is different now, throwing the exact sequence off. |
|
I get almost identical results when the unhospCVF is all 0. However, if I set at least one value to 0, I get the following crash: Also, I updated the |
| // 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; |
There was a problem hiding this comment.
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).
| // 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; | ||
| status_ptrs[d][i] = Status::dead; | ||
| } |
There was a problem hiding this comment.
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)?
No description provided.