-
Notifications
You must be signed in to change notification settings - Fork 18
Labels
class::improvementCleanup that doesn't affect functionalityCleanup that doesn't affect functionalityloc::backendThis issue concerns the C++ backend implementation.This issue concerns the C++ backend implementation.model::abmThis issue concerns any kind of agent-based model.This issue concerns any kind of agent-based model.prio::moderateThe priority of this task is moderate.The priority of this task is moderate.
Description
Motivation / Current Behaviour
No response
Enhancement description
TBD with others when going through changes @ infection in paper
Additional context
Differences i found:
We deleted the if -> else return 0 i think because that things in get_infectivity :-D
if (t >= m_viral_load.start_date && t <= m_viral_load.end_date) {
if (t.days() <= m_viral_load.start_date.days() + m_viral_load.peak / m_viral_load.incline) {
return m_viral_load.incline * (t - m_viral_load.start_date).days();
}
else {
return m_viral_load.peak + m_viral_load.decline * (t.days() - m_viral_load.peak / m_viral_load.incline -
m_viral_load.start_date.days());
}
}
else {
return 0.;
}
- We switched forward and backwards drawing of infection state.
TimePoint start_date = draw_infection_course_backward(rng, age, params, init_date, init_state);
draw_infection_course_forward(rng, age, params, init_date, init_state, latest_protection);
got changed to:
TimePoint start_of_init_state = draw_infection_course_forward(rng, age, params, init_date, init_state, latest_protection);
TimePoint start_date = draw_infection_course_backward(rng, age, params, start_of_init_state, init_state);
- We added a rng to be in the middle of the initializing infection
// helper lambda for init_state
auto determine_time_period = [&]() {
if (!init_state) {
// randomly initialize the infetion when it is not initialized at the time of transmission
p = uniform_dist(rng); // a random amount of time that has passed since begin of the initial InfectionState
auto time_draw = time_in_state.get_distribution_instance()(rng, time_in_state.params);
time_period = days(p * time_draw);
start_of_init_state = t - days((1 - p) * time_draw);
init_state = true;
}
else {
time_period = days(time_in_state.get_distribution_instance()(rng, time_in_state.params));
}
};
Checklist
- Attached labels, especially loc:: or model:: labels.
- Linked to project
Metadata
Metadata
Assignees
Labels
class::improvementCleanup that doesn't affect functionalityCleanup that doesn't affect functionalityloc::backendThis issue concerns the C++ backend implementation.This issue concerns the C++ backend implementation.model::abmThis issue concerns any kind of agent-based model.This issue concerns any kind of agent-based model.prio::moderateThe priority of this task is moderate.The priority of this task is moderate.
Type
Projects
Status
Review 🕵️♂️