keep symptomatic testing
@@ -793,7 +793,7 @@ class test_prob(Intervention):
quar_test_inds, all_quar_inds = get_quar_inds(self.quar_policy, sim)
symp_quar_inds = np.intersect1d(quar_test_inds, symp_inds)
asymp_quar_inds = np.intersect1d(quar_test_inds, asymp_inds)
- symp_inds = np.setdiff1d(symp_inds, all_quar_inds) # Remove all people in quarantine, not just those scheduled to test
+ symp_inds = np.setdiff1d(symp_inds, quar_test_inds) # Remove all people in quarantine, not just those scheduled to test
asymp_inds = np.setdiff1d(asymp_inds, all_quar_inds)
diag_inds = cvu.true(sim.people.diagnosed)
if self.subtarget is not None:
@@ -812,22 +812,7 @@ class test_prob(Intervention):
test_probs[diag_inds] = 0.0 # People who are diagnosed don't test
test_inds = cvu.true(cvu.binomial_arr(test_probs)) # Finally, calculate who actually tests
- print(f'>>>DEBUG: {sim.t} {len(quar_test_inds)} {len(all_quar_inds)} symp={sum(sim.people.symptomatic[quar_test_inds])} asymp={sum(~sim.people.symptomatic[quar_test_inds])}')
- sum_symp_inds = sum(test_probs[symp_inds])
- sum_ili_inds = sum(test_probs[ili_inds])
- sum_asymp_inds = sum(test_probs[asymp_inds])
- sum_symp_quar_inds = sum(test_probs[symp_quar_inds])
- sum_asymp_quar_inds = sum(test_probs[asymp_quar_inds])
- tot = sum_symp_inds + sum_ili_inds + sum_asymp_inds + sum_symp_quar_inds + sum_asymp_quar_inds
- print(f'Predicted symp_inds : {sum_symp_inds}')
- print(f'Predicted ili_inds : {sum_ili_inds}')
- print(f'Predicted asymp_inds : {sum_asymp_inds}')
- print(f'Predicted symp_quar_inds : {sum_symp_quar_inds}')
- print(f'Predicted asymp_quar_inds : {sum_asymp_quar_inds}')
- print(f'Predicted tot : {tot}')
- print(f'Actual tot : {len(test_inds)}')
- print('\n\n')
-
+ # Actually test people
sim.people.test(test_inds, test_sensitivity=self.test_sensitivity, loss_prob=self.loss_prob, test_delay=self.test_delay) # Actually test people
sim.results['new_tests'][t] += int(len(test_inds)*sim['pop_scale']/sim.rescale_vec[t]) # If we're using dynamic scaling, we have to scale by pop_scale, not rescale_vec
