Skip to content

Commit

Permalink
Bug in SEIRConn and incubation
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Jun 13, 2023
1 parent 3b890bf commit 3da5e3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions epiworld.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10366,7 +10366,7 @@ inline epiworld_double Virus<TSeq>::get_incubation(
if (incubation_fun)
return incubation_fun(agent, *this, model);

return EPI_DEFAULT_VIRUS_INCUBATION;
return EPI_DEFAULT_INCUBATION_DAYS;

}

Expand Down Expand Up @@ -16386,7 +16386,7 @@ inline ModelSEIRCONN<TSeq>::ModelSEIRCONN(
auto & v = p->get_virus(0u);

// Does the agent become infected?
if (m->runif() < 1.0/(v.get_incubation(m)))
if (m->runif() < 1.0/(v->get_incubation(m)))
{

p->change_state(m, ModelSEIRCONN<TSeq>::INFECTED);
Expand Down
2 changes: 1 addition & 1 deletion include/epiworld/models/seirconnected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ inline ModelSEIRCONN<TSeq>::ModelSEIRCONN(
auto & v = p->get_virus(0u);

// Does the agent become infected?
if (m->runif() < 1.0/(v.get_incubation(m)))
if (m->runif() < 1.0/(v->get_incubation(m)))
{

p->change_state(m, ModelSEIRCONN<TSeq>::INFECTED);
Expand Down

0 comments on commit 3da5e3f

Please sign in to comment.