This tutorial shows how to use a simple vaccination, that acts independently of any environmental intervention.
Products and interventions
In addition to direct modification of environmental shedding (previous tutorial), Typhoidsim has implemented a few products, that can be used in combination with different types of interventions. For instance a vaccine product like typhoid_vaccine() can be used in combination with
routine_vx() for routine vaccination
campaign_vx() for one-off campaigns
vaccination_with_waning() for a purpose-built implementation of typhoid vaccine schedules with optional age-specific waning
The next tutorial will describe diagnostic and screening interventions.
import starsim as ssimport typhoidsim as ty# Define high-level simulation parameterspars =dict( start =2000, # Starting year dur =2.0, # Duration of the simulation in years dt =7.0/365.0, # Timestep of 1 week, expressed in years verbose =0, # Do not print details of the run)# The populationppl = ss.People(50_000)# Person to person transmissionrandom_p2p = ss.RandomNet({'n_contacts': 10})# The diseasetyphoid = ty.Typhoid(pars={'tppi':0.1, 'init_seroprev':0.8, 'init_prev':0.001})# Create productsvax1 = ty.typhoid_vaccine(efficacy=0.4)vax2 = ty.typhoid_vaccine(efficacy=0.8)# Create the interventionsmy_intervention_vax1 = ss.routine_vx( start_year=2000, # Begin vaccination in 2000 prob=0.2, # 20% coverage product=vax1 # Use vax 1)# Create the interventionsmy_intervention_vax2 = ss.routine_vx( start_year=2000, # Begin vaccination in 2000 prob=0.2, # 20% coverage product=vax2 # Use vax 2)# Now create two sims: a baseline sim and one with the interventionsim_base = ss.Sim(pars=pars, people=ppl, networks=random_p2p, diseases=typhoid)sim_base.run()sim_vax1 = ss.Sim(pars=pars, people=ppl, networks=random_p2p, diseases=typhoid, interventions=my_intervention_vax1)sim_vax1.run()sim_vax2 = ss.Sim(pars=pars, people=ppl, networks=random_p2p, diseases=typhoid, interventions=my_intervention_vax2)sim_vax2.run()