Skip to content
System dynamics (stock & flow) templates

System dynamics — predator-prey

Lotka-Volterra-style stocks with mutual feedback.

Template previewSystem dynamics (stock & flow)
Predator-preybirths= alpha*Preyeaten= beta*Prey*Preddeaths= gamma*PredPreyinit = 400Predinit = 80alpha= 0.1beta= 0.005gamma= 0.05

Make it your own.

title "Predator-prey"
stock Prey at (2,2) initial 400
stock Pred at (6,2) initial 80
flow births from Prey to Prey rate "alpha*Prey"
flow eaten from Prey to Pred rate "beta*Prey*Pred"
flow deaths from Pred to Pred rate "gamma*Pred"
aux alpha at (1,4) value 0.1
aux beta at (4,4) value 0.005
aux gamma at (7,4) value 0.05
info alpha -> births
info beta -> eaten
info gamma -> deaths
info Pred -> eaten
info Prey -> eaten