The 1951 Disney animated film is the best known version but the Internet has dozens of creative illustrations too.Ĭonsole.WriteLine("\nBegin Lotka-Volterra simulation") Complete C# code below.Īlice in Wonderland is sort of an abstract model of reality. I refreshed my memory of math modeling of differential equations using simulation, and I can apply that knowledge to modeling biological neurons, such as the Hindmarsh-Rose model. And of course, the numbers of predators and prey must be a whole number in real-life, as opposed to values like 0.6 that can occur in a simulation.Īnyway, good fun. Changing the dt scale, for example by scaling it by 0.001, is possible but then you have to adjust the scale of the a, b, c, d constants. For example, the dt value I used, 1, is arbitrary and is type integer. I captured the output from my demo program then dropped the values into Excel and made this graph.Įven though the simulation program only has a few lines of code, it’s extremely tricky. Notice that my choices for a, b, c, d don’t give a realistic result because the graph shows there are usually more predators than prey, but in most real bio systems, the number of prey usually greatly outnumber the predators. Using a = 0.09, b = 0.01, c = 0.01, d = 0.04, I graphed the results of my simulation for 1000 time steps. The specific values of a, b, c, d determine how the numbers of prey and predators vary over time. Y = number of predators (foxes) at time t,Ī = prey growth rate, b = prey death rate,Ĭ = pred. Where x = number of prey (rabbits) at time t, One of the problems is that classical LV uses calculus to solve a pair of related differential equations, but a computer simulation uses a very different approach. For example, the Wikipedia entry on LV gives an example with baboons and cheetahs which is quite misleading because it leaves out a few critical details. I realized that bio-neuro models were similar in some respects to Lotka-Volterra, so I decided to warm up by coding a simulation of Lotka-Volterra.īefore I go any further, let me mention that the vast majority of resources for LV simulation I found on the Internet were misleading in some way, or even had significant errors. Recently, I was looking at models of biological neurons with a view towards using the ideas for advanced spiking neural networks. The Lotka-Volterra (LV) predator-prey model made a big impression on me. When I was a math student in college, I remember taking a class that was about math models.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |