Dynamic groups in backend
Structure in which the root class is the ExposureModelGroup, having as parameter a tuple of ExposureModel. The idea is to consider the dynamic occupancy for the exposed population as different groups of exposure models, to separately assess the expected number of new cases, as well as the probability of infection with the incidence rate.
New input:
occupancy = {
'group_A': {
'total_people': 5,
'infected': 2,
"presence": [
{"start_time": "09:00", "finish_time": "12:00"},
{"start_time": "13:00", "finish_time": "17:00"},
],
},
'group_B': {
'total_people': 3,
'infected': 1,
"presence": [
{"start_time": "09:00", "finish_time": "10:00"},
{"start_time": "11:00", "finish_time": "12:00"},
],
},
}
In case short-range interactions are added, the respective input is expected as follows:
short_range_interactions = {
"group_A": [
{"expiration": "Shouting", "start_time": "10:00", "duration": 30},
{"expiration": "Speaking", "start_time": "11:15", "duration": 15}
],
"group_B": [{"expiration": "Shouting", "start_time": "09:15", "duration": 30}],
}
Several tests were added.
Edited by Luis Aleixo