Merge branch 'feature/r0_fix' into 'master'

Handled reproduction number error, and added close X button

See merge request cara/cara!373
This commit is contained in:
Andre Henriques 2022-06-27 16:56:08 +02:00
commit 5ddc7b6bd4
2 changed files with 10 additions and 1 deletions

View file

@ -391,6 +391,9 @@
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="short_range_dialogTitle">Short-range interactions</h5> <h5 class="modal-title" id="short_range_dialogTitle">Short-range interactions</h5>
<button type="button" class="close close_btn_frm_field">
<span aria-hidden="true">&times;</span>
</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">

View file

@ -1422,7 +1422,13 @@ class ExposureModel:
self.concentration_model.virus.transmissibility_factor)))) * 100 self.concentration_model.virus.transmissibility_factor)))) * 100
def expected_new_cases(self) -> _VectorisedFloat: def expected_new_cases(self) -> _VectorisedFloat:
prob = self.infection_probability() # Create an equivalent exposure model without short-range interactions, if any.
if (len(self.short_range) == 0):
exposure_model = nested_replace(self, {'short_range': ()})
prob = exposure_model.infection_probability()
else:
prob = self.infection_probability()
exposed_occupants = self.exposed.number exposed_occupants = self.exposed.number
return prob * exposed_occupants / 100 return prob * exposed_occupants / 100