From 35e64674a4751ebe3ab05746ba1c68a41c7d65b0 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 4 Aug 2022 17:00:21 +0200 Subject: [PATCH] added initial state change --- caimira/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/caimira/models.py b/caimira/models.py index 4559809b..2a766e6b 100644 --- a/caimira/models.py +++ b/caimira/models.py @@ -1424,7 +1424,7 @@ class ExposureModel: (self.concentration_model.infected.activity.exhalation_rate * (self.exposed.number + self.concentration_model.infected.number))) t_last_state_change = self.concentration_model.last_state_change(time) - co2_conc_at_last_state_change = self._CO2_concentration_cached(t_last_state_change) + co2_conc_at_last_state_change = 0.00044 delta_time = time - t_last_state_change fac = np.exp(-IVRR * delta_time) @@ -1432,7 +1432,8 @@ class ExposureModel: return (CO2_conc_limit * (1 - fac) + (co2_conc_at_last_state_change - 0.0004) * fac) + 0.0004 def CO2_concentration(self, time: float) -> _VectorisedFloat: - return self._CO2_concentration(time) * 10**6 + # Correction due to the number of generated points. + return max(440, self._CO2_concentration(time) * 10**6) def long_range_deposited_exposure_between_bounds(self, time1: float, time2: float) -> _VectorisedFloat: deposited_exposure = 0.