# 3. DEMO - multiplication of the wolves and rabbits # (Lotka - Volterra equation) func wolf,rabbit; # number of the wolves and rabbits const b1,b2; # constants of multiplication const d1,d2; # constants of mortality # the multiplication of the wolves is proportional to the number of # the rabbits and the mortality rate is constant wolf'=(b1*rabbit-d1)*wolf; # the mortality of the rabbits is proportional to the number of # the wolves and the multiplication rate is constant rabbit'=(b2-d2*wolf)*rabbit; endmodel; b1=0.01; # constants d1=10; b2=10; d2=0.01; rabbit=1200; # initial numbers wolf=1000; rerr(wolf,0.00005); # error bounds of the solution rerr(rabbit,0.00005); run(0,1,0.1,wolf,rabbit); # interval of the modelling print(table,0,1,0.01,wolf,rabbit); # table plot(graph,0,1,0.01,wolf=f,rabbit=n); # graph