Skip to content
System dynamics (stock & flow) templates

System dynamics — SIR epidemic

Classic SIR compartmental model.

Template previewSystem dynamics (stock & flow)
SIR epidemic modelinfection= beta*S*I/Nrecovery= gamma*ISusceptibleinit = 990Infectedinit = 10Recoveredinit = 0beta= 0.3gamma= 0.1

Make it your own.

title "SIR epidemic model"
stock S "Susceptible" at (1,2) initial 990
stock I "Infected" at (4,2) initial 10
stock R "Recovered" at (7,2) initial 0
flow infection from S to I rate "beta*S*I/N"
flow recovery from I to R rate "gamma*I"
aux beta at (2.5,4) value 0.3 label "beta"
aux gamma at (5.5,4) value 0.1 label "gamma"
info beta -> infection
info gamma -> recovery
info S -> infection
info I -> infection
info I -> recovery