Diagnostics¶
One or more diagnostics to be applied on the population can be configured with the diagnostics
parameter. Diagnostics data are stored on the attributes diag_state
, diag_type
, diag_false
and diag_waiting
atributes of the population
class and can be used by other intervention mechanics like decisions and quarantines.
diagnostics
parameter¶
List with the ordered dictionaries of parameters for diagnostics policies to be used during the simulation. Default: [diagnostics.SEROLOGICAL]
Predefined diagnostics¶
diagnostics.SEROLOGICAL¶
All symptomatic particles be tested with sensitivity of 86%.
SEROLOGICAL = {
"name": "Serological",
"sensitivity": 0.86,
"specificity": 0.90,
}
diagnostics.PCR¶
All symptomatic particles be tested with sensitivity of 90% and a 2 days delay for results.
PCR = {
"name": "PCR",
"result_delay": 2.0,
"sensitivity": 0.90,
"specificity": 1.0,
}
Custom diagnostic parameters¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
string |
Name of the diagnostic. |
required |
filter_particles |
tuple |
A sequence of nested tuples of strings and values to be evaluated to select particles to apply diagnostic, strings can be population attributes (see particles states attributes), comparative operators, binary operators or makers (see markers bellow). Examples:
Available markers for filter_particles:
ATTENTION: Do NOT use python's normal boolean operators ( |
'`("symptoms", "==", SYMPT_YES), "|", ("symptoms", "==", SYMPT_SEVERE)`' |
number_per_day |
int |
Number of tests to be applied in the selected population, particles selected with filter_particles will be selected ramdomly to test if there isn't enough tests. If set to -1 will test all particles selected with filter_particles. |
'-1' |
sensitifity |
float |
Sensitivity value for the test in the [0., 1.] interval. |
'0.85' |
specificity |
float |
Specificity value for the test in the [0., 1.] interval. |
'0.96' |
test_delay |
float |
Time in days between a particle is selected to be tested and the test is made. |
'0.0' |
result_delay |
float |
Time in days between a particle is tested and the result is available. |
'0.0' |
allow_retest |
str |
Allow particles to retest the test, available settings:
|
'"no"' |
retest_delay |
float |
Time since last result for a particle to be alloed retest. |
'2.0' |
start_day |
int |
Days from the start of the simulation to start using this diagnostic. |
'0' |
end_day |
int |
Days from the start of the simulation to stop using this diagnostic. If set to -1 this diagnostic will be used up to the end of the simulation. |
'-1' |