Vaccination¶
Warning
This page is out of date, as soon as possible it will be updated.
Vaccinations policies can be done with the vacciantions
parameter where a list of dictionaries can be passe each containing the parameters for a vaccination policy, where starting from a predefined day (start_day
), every day a number of doses (doses_per_day
) is applied on a group of citizens (filter
), after a citizen is vaccinated a fraction of the vaccinated (effectiveness
) became immune after a fixed number of days (days_to_immunity
).
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
In this example two vaccination policies where conducted:
- With the
vaccinate_children_and_seniors
5000 vaccine doses are applied in children and senior citizens per day. - With
(vaccination.HOSPITALS_WORKERS, {"start_day": 10, "doses_per_day": 500})
we load theHOSPITALS_WORKERS
predefined vaccination, but change thestart_day
to 10 (this vaccination will start on th 10th day of simulation) anddoses_per_day
to 500 (500 doses will be applied per day on this vaccination policy).
vaccinations
parameter¶
List with the ordered dictionaries of parameters for vaccination policies to be used during the simulation. Default: []
Predefined vaccinations¶
Seealso
Predefined vaccinations uses predefined filters.
vaccination.SENIORS¶
Apply the deafult number of doses on senior citzens (age groups 12 to 21, 60+ years old).
SENIORS = {
"name": "Senior citizens",
"filter": (FILTER_SENIORS, "&", FILTER_DIAG_NO),
}
vaccination.ADULTS¶
Apply the deafult number of doses on adults citzens (age groups 5 to 21, 20+ years old).
ADULTS = {
"name": "Adult citizens",
"filter": (FILTER_ADULTS, "&", FILTER_DIAG_NO),
}
vaccination.CHILDRENS¶
Apply the deafult number of doses on child citzens (age groups 0 to 4, 0-19 years old).
CHILDRENS = {
"name": "Child citizens",
"filter": (FILTER_CHILDRENS, "&", FILTER_DIAG_NO),
}
vaccination.DIAG_NO¶
Apply the deafult number of doses on citzens that where not diagnosed.
DIAG_NO = {
"name": "Not dignosed",
"filter": FILTER_DIAG_NO,
}
vaccination.MAKETS_WORKERS¶
Apply the deafult number of doses on markets workers.
MAKETS_WORKERS = {
"name": "Markets workers",
"filter": (FILTER_MARKET_WORKERS, "&", FILTER_DIAG_NO),
}
vaccination.HOSPITALS_WORKERS¶
Apply the deafult number of doses on hospitals workers.
HOSPITALS_WORKERS = {
"name": "Hospitals workers",
"filter": (FILTER_HOSPITALS_WORKERS, "&", FILTER_DIAG_NO),
}
Custom vaccinations parameters¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
string |
Name of the vaccination policy. |
required |
start_day |
int |
Day from the start of the simulation to start the vaccination policy. |
'0.' |
days_to_immunity |
float |
Number of days for vaccinated particles to became immune. |
'30.0.' |
effectiveness |
float |
Fraction of vaccianted particles to became immune. |
'1.0.' |
filter |
tuple |
A sequence of nested tuples of strings and values to be evaluated to select particles to vaccinate, strings can be population attributes (see particles states attributes), comparative operators, binary operators or makers (see markers bellow). Examples:
Available markers for filter_in:
|
"`FILTER_DIAG_NO`\n\n**ATTENTION:** Do NOT use python's normal boolean operators (`and`, `or`, `not`, etc), all operations\n are applied on numpy boolean arrays and the apropriate operators to use are binary operators\n (`&`, `|`, `~`, etc)." |
doses_per_day |
int |
Number of available doses per day for this policy (this number will be normalized with the number of particles). |
'1000.' |
Predefined filters¶
vaccination.FILTER_DIAG_NO¶
Selects citzens that where not diagnosed.
FILTER_DIAG_NO = ("diag_states", "!=", DIAG_YES)
vaccination.FILTER_SENIORS¶
Selects senior citzens (age groups 12 to 21, 60+ years old).
``` python FILTER_SENIORS = ("ages", "isin", list(range(12, 22)))
#### vaccination.FILTER_ADULTS
Selects adults citzens (age groups 5 to 21, 20+ years old).
``` python
FILTER_ADULTS = ("ages", "isin", list(range(5, 22)))
vaccination.FILTER_CHILDRENS¶
Selects child citzens (age groups 0 to 4, 0-19 years old).
FILTER_CHILDRENS = ("ages", "isin", list(range(0, 5)))
vaccination.FILTER_MARKET_WORKERS¶
Selects markets workers.
FILTER_MARKET_WORKERS = ("workplace_id", "==", ("service", "Markets"))
vaccination.FILTER_HOSPITALS_WORKERS¶
Selects hospitals workers.
FILTER_HOSPITALS_WORKERS = ("workplace_id", "==", ("service", "Hospitals"))