Compare commits

...

4 commits

Author SHA1 Message Date
Andre Henriques
56acedd8af add infected_people 2021-06-22 13:06:55 +00:00
Andre Henriques
ca0e8632e0 typo correction 2021-06-14 13:07:14 +00:00
Andre Henriques
24a1995955 update report text 2021-06-14 13:02:33 +00:00
Andre Henriques
ef6357ab6d add frequency parameter 2021-06-14 12:44:21 +00:00
2 changed files with 21 additions and 1 deletions

View file

@ -276,6 +276,25 @@ def comparison_report(scenarios: typing.Dict[str, models.ExposureModel]):
'plot': img2base64(_figure2bytes(comparison_plot(scenarios))),
'stats': statistics,
}
def frequency(rate: int) -> str:
#The frequency at which one person can get infected which is based on the incidence rate.
#Incidence rate is number of positive cases per 100 000 population
inc_rate = rate/100000
freq = (exposed_occupants + infected_people) * inc_rate
if freq >= 1
return 1
else
return "frequency": freq
def transmission_probabiltiy(self) -> str:
#The probability that transmission takes place which includes the prob of occurance that someone gets
#infected out of the total amount of occupants.
#Probability of transmission (in %)
Prob_transmission = (self.frequency * (prob_inf/100)) * 100
return "prob_trans": Prob_transmission
@dataclasses.dataclass

View file

@ -209,7 +209,8 @@
<p class="result_title">Results:</p>
<p class="data_text">
{% block report_summary %}
Taking into account the uncertainties tied to the model variables, in this scenario, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b><a href="#section1">[*]</a> and the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>.
Taking into account the uncertainties tied to the model variables, in this scenario with {{ form.infected_people }} infected, the <b>probability of one exposed occupant getting infected is {{ prob_inf | non_zero_percentage }}</b><a href="#section1">[*]</a>. Assuming every occupant is exposed to the same risk, the <b>expected number of new cases is {{ expected_new_cases | float_format }}</b>.
By including the current epidemiological situation in the region, the chances of on-site transmission reduces to <b>{{ prob_trans | float_format }} % </b>.
<p id="section1">[*] The results are based on the parameters and assumptions published in the CERN Open Report <a href="https://cds.cern.ch/record/2756083"> CERN-OPEN-2021-004</a></p>
{% endblock report_summary %}
</p>