diff --git a/examples/01-seir/main.cpp b/examples/01-seir/main.cpp index 7728f5f89..ae071a85a 100644 --- a/examples/01-seir/main.cpp +++ b/examples/01-seir/main.cpp @@ -14,7 +14,7 @@ int main() { // Adding a bernoulli graph as step 0 model.agents_from_adjlist( - rgraph_smallworld(500000, 5, .001, false, model) + rgraph_smallworld(1000000, 5, .001, false, model) ); // Running and checking the results diff --git a/include/epiworld/model-meat.hpp b/include/epiworld/model-meat.hpp index b3df43f65..2b665645e 100644 --- a/include/epiworld/model-meat.hpp +++ b/include/epiworld/model-meat.hpp @@ -1792,6 +1792,15 @@ inline void Model::update_state() { template inline void Model::mutate_virus() { + // Checking if any virus has mutation + size_t nmutates = 0u; + for (const auto & v: viruses) + if (v->mutation_fun) + nmutates++; + + if (nmutates == 0u) + return; + if (use_queuing) {