Short range implementation
Model changes to consider the short range interactions on the results. Also solves #253 (closed) .
Changes were made in the code, both on backend
and frontend
sides.
Frontend
:
Added a new section on the Calculator
to specify the short-range interactions. In the new modal dialog users can now specify different interactions through the day, with the respective durations. All the validations under the form were also consider to avoid having overlapping interactions, or interactions out of the simulation time. Data is then translated into a list - [{“activity”: …, “start_time”: …, “duration”:…}, …]
.
The report is now adapted to the new concentration and dose values - added a zooming functionality and adapted the legend box. Zooming is not needed when there are is only Breathing
short range interactions:
Backend
:
- Added a
ShortRangeModel
dataclass that depends on the expiration and activity types, given a specific presence interval. It has methods that calculate the dilution factor, the short range concentration, and exposure. -
ExposureModel
data class has now a list ofShortRangeModels
. Methods under this dataclass were adapted to include the exposure between two specific bounds, both related to long-range and short-range interactions. -
monte_carlo/data.py
has now a distribution for the short range distances. It is also adapted to consider a newshort_range_expiration_distribution
where theparticle
diameters go from 0 to 100 microns.
Unit and integration tests are also included.