System dynamics — predator-prey
Lotka-Volterra-style stocks with mutual feedback.
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