Skip to content

Commit

Permalink
Updated sample/tutorial files
Browse files Browse the repository at this point in the history
  • Loading branch information
alsnhll committed Nov 26, 2024
1 parent f680be3 commit f7d19eb
Show file tree
Hide file tree
Showing 11 changed files with 979 additions and 304 deletions.
2 changes: 2 additions & 0 deletions examples/tutorials/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# flepimop_sample

This repository mirrors the contents in the **examples/tutorial** folder of the FlepiMoP repository ([link](https://github.com/HopkinsIDD/flepiMoP/tree/main/examples/tutorials)). It can be used to try out running simple projects using `flepimop` code and as a template for new projects.
4 changes: 2 additions & 2 deletions examples/tutorials/config_sample_2pop_inference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ seir_modifiers:
method: SinglePeriodModifier
parameter: Ro
period_start_date: 2020-05-01
period_end_date: 2020-07-01
period_end_date: 2020-08-31
subpop: "all"
value:
distribution: truncnorm
Expand Down Expand Up @@ -145,7 +145,7 @@ outcome_modifiers:
# assume that due to limitations in testing, initially the case detection probability was lower
test_limits:
method: SinglePeriodModifier
parameter: incidCase
parameter: incidCase::probability
subpop: "all"
period_start_date: 2020-02-01
period_end_date: 2020-06-01
Expand Down
66 changes: 0 additions & 66 deletions examples/tutorials/config_sample_2pop_interventions_test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions examples/tutorials/config_sample_2pop_modifiers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ seir_modifiers:
method: SinglePeriodModifier
parameter: Ro
period_start_date: 2020-05-01
period_end_date: 2020-07-01
period_end_date: 2020-08-31
subpop: "all"
value: 0.8
Ro_all:
Expand Down Expand Up @@ -105,7 +105,7 @@ outcome_modifiers:
# assume that due to limitations in testing, initially the case detection probability was lower
test_limits:
method: SinglePeriodModifier
parameter: incidCase
parameter: incidCase::probability
subpop: "all"
period_start_date: 2020-02-01
period_end_date: 2020-06-01
Expand Down
168 changes: 168 additions & 0 deletions examples/tutorials/config_sample_2pop_vaccine_scenarios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: sample_2pop
setup_name: minimal
start_date: 2020-02-01
end_date: 2020-08-31
nslots: 10

subpop_setup:
geodata: model_input/geodata_sample_2pop.csv
mobility: model_input/mobility_sample_2pop.csv

initial_conditions:
method: SetInitialConditions
initial_conditions_file: model_input/ic_2pop.csv
allow_missing_subpops: TRUE
allow_missing_compartments: TRUE

compartments:
infection_stage: ["S", "E", "I", "R", "V"]

seir:
integration:
method: rk4
dt: 1
parameters:
sigma:
value: 1 / 4
gamma:
value: 1 / 5
Ro:
value:
distribution: truncnorm
mean: 2.5
sd: 0.1
a: 1.1
b: 3
omega_pess:
value: 0.02
omega_opt:
value: 0.01
nu_pess:
value: 0.01
nu_opt:
value: 0.03
transitions:
#infections
- source: ["S"]
destination: ["E"]
rate: ["Ro * gamma"]
proportional_to: [["S"],["I"]]
proportion_exponent: ["1","1"]
# progression to infectiousness
- source: ["E"]
destination: ["I"]
rate: ["sigma"]
proportional_to: ["E"]
proportion_exponent: ["1"]
# recovery
- source: ["I"]
destination: ["R"]
rate: ["gamma"]
proportional_to: ["I"]
proportion_exponent: ["1"]
#vaccination (offers complete protection)
- source: ["S"]
destination: ["V"]
rate: ["nu_pess + nu_opt"]
proportional_to: ["S"]
proportion_exponent: ["1"]
# waning of vaccine-induced protection
- source: ["V"]
destination: ["S"]
rate: ["omega_pess + omega_opt"]
proportional_to: ["V"]
proportion_exponent: ["1"]

seir_modifiers:
scenarios:
- no_vax
- pess_vax
- opt_vax
modifiers:
pess_vax_nu: # turn off nu_opt, only nu_pess left
method: SinglePeriodModifier
parameter: nu_opt
period_start_date: 2020-02-01
period_end_date: 2020-08-31
subpop: "all"
value: 0
pess_vax_wane: # turn off omega_opt, only omega_pess left
method: SinglePeriodModifier
parameter: omega_opt
period_start_date: 2020-02-01
period_end_date: 2020-08-31
subpop: "all"
value: 0
pess_vax: # turn off all vaccination
method: StackedModifier
modifiers: ["pess_vax_nu","pess_vax_wane"]
opt_vax_nu: # turn off nu_pess, only nu_opt left
method: SinglePeriodModifier
parameter: nu_pess
period_start_date: 2020-02-01
period_end_date: 2020-08-31
subpop: "all"
value: 0
opt_vax_wane: # turn off omega_pess, only omega_opt left
method: SinglePeriodModifier
parameter: omega_pess
period_start_date: 2020-02-01
period_end_date: 2020-08-31
subpop: "all"
value: 0
opt_vax: # turn off all vaccination
method: StackedModifier
modifiers: ["opt_vax_nu","opt_vax_wane"]
no_vax: # turn off all vaccination
method: StackedModifier
modifiers: ["pess_vax","opt_vax"]



outcomes:
method: delayframe
outcomes:
incidCase: #incidence of detected cases
source:
incidence:
infection_stage: "I"
probability:
value:
distribution: truncnorm
mean: 0.5
sd: 0.05
a: 0.3
b: 0.7
delay:
value: 5
incidHosp: #incidence of hospitalizations
source:
incidence:
infection_stage: "I"
probability:
value: 0.05
delay:
value: 7
duration:
value: 10
name: currHosp # will track number of current hospitalizations (ie prevalence)
incidDeath: #incidence of deaths
source: incidHosp
probability:
value: 0.2
delay:
value: 14

# outcome_modifiers:
# scenarios:
# - test_limits
# modifiers:
# # assume that due to limitations in testing, initially the case detection probability was lower
# test_limits:
# method: SinglePeriodModifier
# parameter: incidCase::probability
# subpop: "all"
# period_start_date: 2020-02-01
# period_end_date: 2020-06-01
# value: 0.5

This file was deleted.

Loading

0 comments on commit f7d19eb

Please sign in to comment.