From 2839e6db7991fdf1f66a1a2b239041f762c2fc2d Mon Sep 17 00:00:00 2001 From: Debojyoti Ghosh Date: Thu, 7 Nov 2024 13:38:36 -0800 Subject: [PATCH] cosusceptibility kicks in after incubation period --- src/DiseaseCoupling.H | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DiseaseCoupling.H b/src/DiseaseCoupling.H index ad3b732..b1950e5 100644 --- a/src/DiseaseCoupling.H +++ b/src/DiseaseCoupling.H @@ -137,8 +137,10 @@ struct DiseaseCouplingParm cs_arr[i] = 1.0; for (int d = 0; d < nd; d++) { if (d == a_d) { continue; } - auto status = a_ptd.m_runtime_idata[i0(d)+IntIdxDisease::status][i]; - if (status == Status::infected) { + auto status = a_ptd.m_runtime_idata[i0(d)+IntIdxDisease::status][i]; + auto counter = a_ptd.m_runtime_rdata[r0(d)+RealIdxDisease::disease_counter][i]; + auto incub = a_ptd.m_runtime_rdata[r0(d)+RealIdxDisease::incubation_period][i]; + if ((status == Status::infected) && (counter >= incub)) { cs_arr[i] *= cosus_mat_arr[idx1D(a_d,d,nd)]; } }