Commit graph

759 commits

Author SHA1 Message Date
Phil Elson
2a20bf834f Improve the concentration calculation scheme by more strictly defining the time interval concept to be closed start and open end 2020-10-27 14:34:45 +01:00
markus
ab8c0702ef add function for getting value 2020-10-27 11:51:49 +01:00
markus
afd6d4db58 fix double lunch-minute 2020-10-27 10:43:07 +01:00
markus
5c907455e3 preliminary notebook complete 2020-10-27 10:22:13 +01:00
Phil Elson
a70f899b52 Extract the concept of an interval for the Ventilation schemes, and correctly handle the time dependence of Ventilation in the concentration calculations. 2020-10-27 06:27:38 +01:00
Philip James Elson
943a65b063 Merge branch 'application_abstraction' into 'master'
Add infection probability calculation to the model

See merge request cara/cara!6
2020-10-26 19:34:19 +00:00
Phil Elson
739864cc28 Add infection probability calculation to the model, and introduce it into the model output in a rudimentary form. 2020-10-26 20:33:17 +01:00
Philip James Elson
55cf9820fa Merge branch 'pelson/improved_concentration_calculation' into 'master'
Simplify (and fix) the concentration calculation.

See merge request cara/cara!7
2020-10-26 19:25:41 +00:00
Phil Elson
9e9f1a28bc Fix a bug in the calculation of the concentration. 2020-10-26 20:21:15 +01:00
Phil Elson
4722a5511c Simplify the concentration calculation. 2020-10-26 20:12:54 +01:00
Philip James Elson
d984866396 Merge branch 'application_abstraction' into 'master'
Fix the broken mask selection widget.

See merge request cara/cara!5
2020-10-26 13:38:35 +00:00
Phil Elson
568f7ca56b Fix the broken mask selection widget. 2020-10-26 14:36:54 +01:00
Philip James Elson
5168020ed5 Merge branch 'application_abstraction' into 'master'
Implement all of the major model parameter widgets

See merge request cara/cara!4
2020-10-26 12:48:29 +00:00
Phil Elson
6463e04e71 Undo the change to the notebook. 2020-10-26 13:45:04 +01:00
Phil Elson
28ae62e040 Fix the Ventilation time units bug. 2020-10-26 13:42:44 +01:00
Phil Elson
a9d07ebb34 Fix the failing test, but without actually implemeting the necessary transactional behaviour. 2020-10-26 13:10:57 +01:00
Phil Elson
9037e68c31 Add names states for the Ventilation schemes, allowing their state to be persisted even if that scheme isn't currently active. 2020-10-26 11:12:16 +01:00
markus
2a7fa5b106 add elements for setting time, date and breaks 2020-10-26 09:57:33 +01:00
Philip James Elson
77a5808118 Merge branch 'application_abstraction' into 'master'
Abstract the model state so that we can mutate it conveniently in applications

See merge request cara/cara!3
2020-10-26 08:18:51 +00:00
Phil Elson
a95181612b Implement most of the model parameters in widgets. 2020-10-26 08:21:31 +01:00
markus
786524a8eb add padding between boxes 2020-10-22 16:24:15 +02:00
markus
3e3c0af9d7 add ventilation menu 2020-10-22 15:41:52 +02:00
markus
5e3b5826cc add mechanical ventilation box 2020-10-22 11:35:21 +02:00
markus
8cdd350157 use style to make enough room for description 2020-10-22 10:49:49 +02:00
markus
bdf9614f6a fix box for providing room dimensions 2020-10-22 10:40:40 +02:00
Phil Elson
f63e1d3760 Abstract the model state so that we can mutate it conveniently.
This rather large change adds a layer between the underlying (immutable) model and the application.
In doing so we can avoid the use of a global state (useful for the purposes of configuring multiple models in the same application later on) and it also unlocks the ability to implement an MVC-like separation of concerns - again, the intention is that when it comes to comparisons, we will just be able to re-use our application views.

I was hoping that ``cara.state`` could have been avoided in lieu of using traitlets, but unfortunately I found a number of limitations which were prohibitive for its use here.
Foremost of which was the lack of first-class dataclass support and the difficulty in needing either to use instances of the model (immutable) or duplicate the model and its structure in a mutable form and use the ``traitlets.Instance`` type.
Instead I opted for doing it myself - the ``cara.state`` module would make a very good standalone project in the future.
2020-10-21 20:59:01 +02:00
markus
ba257465c4 unfinished room parameter input 2020-10-21 16:42:10 +02:00
markus
f308c9d287 use HTML for title 2020-10-21 15:58:06 +02:00
markus
5cf0c4787f use placeholder as prompt 2020-10-21 15:52:21 +02:00
markus
aa229f4fb4 add intro section, but descriptions are cut off 2020-10-21 15:26:05 +02:00
Philip James Elson
69730bfb2a Merge branch 'ventilation' into 'master'
Ventilation

See merge request cara/cara!2
2020-10-21 08:26:35 +00:00
markus
ffd0bc80cd use smaller fixtures 2020-10-21 10:22:28 +02:00
markus
ea47010e3b hard-code correct answers in tests 2020-10-21 10:18:43 +02:00
markus
964aff6217 add default value to cd_b 2020-10-21 10:05:06 +02:00
markus
2e03934db7 add docstring to cd_b 2020-10-21 10:04:36 +02:00
markus
5ee96a1ddf add test for PeriodicHEPA 2020-10-20 16:42:41 +02:00
markus
f4dc698d1c add test for PeriodicWindow 2020-10-20 16:41:31 +02:00
markus
d959e8ee00 add new fixtures 2020-10-20 16:31:40 +02:00
markus
0a3785c2d1 correct type hint on q_air_mech 2020-10-20 16:31:20 +02:00
markus
aa3a58caae update notebook with ventilation changes 2020-10-20 16:23:21 +02:00
markus
8e524fea1b add colons to dataclass attribute docstrings 2020-10-20 16:19:04 +02:00
markus
da026e6265 tidy up long expression 2020-10-20 16:14:08 +02:00
markus
5fbda6afe3 move window parameters to Ventilation 2020-10-20 16:10:52 +02:00
markus
496f2d2a81 add type hint for room 2020-10-20 15:43:48 +02:00
markus
5273455a11 update correct concentrations to reflect QairNat 2020-10-20 14:57:08 +02:00
markus
d37927d78b update baseline_model fixture 2020-10-20 14:45:01 +02:00
markus
aff4cf84ed use new air_exchange function 2020-10-20 14:44:44 +02:00
markus
7dcdc0de84 replace ventilation scheme classes 2020-10-20 14:44:29 +02:00
markus
032bc6d0ad add window parameters as Room attributes 2020-10-20 14:43:45 +02:00
markus
35dff3d9ac add time as argument to infectious_virus_removal_rate 2020-10-20 14:41:11 +02:00