From e8f7864ad150f4002279cff6cf8673208b5cd387 Mon Sep 17 00:00:00 2001 From: Ozmorph Date: Thu, 18 Jun 2020 13:58:45 -0400 Subject: [PATCH] added re-initialization of HostsQuarantine back into InitModel() which fixes regression tests --- src/CovidSim.cpp | 2 +- src/SetupModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CovidSim.cpp b/src/CovidSim.cpp index 5fa854c77..f97122997 100644 --- a/src/CovidSim.cpp +++ b/src/CovidSim.cpp @@ -2473,7 +2473,7 @@ void InitModel(int run) // passing run number so we can save run number in the i StateT[Thread].cumInf_age_adunit [AgeGroup][Adunit] = 0; } - + std::fill(HostsQuarantine.begin(), HostsQuarantine.end(), PersonQuarantine()); #pragma omp parallel for schedule(static,1) default(none) \ shared(P, Hosts) for (int tn = 0; tn < P.NumThreads; tn++) diff --git a/src/SetupModel.cpp b/src/SetupModel.cpp index e5f94ab65..269d3ef35 100644 --- a/src/SetupModel.cpp +++ b/src/SetupModel.cpp @@ -1065,7 +1065,7 @@ void SetupPopulation(std::string const& density_file, std::string const& out_den i2 = 0; Hosts = (Person*)Memory::xcalloc(P.PopSize, sizeof(Person)); - HostsQuarantine = std::vector(P.PopSize); + HostsQuarantine = std::vector(P.PopSize, PersonQuarantine()); fprintf(stderr, "sizeof(Person)=%i\n", (int) sizeof(Person)); for (int i = 0; i < P.NCP; i++) {