-
Notifications
You must be signed in to change notification settings - Fork 16
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
1132 Rename public members of IDE model #1173
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1173 +/- ##
==========================================
- Coverage 96.97% 96.97% -0.01%
==========================================
Files 148 148
Lines 13718 13714 -4
==========================================
- Hits 13303 13299 -4
Misses 415 415 ☔ View full report in Codecov by Sentry. |
I changed the name m_transitions to flows because it is in line with our simulation functions where we also use the term flow. The term transition (e.g. in transition_idx) still occurs in some places when we are referring to the transitions themselves and not to the number of individuals transitioning from one compartment to another. |
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.
Nice work! Please consider especially to rename the InfectionTransisitons and the TransitionDistributions consistent to the flows TimeSeries.
m_transitions; ///< TimeSeries containing points of time and the corresponding number of transitions for every | ||
// AgeGroup. | ||
TimeSeries<ScalarType> m_populations; ///< TimeSeries containing points of time and the corresponding number of | ||
flows; ///< TimeSeries containing points of time and the corresponding number of individuals transitioning from |
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.
flows and InfectionTransitions and Transitiondistributions are no longer linked by name. Do you think that's bad? I dont know how to feel about this.
@@ -84,7 +84,7 @@ int main(int argc, char** argv) | |||
init.add_time_point(init.get_last_time() + dt, | |||
Vec::Constant((int)mio::isecir::InfectionTransition::Count, 1. * dt)); |
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.
Eventually adapt also the num_transitions in the ide examples and name them num_flows? Also in the tests? On the other hand this is consistent with InfectionTransition.. I dont know
* In the TimeSeries we store a vector for each time point. In this vector we store the different | ||
* #InfectionTransition%s for every AgeGroup. | ||
* In the TimeSeries we store a vector for each time point. In this vector we store values for the different | ||
* InfectionTransitions for every AgeGroup. |
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.
Why not #InfectionTransition%s?
@@ -84,7 +84,7 @@ int main(int argc, char** argv) | |||
init.add_time_point(init.get_last_time() + dt, | |||
Vec::Constant((int)mio::isecir::InfectionTransition::Count, 1. * dt)); | |||
} | |||
model.m_transitions = init; |
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.
Can you adjust in the example ide_secir lines 78+80+123+124 and in example ide_secir_ageres 64 - 69 + 124-125?
@@ -84,7 +84,7 @@ int main(int argc, char** argv) | |||
init.add_time_point(init.get_last_time() + dt, | |||
Vec::Constant((int)mio::isecir::InfectionTransition::Count, 1. * dt)); | |||
} | |||
model.m_transitions = init; | |||
model.flows = init; | |||
} |
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.
Please also adapt the README (with m_populations). And maybe transitions to flows.
if (!((size_t)m_transitions.get_num_elements() == (size_t)InfectionTransition::Count * m_num_agegroups)) { | ||
log_error("A variable given for model construction is not valid. Number of elements in transition vector " | ||
if (!((size_t)flows.get_num_elements() == (size_t)InfectionTransition::Count * m_num_agegroups)) { | ||
log_error("A variable given for model construction is not valid. Number of elements in vector of flows" |
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.
log_error("A variable given for model construction is not valid. Number of elements in vector of flows" | |
log_error("A variable given for model construction is not valid. Number of elements in vector of flows." |
Changes and Information
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)
Closes #1132