Compare commits
272 commits
master
...
feature/mc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2ecff86c4 | ||
|
|
003a58c5c0 | ||
|
|
cfe14d7eeb | ||
|
|
6d6cbc36a8 | ||
|
|
1444226080 | ||
|
|
0e0baff1a5 | ||
|
|
6ea277ac3e | ||
|
|
b92f065a37 | ||
|
|
37c5ff4eba | ||
|
|
ba7f400a9e | ||
|
|
289ce821df | ||
|
|
233a91328e | ||
|
|
8c5a5b18e9 | ||
|
|
a6b3d94f58 | ||
|
|
d950d5189e | ||
|
|
74e813aa3f | ||
|
|
c11b360bda | ||
|
|
bc3db021f6 | ||
|
|
916eeb1c59 | ||
|
|
f18051d1c5 | ||
|
|
7cd3f4cdd8 | ||
|
|
01bf3ac486 | ||
|
|
2ac20bd81d | ||
|
|
f8c1658ea5 | ||
|
|
db457b760f | ||
|
|
91b27a0ef2 | ||
|
|
061ac4dea2 | ||
|
|
a30770cdec | ||
|
|
61a6f296f1 | ||
|
|
b6dfa8e9d0 | ||
|
|
85b260bd10 | ||
|
|
669898be3e | ||
|
|
d8bf270db2 | ||
|
|
6ff3b90ceb | ||
|
|
95931f6c53 | ||
|
|
741baa04be | ||
|
|
e34a31fd08 | ||
|
|
77aae71208 | ||
|
|
9f6e500618 | ||
|
|
418305d50a | ||
|
|
53d274ed9f | ||
|
|
381e03f6d4 | ||
|
|
b58840a49b | ||
|
|
e5cbb781ee | ||
|
|
ac11392bd3 | ||
|
|
df40d70978 | ||
|
|
92ce654442 | ||
|
|
6264b80aef | ||
|
|
06635f6550 | ||
|
|
bb960472ea | ||
|
|
37b58731c0 | ||
|
|
30803744bb | ||
|
|
d9fd316886 | ||
|
|
ffb0a14b75 | ||
|
|
414ba0699b | ||
|
|
b379f94d8d | ||
|
|
fc5596f3fc | ||
|
|
6f5e66e060 | ||
|
|
68c1eaee29 | ||
|
|
9346e9c73b | ||
|
|
596c0c4d07 | ||
|
|
0b2958dc15 | ||
|
|
c54767d572 | ||
|
|
49cfc1e328 | ||
|
|
7bf835c096 | ||
|
|
d4a48da49a | ||
|
|
c13d57972a | ||
|
|
be6d87035b | ||
|
|
b6db943bc2 | ||
|
|
891d27a12a | ||
|
|
a8b5e457d8 | ||
|
|
ff8ddf873e | ||
|
|
0965f7c9e1 | ||
|
|
b41864fb2e | ||
|
|
b9e8fc1b37 | ||
|
|
91c07b9e5c | ||
|
|
85564c2829 | ||
|
|
dadabcbec4 | ||
|
|
21a9ed3072 | ||
|
|
bad2ba9c6a | ||
|
|
044f64ccf8 | ||
|
|
e9621b7815 | ||
|
|
4ad7a57477 | ||
|
|
f12d657475 | ||
|
|
fff9ad31b2 | ||
|
|
06990099b1 | ||
|
|
e59d06b315 | ||
|
|
762c147956 | ||
|
|
d7a604de1a | ||
|
|
52d0010f70 | ||
|
|
8d037f94f8 | ||
|
|
28d4808746 | ||
|
|
1848c68556 | ||
|
|
6af743f00b | ||
|
|
27a3d661a6 | ||
|
|
b90337f31d | ||
|
|
7cf31b50df | ||
|
|
9e8e01993d | ||
|
|
8331f592bb | ||
|
|
05e1b100d4 | ||
|
|
bb374ebaf7 | ||
|
|
e966320d2a | ||
|
|
7fee476ea6 | ||
|
|
5ab9e4f912 | ||
|
|
25b5a16668 | ||
|
|
400548da42 | ||
|
|
f19d85ae8b | ||
|
|
fac33a5cf1 | ||
|
|
fdf4f38bbf | ||
|
|
646b005baa | ||
|
|
04dfa59fce | ||
|
|
758afafbcf | ||
|
|
9decf9afd1 | ||
|
|
28a8b43c77 | ||
|
|
e92353eda5 | ||
|
|
889cc5337f | ||
|
|
b5419f6f3f | ||
|
|
e16c11baef | ||
|
|
53ffd6eba3 | ||
|
|
d2c8c28f77 | ||
|
|
805fa173c0 | ||
|
|
be6e5250dc | ||
|
|
c9cd0ed5fa | ||
|
|
7693a0dff0 | ||
|
|
16f6ad3193 | ||
|
|
62e0690a01 | ||
|
|
267d349bb9 | ||
|
|
4467f36a7c | ||
|
|
5c9181d798 | ||
|
|
dea98d3c6f | ||
|
|
386b089273 | ||
|
|
83eadc5280 | ||
|
|
e5f4027f6a | ||
|
|
184981c400 | ||
|
|
6481b99948 | ||
|
|
2d2359e356 | ||
|
|
5a9e95e87a | ||
|
|
57e07da379 | ||
|
|
c7546cec40 | ||
|
|
83aaaefab9 | ||
|
|
78eb8565cd | ||
|
|
5ee67f1a34 | ||
|
|
df090a7952 | ||
|
|
17340781f5 | ||
|
|
a833cc6178 | ||
|
|
a6735b8029 | ||
|
|
948cc0c1d9 | ||
|
|
90437cf69c | ||
|
|
8526489e96 | ||
|
|
b0646619ad | ||
|
|
60362addd1 | ||
|
|
473f50d1e4 | ||
|
|
b6e2b7ce99 | ||
|
|
7fd295930b | ||
|
|
5d675d1d1a | ||
|
|
f6d0f4ce24 | ||
|
|
edcefab54e | ||
|
|
3099294da1 | ||
|
|
75225e88c7 | ||
|
|
a3dffcf1e7 | ||
|
|
fe00ce1b42 | ||
|
|
d408fbc677 | ||
|
|
e43033fecb | ||
|
|
313457a5f6 | ||
|
|
54deff7627 | ||
|
|
4d62cdeb05 | ||
|
|
d9843eb941 | ||
|
|
e1bf3d9ef6 | ||
|
|
f5c11fc2dc | ||
|
|
5e29093d76 | ||
|
|
f39396e7ee | ||
|
|
ef7080e4bd | ||
|
|
a05aad27f5 | ||
|
|
3defcc63f3 | ||
|
|
c53da51340 | ||
|
|
2d8d03230e | ||
|
|
2380d1b397 | ||
|
|
1cc09ab4e0 | ||
|
|
d78a46bc0b | ||
|
|
35247dd8f0 | ||
|
|
ff453805f0 | ||
|
|
d98910d823 | ||
|
|
e88c4b8e99 | ||
|
|
25b9bf56f0 | ||
|
|
3ac0de206b | ||
|
|
421f671b68 | ||
|
|
64eb30e370 | ||
|
|
b2ceea9f8a | ||
|
|
9f23b55a81 | ||
|
|
606cd66309 | ||
|
|
fe3ed5e07d | ||
|
|
4ba8510f3e | ||
|
|
3d28fc0bc5 | ||
|
|
f5230199cb | ||
|
|
18c24ff063 | ||
|
|
6f4bb006df | ||
|
|
a71a104524 | ||
|
|
b7a0d7f87b | ||
|
|
c56690bb70 | ||
|
|
0e1fec8307 | ||
|
|
2dcc74442c | ||
|
|
8384b4601d | ||
|
|
a25e6f33e3 | ||
|
|
8ec19f8e85 | ||
|
|
cd3e90823e | ||
|
|
f82ab3a6d1 | ||
|
|
ee00a19940 | ||
|
|
a1313b905b | ||
|
|
340e763bc2 | ||
|
|
54ebff5b27 | ||
|
|
983517ceac | ||
|
|
a1c6a431af | ||
|
|
57839595fc | ||
|
|
bdb2185678 | ||
|
|
4d5337377d | ||
|
|
0870abd663 | ||
|
|
ba8759412a | ||
|
|
5a28d8602c | ||
|
|
4479cc07c0 | ||
|
|
388d3c6132 | ||
|
|
6ba9d0c595 | ||
|
|
b93efd73dd | ||
|
|
ae19a8dbd2 | ||
|
|
02d8442da4 | ||
|
|
2c1a709fd6 | ||
|
|
ccc07cbb26 | ||
|
|
a07b29dbc3 | ||
|
|
bd0d3f0dd0 | ||
|
|
4d9aa07b49 | ||
|
|
ee17e9f937 | ||
|
|
5f95c410e9 | ||
|
|
e24d403a51 | ||
|
|
db37b58403 | ||
|
|
e850746c3b | ||
|
|
1ae52ffdf8 | ||
|
|
033e326ed8 | ||
|
|
271e1c8dd8 | ||
|
|
eba70a6580 | ||
|
|
1585eec6fd | ||
|
|
8f3e279045 | ||
|
|
c8800b180d | ||
|
|
2a1e80f8eb | ||
|
|
4fe50ea22a | ||
|
|
3a16b683f3 | ||
|
|
487f01b0f8 | ||
|
|
34a035927a | ||
|
|
af9edf94ab | ||
|
|
6e9f54de84 | ||
|
|
433ee3d202 | ||
|
|
9532934ba0 | ||
|
|
9beb1bcfb3 | ||
|
|
da718df7c5 | ||
|
|
b67ffc5e2b | ||
|
|
1c35917909 | ||
|
|
a318cc1ecd | ||
|
|
55c1a2124a | ||
|
|
f4b0dd084c | ||
|
|
bf3f21aef6 | ||
|
|
3308ffc872 | ||
|
|
ee527631f4 | ||
|
|
11561c10e8 | ||
|
|
b3327506fe | ||
|
|
7cf262c98e | ||
|
|
4c5305ff83 | ||
|
|
ecc35ee03c | ||
|
|
03cad9d505 | ||
|
|
06b6f9b4d7 | ||
|
|
507cb7ffd9 | ||
|
|
ce453fc269 | ||
|
|
a2eb8b07b1 | ||
|
|
d096855bec | ||
|
|
d01ebda19e |
11 changed files with 4059 additions and 2 deletions
44
cara/mc-output-publication.py
Normal file
44
cara/mc-output-publication.py
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
""" Title: COVID Airborne Risk Assessment
|
||||
Author: <author(s) names>
|
||||
Date: <date>
|
||||
Code version: <code version>
|
||||
Availability: <where it's located> """
|
||||
|
||||
from cara.montecarlo import *
|
||||
from cara.model_scenarios_publication import *
|
||||
|
||||
# qR table:
|
||||
generate_qr_csv('qR_unmasked')
|
||||
generate_qr_csv('qr_masked', masked=True)
|
||||
|
||||
# qR values for Breathing, light activity:
|
||||
print('\n<<<<<<<<<<< qR for Breathing, light activity >>>>>>>>>>>')
|
||||
present_qR_values(qR_models[0].concentration_model)
|
||||
# qR values for Speaking, light activity:
|
||||
print('\n<<<<<<<<<<< qR for Speaking, light activity >>>>>>>>>>>')
|
||||
present_qR_values(qR_models[1].concentration_model)
|
||||
# qR values for Shouting, light activity:
|
||||
print('\n<<<<<<<<<<< qR for Shouting / Singing, light activity >>>>>>>>>>>')
|
||||
present_qR_values(qR_models[2].concentration_model)
|
||||
|
||||
# qR values for shouting and light activity - qID=100, 500 and 1000
|
||||
print('\n<<<<<<<<<<< Shouting and light activity - qID=100 >>>>>>>>>>>')
|
||||
present_qR_values(qR_models_shout_light[0].concentration_model)
|
||||
print('\n<<<<<<<<<<< Shouting and light activity - qID=500 >>>>>>>>>>>')
|
||||
present_qR_values(qR_models_shout_light[1].concentration_model)
|
||||
print('\n<<<<<<<<<<< Shouting and light activity - qID=1000 >>>>>>>>>>>')
|
||||
present_qR_values(qR_models_shout_light[2].concentration_model)
|
||||
print('\n<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>')
|
||||
|
||||
present_model(qR_models[2].concentration_model, title='')
|
||||
|
||||
# qR for the S V Chorale superspreading event
|
||||
print('\n<<<<<<<<<<< S V Chorale: Shouting and light activity - qID=100 >>>>>>>>>>>')
|
||||
present_qR_quantiles(qR_models_shout_light[0].concentration_model, quantile=0.8)
|
||||
|
||||
# CDF plots of qR
|
||||
generate_cdf_curves_vs_qr(masked=False,qid=100)
|
||||
generate_cdf_curves_vs_qr(masked=False,qid=500)
|
||||
generate_cdf_curves_vs_qr(masked=False,qid=1000)
|
||||
|
||||
|
||||
123
cara/mc-output.py
Normal file
123
cara/mc-output.py
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
from cara.montecarlo import *
|
||||
from cara.model_scenarios import *
|
||||
|
||||
#compare_concentration_curves([classroom_model_with_hepa[0],classroom_model_full_open_multi[0]],['xxx', 'yyy'])
|
||||
|
||||
#plot_concentration_curve(classroom_model[1])
|
||||
#compare_concentration_curves([classroom_model, classroom_model_with_hepa], ['Just window', 'Window and HEPA'])
|
||||
|
||||
#print(np.mean(classroom_model[0].infection_probability()))
|
||||
#print(np.mean(classroom_model[1].infection_probability()))
|
||||
#print(np.mean(chorale_model.infection_probability())+np.std(chorale_model.infection_probability()))
|
||||
#print(np.quantile(chorale_model[0].infection_probability(),0.8))
|
||||
#print(np.quantile(chorale_model.infection_probability(),0.90))
|
||||
#print(np.quantile(chorale_model.infection_probability(),0.1))
|
||||
|
||||
#plot_pi_vs_exposure_time(chorale_model, ['model1', 'model2'])
|
||||
#print(np.mean(ski_cabin_model_baseline_20[1].infection_probability()))
|
||||
#plot_pi_vs_exposure_time(ski_cabin_model_baseline_exposure_time+ski_cabin_model_baseline_exposure_time_FFP2, ['Ski cabin - surgical masks', 'Ski cabin - no masks','Ski cabin - FFP2 masks',''],
|
||||
# colors=['#1f77b4','tomato', 'seagreen', 'seagreen'],
|
||||
# linestyles=['solid', 'dashed', '-.', '-.'],
|
||||
# points=20,
|
||||
# time_in_minutes=True,
|
||||
# normalize_y_axis=True)
|
||||
|
||||
#compare_viruses_qr(violins=True)
|
||||
present_qR_values(classroom_model[1].concentration_model)
|
||||
#print_qd_info(waiting_room_model_full_winter[1])
|
||||
|
||||
#print(np.mean(shared_office_model[1].infection_probability()))
|
||||
#composite_plot_pi_vs_viral_load([shared_office_worst_model[1], shared_office_model[1], shared_office_better_model[1]],
|
||||
# labels=['No mask &\nwindows closed', 'Baseline:Windows\nopen (10min/2h)', 'Windows open\n(10min/2h) +\nHEPA filter'],
|
||||
# colors=['tomato', '#1f77b4', 'limegreen'],
|
||||
# title='',
|
||||
# plot_pi_vs_viral_load vl_points=200)
|
||||
#composite_plot_pi_vs_viral_load([classroom_model_no_vent[1], classroom_model[1], classroom_model_with_hepa[1], classroom_model_full_open_multi[1], classroom_model_full_open_multi_masks[1]],
|
||||
# labels=['Windows closed', 'Baseline:Windows\nopen (10min/2h)', 'Windows open\n(10min/2h) + HEPA', 'Multiple windows open', 'Multiple windows open\n+masks'],
|
||||
# colors=['tomato','#1f77b4', 'dodgerblue', 'seagreen', 'limegreen'],
|
||||
# title='',
|
||||
# vl_points=200)
|
||||
|
||||
#composite_plot_pi_vs_viral_load([ski_cabin_model_60[1], ski_cabin_model_30[1], ski_cabin_model_baseline_20[1], ski_cabin_model_10[1]],
|
||||
# labels=['60 min', '30 min', 'Baseline: 20 min', '10 min'],
|
||||
# colors=['tomato', 'lightsalmon', '#1f77b4', 'limegreen'],
|
||||
# title='',
|
||||
# vl_points=200)
|
||||
#
|
||||
#composite_plot_pi_vs_viral_load([ski_cabin_model_baseline_20_no_mask[1], ski_cabin_model_baseline_20[1], ski_cabin_model_baseline_20_FFP2[1]],
|
||||
# labels=['20min\nno masks', 'Baseline: 20 min\nsurgical mask', '20 min\nFFP2 mask'],
|
||||
# colors=['tomato', '#1f77b4','seagreen'],
|
||||
# title='',
|
||||
# vl_points=200)
|
||||
|
||||
#compare_concentration_curves([classroom_model_no_vent[1], classroom_model[1], classroom_model_with_hepa[1], classroom_model_full_open_multi[1]],
|
||||
# labels=['Windows closed', 'Baseline: Windows open (10min/2h)', 'Windows open (10min/2h) + HEPA', 'Multiple windows open'],
|
||||
# colors=['tomato','#1f77b4', 'seagreen', 'limegreen'],
|
||||
# title=''
|
||||
# )
|
||||
|
||||
#compare_concentration_curves_virus_IGH_paper([classroom_model_no_vent[1], classroom_model[1], classroom_model_with_hepa[1], classroom_model_full_open_multi[1]],
|
||||
# labels=['Windows closed', 'Baseline: Windows open (10min/2h)', 'Windows open (10min/2h) + HEPA', 'Multiple windows open'],
|
||||
# colors=['tomato','#1f77b4', 'seagreen', 'limegreen'],
|
||||
# title=''
|
||||
# )
|
||||
#
|
||||
#compare_concentration_curves([waiting_room_model[1], waiting_room_model_full_summer[1],
|
||||
# waiting_room_model_full_winter[1], waiting_room_model_periodic_winter[1]],
|
||||
# labels=['Baseline: Windows closed', 'Windows open (summer)', 'Windows open (winter)', 'Windows open 5min/20min (winter)'],
|
||||
# colors=['#1f77b4', 'darkorange', 'deepskyblue', 'lightskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
|
||||
#compare_concentration_curves_virus_IGH_paper([waiting_room_model[1], waiting_room_model_full_summer[1],
|
||||
# waiting_room_model_full_winter[1], waiting_room_model_periodic_winter[1]],
|
||||
# labels=['Baseline: Windows closed', 'Windows open (summer)', 'Windows open (winter)', 'Windows open 5min/20min (winter)'],
|
||||
# colors=['#1f77b4', 'darkorange', 'deepskyblue', 'lightskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
|
||||
#plot_pi_vs_viral_load([classroom_model_no_vent[1]], labels=['Windows closed'],title='')
|
||||
#plot_pi_vs_viral_load([classroom_model_no_vent[1],classroom_model_full_open_multi_masks[1]], labels=['Windows closed','Multiple windows open + Masks'],title='')
|
||||
|
||||
#generate_cdf_curves_vs_qr(masked=False,qid=1000)
|
||||
|
||||
# rs = [model.expected_new_cases() for model in large_population_baselines]
|
||||
# print(f"R0 - original variant:\t{np.mean(rs[0])}")
|
||||
# print(f"R0 - english variant:\t{np.mean(rs[1])}")
|
||||
# print(f"Ratio between R0's:\t\t{np.mean(rs[1]) / np.mean(rs[0])}")
|
||||
#
|
||||
# compare_infection_probabilities_vs_viral_loads(*exposure_models)
|
||||
#
|
||||
#
|
||||
#present_model(exposure_models[0].concentration_model, title='')
|
||||
# plot_pi_vs_qid(fixed_vl_exposure_models, labels=['Viral load = $10^{' + str(i) + '}$' for i in range(6, 11)],
|
||||
# qid_min=5, qid_max=2000, qid_samples=200)
|
||||
#
|
||||
# plot_pi_vs_qid(fixed_vl_exposure_models, labels=['Viral load = $10^{' + str(i) + '}$' for i in range(6, 11)],
|
||||
# qid_min=100, qid_max=400, qid_samples=100)
|
||||
#
|
||||
#
|
||||
# plot_pi_vs_viral_load(exposure_models, labels=['Without masks', 'With masks'])
|
||||
#
|
||||
# for model in exposure_models:
|
||||
# present_model(model.concentration_model, title=f'Model summary - {"English" if model.concentration_model.infected.qid == 60 else "Original"} variant')
|
||||
# plt.hist(model.infection_probability(), bins=200)
|
||||
# plt.xlabel('Percentage probability of infection')
|
||||
# plt.title(f'Probability of infection in baseline case - {"English" if model.concentration_model.infected.qid == 60 else "Original"} variant')
|
||||
# plt.yticks([], [])
|
||||
# plt.show()
|
||||
|
||||
#composite_plot_pi_vs_viral_load([classroom_model_no_vent[1],classroom_model_full_open_multi_masks[1]],
|
||||
# labels=['Windows closed','Multiple windows open + Masks'],
|
||||
# colors=['#1f77b4','#ff7f0e'],
|
||||
# title='',
|
||||
# vl_points=500)
|
||||
#
|
||||
#compare_concentration_curves_virus_IGH_paper([classroom_model_no_vent[1], classroom_model[1], classroom_model_with_hepa[1], classroom_model_full_open_multi[1]],
|
||||
# labels=['Windows closed', 'Windows open (for 10min every 2h)', 'Windows open (for 10min every 2h) + HEPA', 'Multiple windows open (at all times)'],
|
||||
# colors=['tomato','#1f77b4', 'seagreen', 'limegreen'],
|
||||
# title='Mean concentration of infectious quantum and\ncumulative dose over exposure time'
|
||||
# )
|
||||
|
||||
#generate_qr_csv('qR_unmasked')
|
||||
#generate_qr_csv('qr_masked', masked=True)
|
||||
232
cara/mc-output_IGH_paper.py
Normal file
232
cara/mc-output_IGH_paper.py
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
from cara.montecarlo import *
|
||||
from cara.model_scenarios_IGH_paper import *
|
||||
|
||||
# #Fig 1c
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_no_mask_windows_open_breaks[0],
|
||||
# classroom_model_IGH_no_mask_windows_open_alltimes[0]],
|
||||
# labels=['Windows closed', 'Window open during breaks', 'Window open at all times'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1c ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_open_breaks[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_open_alltimes[0])
|
||||
#
|
||||
# #Fig 1d
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_no_mask_windows_open_breaks_winter[0],
|
||||
# classroom_model_IGH_no_mask_windows_open_alltimes_winter[0], classroom_model_IGH_no_mask_windows_fully_open_alltimes_winter[0]],
|
||||
# labels=['Windows closed', 'Window fully open during breaks', 'Window slightly open at all times', 'Window fully open at all times'],
|
||||
# colors=['tomato', 'lightskyblue', '#1f77b4', 'limegreen', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1d ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_open_breaks_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_open_alltimes_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_fully_open_alltimes_winter[0])
|
||||
#
|
||||
# #Fig 1e
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_no_mask_2windows_open_breaks[0],
|
||||
# classroom_model_IGH_no_mask_2windows_open_alltimes[0]],
|
||||
# labels=['Windows closed', '2 windows open during breaks', '2 windows open at all times'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1e ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_breaks[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_alltimes[0])
|
||||
#
|
||||
# #Fig 1f
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_no_mask_2windows_open_breaks_winter[0],
|
||||
# classroom_model_IGH_no_mask_2windows_open_alltimes_winter[0], classroom_model_IGH_no_mask_2windows_fully_open_alltimes_winter[0]],
|
||||
# labels=['Windows closed', '2 windows fully open during breaks', '2 windows slighty open at all times', '2 windows fully open at all times'],
|
||||
# colors=['tomato', 'lightskyblue', '#1f77b4', 'limegreen', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1f ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_breaks_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_alltimes_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_fully_open_alltimes_winter[0])
|
||||
#
|
||||
# #Fig 1g
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_no_mask_6windows_open_breaks[0],
|
||||
# classroom_model_IGH_no_mask_6windows_open_alltimes[0]],
|
||||
# labels=['Windows closed', '6 windows open during breaks', '6 windows open at all times'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1g ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_alltimes[0])
|
||||
#
|
||||
# #Fig 1h
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_no_mask_6windows_open_breaks_winter[0],
|
||||
# classroom_model_IGH_no_mask_6windows_open_alltimes_winter[0], classroom_model_IGH_no_mask_6windows_fully_open_alltimes_winter[0]],
|
||||
# labels=['Windows closed', '6 windows fully open during breaks', '6 windows slighty open at all times', '6 windows fully open at all times'],
|
||||
# colors=['tomato', 'lightskyblue', '#1f77b4', 'limegreen', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1h ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_alltimes_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_fully_open_alltimes_winter[0])
|
||||
#
|
||||
# #Fig 1i
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],
|
||||
# classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass[0]],
|
||||
# labels=['Windows closed',
|
||||
# '6 windows open during breaks + end of classes'],
|
||||
# colors=['tomato', '#1f77b4'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1i ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass[0])
|
||||
#
|
||||
# #Fig 1j
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],
|
||||
# classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass_winter[0]],
|
||||
# labels=['Windows closed',
|
||||
# '6 windows open during breaks + end of classes'],
|
||||
# colors=['tomato', '#1f77b4'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 1j ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass_winter[0])
|
||||
#
|
||||
#
|
||||
#
|
||||
# #Fig 2a
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_no_mask_windows_closed_1HEPA[0],
|
||||
# classroom_model_IGH_no_mask_windows_closed_2HEPA[0]],
|
||||
# labels=['Windows closed', 'Windows closed + 1 HEPA filter (2.5 ACH)', 'Windows closed + 2 HEPA filter (5 ACH)'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 2a ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_1HEPA[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_2HEPA[0])
|
||||
#
|
||||
# #Fig 2b
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_no_mask_windows_closed_1HEPA_winter[0],
|
||||
# classroom_model_IGH_no_mask_windows_closed_2HEPA_winter[0]],
|
||||
# labels=['Windows closed', 'Windows closed + 1 HEPA filter (2.5 ACH)', 'Windows closed + 2 HEPA filter (5 ACH)'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 2b ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_1HEPA_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_2HEPA_winter[0])
|
||||
#
|
||||
# #Fig 2c
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_with_mask_windows_closed[0]],
|
||||
# labels=['Windows closed', 'Windows closed + surgical type masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 2c ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_windows_closed[0])
|
||||
#
|
||||
# #Fig 2d
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_with_mask_windows_closed_winter[0]],
|
||||
# labels=['Windows closed', 'Windows closed + surgical type masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 2d ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_windows_closed_winter[0])
|
||||
#
|
||||
#
|
||||
# #Fig 3b
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_no_mask_2windows_open_alltimes_winter_bis[0],
|
||||
# classroom_model_IGH_with_mask_2windows_open_alltimes_winter[0]],
|
||||
# labels=['Windows closed', '2 windows open at all times', '2 windows open at all times + surgical masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 3b ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_alltimes_winter_bis[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_2windows_open_alltimes_winter[0])
|
||||
#
|
||||
# #Fig 3c
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_with_mask_windows_closed_1HEPA[0],
|
||||
# classroom_model_IGH_with_mask_windows_closed_2HEPA[0]],
|
||||
# labels=['No masks', '1 HEPA filter (2.5 ACH) + surgical masks', '2 HEPA filter (5 ACH) + surgical masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 3c ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_windows_closed_1HEPA[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_windows_closed_2HEPA[0])
|
||||
#
|
||||
# #Fig 3d
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed_winter[0],classroom_model_IGH_with_mask_2windows_open_alltimes_winter_1HEPA[0],
|
||||
# classroom_model_IGH_with_mask_2windows_open_alltimes_winter_2HEPA[0]],
|
||||
# labels=['Windows closed', '2 windows open at all times + 1 HEPA filter (2.5 ACH) + surgical masks', '2 windows open at all times + 2 HEPA filter (5 ACH) + surgical masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title=''
|
||||
# )
|
||||
# print("\n############ Fig 3d ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_closed_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_2windows_open_alltimes_winter_1HEPA[0])
|
||||
# print_qd_info(classroom_model_IGH_with_mask_2windows_open_alltimes_winter_2HEPA[0])
|
||||
#
|
||||
#
|
||||
# #Hourly breaks
|
||||
# print("\n############ Hourly breaks - summer ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_open_breaks_endOfClass[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_breaks_endOfClass[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass[0])
|
||||
#
|
||||
# print("\n############ Hourly breaks - winter ###########\n")
|
||||
# print_qd_info(classroom_model_IGH_no_mask_windows_open_breaks_endOfClass_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_2windows_open_breaks_endOfClass_winter[0])
|
||||
# print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass_winter[0])
|
||||
|
||||
|
||||
|
||||
#>>>>>>>>>>> Aux >>>>>>>>
|
||||
|
||||
|
||||
#print_qd_info(classroom_model_IGH_no_mask_windows_closed[0])
|
||||
#print_qd_info(classroom_model_IGH_no_mask_6windows_open_breaks_endOfClass[0])
|
||||
#print_qd_info(classroom_model_IGH_no_mask_2windows_open_breaks_endOfClass_winter[0])
|
||||
#print_qd_info(classroom_model_IGH_no_mask_windows_open_breaks_endOfClass_winter[0])
|
||||
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_no_mask_2windows_open_breaks_winter_bis[0],
|
||||
# classroom_model_IGH_with_mask_2windows_open_breaks_winter[0]],
|
||||
# labels=['Windows closed', '2 windows open during breaks', '2 windows open during breaks + surgical masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title='Combination of measures (winter period) '
|
||||
# )
|
||||
|
||||
# compare_concentration_curves_virus_IGH_paper([classroom_model_IGH_no_mask_windows_closed[0],classroom_model_IGH_with_mask_2windows_open_breaks_winter_1HEPA[0],
|
||||
# classroom_model_IGH_with_mask_2windows_open_breaks_winter_2HEPA[0]],
|
||||
# labels=['Windows closed', '2 windows open during breaks + 1 HEPA filter (2.5 ACH) + surgical masks', '2 windows open during breaks + 2 HEPA filter (5 ACH) + surgical masks'],
|
||||
# colors=['tomato', 'lightskyblue', 'limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title='Combination of measures (winter period) '
|
||||
# )
|
||||
|
||||
#compare_concentration_curves([classroom_model_IGH_no_mask_windows_closed[1],classroom_model_IGH_no_mask_2windows_open_breaks[1],classroom_model_IGH_no_mask_2windows_open_breaks_endOfClass[1],
|
||||
# classroom_model_IGH_no_mask_2windows_open_alltimes[1], classroom_model_IGH_no_mask_windows_closed_1HEPA[1],
|
||||
# classroom_model_IGH_no_mask_windows_closed_2HEPA[1]],
|
||||
# labels=['Windows closed', '2 Windows open during breaks', '2 Windows open during breaks + end of classes',
|
||||
# '2 Windows open at all times', 'Windows closed + HEPA filter (2.5 ACH)', 'Windows closed + HEPA filter (5 ACH)'],
|
||||
# colors=['tomato','limegreen', '#1f77b4', 'seagreen', 'lightskyblue', 'deepskyblue'],
|
||||
# title='No mask - Spring/Summer period'
|
||||
# )
|
||||
|
||||
#present_model(classroom_model_IGH_no_mask_windows_closed[0].concentration_model, title='')
|
||||
|
||||
947
cara/model_scenarios.py
Normal file
947
cara/model_scenarios.py
Normal file
|
|
@ -0,0 +1,947 @@
|
|||
from cara import models
|
||||
from cara.montecarlo import *
|
||||
|
||||
|
||||
fixed_vl_exposure_models = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=45),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=100),
|
||||
expiratory_activity=1,
|
||||
samples=2000000,
|
||||
breathing_category=1,
|
||||
viral_load=float(vl)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
) for vl in range(6, 11)]
|
||||
|
||||
|
||||
large_population_baselines = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=800),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=2000.
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=1,
|
||||
samples=200000,
|
||||
breathing_category=2,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=60,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
activity=models.Activity.types['Standing'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
######### Standard exposure models ###########
|
||||
exposure_models = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=45),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.2,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=3,
|
||||
samples=2000000,
|
||||
breathing_category=3,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
exposure_models_2 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=33),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=2000000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.1, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
######## Classroom exposure models ###########
|
||||
classroom_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_full_open = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_summer = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (291,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_full_open_summer = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (291,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_no_vent = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=0.25,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_teacher_mask_full_open = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (291,)),
|
||||
window_height=1.6, opening_length=4*0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_with_hepa = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.MultipleVentilation(
|
||||
ventilations=(
|
||||
models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
models.HEPAFilter(active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=800)
|
||||
)
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_full_open_multi = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.MultipleVentilation(
|
||||
ventilations=(
|
||||
models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=4*0.6,
|
||||
),
|
||||
models.HEPAFilter(active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0)
|
||||
)
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
classroom_model_full_open_multi_masks = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=160),
|
||||
ventilation=models.MultipleVentilation(
|
||||
ventilations=(
|
||||
models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=4*0.6,
|
||||
),
|
||||
models.HEPAFilter(active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0)
|
||||
)
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=3,
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=19,
|
||||
presence=models.SpecificInterval(((0, 2), (2.5, 4), (5, 7), (7.5, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
######### Shared office exposure models ###########
|
||||
shared_office_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=50),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
shared_office_model_no_mask = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=50),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
shared_office_worst_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=50),
|
||||
ventilation=models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=0.25,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
shared_office_better_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=50),
|
||||
ventilation=models.MultipleVentilation(
|
||||
ventilations=(
|
||||
models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
models.AirChange(active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=5.)
|
||||
)
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 2), (2.1, 4), (5, 7), (7.1, 9))),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
) for qid in (100, 60)]
|
||||
|
||||
######### Ski cabine exposure models ###########
|
||||
ski_cabin_model_10 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 10/60),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 10/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_baseline_20 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 20/60),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 20/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_baseline_20_FFP2 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 20/60),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 20/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['FFP2']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_baseline_20_no_mask = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 20/60),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 20/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_25 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 25/60),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 25/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_30 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 30/60),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 30/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_60 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 1),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 1),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['Type I']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
ski_cabin_model_baseline_exposure_time = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 60/60),)),
|
||||
masked=mi,
|
||||
virus=MCVirus(halflife=1.1, qID=60),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 60/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types[me]
|
||||
)
|
||||
)for mi, me in zip((True, False), ('Type I', 'No mask', 'FFP2'))]
|
||||
|
||||
ski_cabin_model_baseline_exposure_time_FFP2 = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=10),
|
||||
ventilation=models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=0.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 60/60),)),
|
||||
masked=True,
|
||||
virus=MCVirus(halflife=1.1, qID=60),
|
||||
expiratory_activity=2,
|
||||
samples=200000,
|
||||
breathing_category=4,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=3,
|
||||
presence=models.SpecificInterval(((0, 60/60),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['FFP2']
|
||||
)
|
||||
)for mi in (True, False)]
|
||||
|
||||
######### Gym exposure models ###########
|
||||
gym_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=300),
|
||||
ventilation=models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=6.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 1),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=1,
|
||||
samples=200000,
|
||||
breathing_category=5,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=28,
|
||||
presence=models.SpecificInterval(((0, 1),)),
|
||||
activity=models.Activity.types['Heavy exercise'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
gym_model_exposure_time = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=300),
|
||||
ventilation=models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=6.,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 1),)),
|
||||
masked=mi,
|
||||
virus=MCVirus(halflife=1.1, qID=60),
|
||||
expiratory_activity=1,
|
||||
samples=200000,
|
||||
breathing_category=5,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=28,
|
||||
presence=models.SpecificInterval(((0, 1),)),
|
||||
activity=models.Activity.types['Heavy exercise'],
|
||||
mask=models.Mask.types[me]
|
||||
)
|
||||
)for mi, me in zip((True, False), ('Type I', 'No mask'))]
|
||||
|
||||
######### Waiting room exposure models ###########
|
||||
waiting_room_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=100),
|
||||
ventilation=models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=0.25,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=14,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
waiting_room_model_full_winter = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=100),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=14,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
waiting_room_model_full_summer = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=100),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (291,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=14,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
waiting_room_model_periodic_winter = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=100),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=20, duration=5),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=3.8, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=14,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
waiting_room_model_periodic_summer = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=100),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=60, duration=10),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (291,)),
|
||||
window_height=1.6, opening_length=0.6,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=4,
|
||||
samples=200000,
|
||||
breathing_category=1,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=14,
|
||||
presence=models.SpecificInterval(((0, 2),)),
|
||||
activity=models.Activity.types['Seated'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
|
||||
######### S V Chorale exposure models ###########
|
||||
chorale_model = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=810),
|
||||
ventilation=models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=0.7,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 2.5),)),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=3,
|
||||
samples=20000,
|
||||
breathing_category=3,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=60,
|
||||
presence=models.SpecificInterval(((0, 2.5),)),
|
||||
activity=models.Activity.types['Moderate activity'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
)for qid in (100, 60)]
|
||||
1176
cara/model_scenarios_IGH_paper.py
Normal file
1176
cara/model_scenarios_IGH_paper.py
Normal file
File diff suppressed because it is too large
Load diff
59
cara/model_scenarios_publication.py
Normal file
59
cara/model_scenarios_publication.py
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
from cara import models
|
||||
from cara.montecarlo import *
|
||||
|
||||
######### Standard exposure models ###########
|
||||
qR_models = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=45),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.2,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=100),
|
||||
expiratory_activity=a,
|
||||
samples=2000000,
|
||||
breathing_category=3,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
activity=models.Activity.types['Light activity'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
) for a in (1, 2, 3)]
|
||||
|
||||
qR_models_shout_light = [MCExposureModel(
|
||||
concentration_model=MCConcentrationModel(
|
||||
room=models.Room(volume=45),
|
||||
ventilation=models.SlidingWindow(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
inside_temp=models.PiecewiseConstant((0, 24), (293,)),
|
||||
outside_temp=models.PiecewiseConstant((0, 24), (283,)),
|
||||
window_height=1.6, opening_length=0.2,
|
||||
),
|
||||
infected=MCInfectedPopulation(
|
||||
number=1,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
masked=False,
|
||||
virus=MCVirus(halflife=1.1, qID=qid),
|
||||
expiratory_activity=3,
|
||||
samples=2000000,
|
||||
breathing_category=3,
|
||||
expiratory_activity_weights=(0.7, 0.3, 0)
|
||||
)
|
||||
),
|
||||
exposed=models.Population(
|
||||
number=2,
|
||||
presence=models.SpecificInterval(((0, 4), (5, 9))),
|
||||
activity=models.Activity.types['Light activity'],
|
||||
mask=models.Mask.types['No mask']
|
||||
)
|
||||
) for qid in (100, 500, 1000)]
|
||||
|
|
@ -236,7 +236,7 @@ class WindowOpening(Ventilation):
|
|||
def air_exchange(self, room: Room, time: float) -> float:
|
||||
# If the window is shut, no air is being exchanged.
|
||||
if not self.active.triggered(time):
|
||||
return 0.
|
||||
return 0.25
|
||||
|
||||
# Reminder, no dependence on time in the resulting calculation.
|
||||
inside_temp = self.inside_temp.value(time)
|
||||
|
|
@ -384,7 +384,7 @@ class Virus:
|
|||
Virus.types = {
|
||||
'SARS_CoV_2': Virus(
|
||||
halflife=1.1,
|
||||
viral_load_in_sputum=10e8,
|
||||
viral_load_in_sputum=1e9,
|
||||
# No data on coefficient for SARS-CoV-2 yet.
|
||||
# It is somewhere between 0.001 and 0.01 to have a 50% chance
|
||||
# to cause infection. i.e. 1000 or 100 SARS-CoV viruses to cause infection.
|
||||
|
|
|
|||
1449
cara/montecarlo.py
Normal file
1449
cara/montecarlo.py
Normal file
File diff suppressed because it is too large
Load diff
9
cara/output-files/qR_unmasked.csv
Normal file
9
cara/output-files/qR_unmasked.csv
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
,,Breathing,,,Speaking,,,Shouting,
|
||||
Percentiles,Seated,Light,Heavy,Seated,Light,Heavy,Seated,Light,Heavy
|
||||
1st,4.37e-06,1.08e-05,2.75e-05,3.32e-04,8.11e-04,2.08e-03,1.66e-03,4.08e-03,1.05e-02
|
||||
5th,1.86e-05,4.61e-05,1.18e-04,1.41e-03,3.47e-03,8.83e-03,7.06e-03,1.73e-02,4.44e-02
|
||||
20th,6.62e-04,1.65e-03,4.23e-03,5.04e-02,1.24e-01,3.23e-01,2.53e-01,6.21e-01,1.62e+00
|
||||
50th,4.59e-02,1.13e-01,2.96e-01,3.48e+00,8.62e+00,2.25e+01,1.75e+01,4.29e+01,1.13e+02
|
||||
80th,1.16e+00,2.84e+00,7.34e+00,8.77e+01,2.16e+02,5.59e+02,4.37e+02,1.08e+03,2.80e+03
|
||||
95th,7.90e+00,1.94e+01,5.10e+01,6.00e+02,1.48e+03,3.88e+03,3.00e+03,7.34e+03,1.94e+04
|
||||
99th,2.42e+01,5.91e+01,1.57e+02,1.83e+03,4.50e+03,1.19e+04,9.20e+03,2.24e+04,5.95e+04
|
||||
|
9
cara/output-files/qr_masked.csv
Normal file
9
cara/output-files/qr_masked.csv
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
,,Breathing,,,Speaking,,,Shouting,
|
||||
Percentiles,Seated,Light,Heavy,Seated,Light,Heavy,Seated,Light,Heavy
|
||||
1st,8.32e-07,2.05e-06,5.25e-06,6.06e-05,1.51e-04,3.84e-04,3.06e-04,7.50e-04,1.91e-03
|
||||
5th,3.54e-06,8.77e-06,2.24e-05,2.58e-04,6.37e-04,1.62e-03,1.30e-03,3.20e-03,8.14e-03
|
||||
20th,1.26e-04,3.15e-04,8.04e-04,9.36e-03,2.30e-02,5.91e-02,4.66e-02,1.15e-01,2.95e-01
|
||||
50th,8.80e-03,2.17e-02,5.64e-02,6.40e-01,1.58e+00,4.11e+00,3.23e+00,7.92e+00,2.07e+01
|
||||
80th,2.21e-01,5.42e-01,1.40e+00,1.61e+01,3.95e+01,1.03e+02,8.08e+01,1.99e+02,5.12e+02
|
||||
95th,1.51e+00,3.71e+00,9.77e+00,1.10e+02,2.71e+02,7.11e+02,5.52e+02,1.35e+03,3.57e+03
|
||||
99th,4.62e+00,1.13e+01,3.02e+01,3.35e+02,8.30e+02,2.20e+03,1.68e+03,4.13e+03,1.10e+04
|
||||
|
|
|
@ -16,3 +16,12 @@ ignore_missing_imports = True
|
|||
|
||||
[mypy-mistune.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-tqdm.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-scipy.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-sklearn.*]
|
||||
ignore_missing_imports = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue