Conversation
| (pd.Timestamp("2035-01-01"), 0.2), | ||
| (pd.Timestamp("2040-01-01"), 0.4), | ||
| (pd.Timestamp("2045-01-01"), 0.6), # plateaus from here on out | ||
| (pd.Timestamp("2027-01-01"), 0.1), # step increase from 0 in 2027 |
There was a problem hiding this comment.
Docs say this should be 0% in 2027, you have 10%
| @@ -155,7 +156,6 @@ class TestingRates(NamedTuple): | |||
|
|
|||
| BBBM_AGE_MIN = 60 | |||
There was a problem hiding this comment.
This should be 65 now as of 5 hours ago
| BBBM_TESTING_START_DATE = BBBM_TESTING_RATES[0][0] | ||
| TIME_STEPS_UNTIL_NEXT_BBBM_TEST = [6.0, 7.0, 8.0, 9.0, 10.0] | ||
|
|
||
| # TODO: update time start of ramp with test model updates |
| COLUMNS.BBBM_TEST_DATE | ||
| ] == self.clock() + self.step_size() - get_timedelta_from_step_size( | ||
| self.step_size().days, BBBM_TIMESTEPS_UNTIL_RETEST | ||
| self.step_size().days, TIME_STEPS_UNTIL_NEXT_BBBM_TEST[0] |
There was a problem hiding this comment.
nit: would be slightly safer to get the min() in case someone adds time steps out of order later to that list
| <= event_time | ||
| - get_timedelta_from_step_size(self.step_size().days, BBBM_TIMESTEPS_UNTIL_RETEST) | ||
| - get_timedelta_from_step_size( | ||
| self.step_size().days, TIME_STEPS_UNTIL_NEXT_BBBM_TEST[0] |
There was a problem hiding this comment.
should this be using 6 time steps or 5? Based on the docs saying:
Simulant has not received a BBBM test in the last three years (more
precisely, they have not had a BBBM test on any of the previous five
time steps)
There was a problem hiding this comment.
6 because they have to get to the 6th time step then to test. And it is <=
| aged_in = (pop[COLUMNS.AGE] >= BBBM_AGE_MIN) & ( | ||
| pop[COLUMNS.AGE] < BBBM_AGE_MIN + step_size_in_years | ||
| ) | ||
| # Retest population will be simulants with previous test date >= 3 years ago |
There was a problem hiding this comment.
| # Retest population will be simulants with previous test date >= 3 years ago | |
| # Retest population will be simulants with previous test date >= 3 years ago, | |
| # so we find newly eligible simulants whose last test is exactly 6 time steps ago |
| test_history_mask = bbbm_eligible_mask & ( | ||
| pop[COLUMNS.TESTING_PROPENSITY] < testing_rate | ||
| ) | ||
| pop[COLUMNS.BBBM_TEST_DATE] = self._generate_bbbm_testing_history( |
There was a problem hiding this comment.
don't we still need to provide the historical date? Or is it just not useful since it's in the past at that point?
There was a problem hiding this comment.
We do not need history necessarily, we just need a way to sample 3-5 years instead of every 3 years so we are generating future tests since that is easier.
| index=simulants[eligible_sims].index, | ||
| choices=test_date_options, | ||
| additional_key="bbbm_test_date_history", | ||
| choices=TIME_STEPS_UNTIL_NEXT_BBBM_TEST[:-1], |
There was a problem hiding this comment.
Remind me why we exclude the last one?
There was a problem hiding this comment.
We know that simulants will have a test at most 5 years (10 time steps) from their last test. We are going to have simulants test now, or in one of the next 9 time steps.
Albrja/mic 6782/update testing
Update testing model
Changes and notes
-update retesting period so simulants are retested uniformly from 3-5 years instead of every 3 years
-update initialization to reflect updates to testing history sampling
Verification and Testing
Looked at simulants in interactive simulation and saw the correct sampling for simulants test history and future test dates.