-
Notifications
You must be signed in to change notification settings - Fork 12
Allow for agents to die directly (without hospitalization) #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
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.
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).
| // 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.
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)?
No description provided.