Computing: Free Pascal Programming

Programming Home   Home   Contact

Predator-prey simulation (LotkaVolterra1).

Description: Biology simulation, showing the growth of 2 species, one of them being the predator, the other being the prey, using the Lotka-Volterra model. The user may choose to use the exponential or the logistic growth model for the prey, as she may choose to use the common formulae, using the "predation growth rate", or the alternate formulae, using the "predation efficiency rate".
Simulation data is entered in the main window, the model parameters, as used with the simulation of the lynx and hares populations in Canada, may be loaded via the program menu. Use "Start" to start the simulation: the number of predator and prey pictures will increase/decrease as time passes. Default simulation time interval is 1 year growth time corresponding to 1 second real time.
This visual part of the simulation is more programming fun of myself than really scientificly useful. If you are seriously interested in the simulation results, use the "Graph" button to display the variation of the prey and predator populations vs. time.
Help concerning the Lotka-Volterra model, as well as help concerning the usage of the application is included.

Change log:
Version 1.0 (January-July 2019): Original program.
Version 1.1 (October 2019): Optional usage of logistic growth (carrying capacity) for the prey.

Free Pascal features: Showing/hiding/changing controls, depending on actual situation. Creating images during program execution. Using a timer and the 'Left', 'Top' and 'Visibility' properties of images to create simple simulation programs. Using canvas controls to draw mathematical graphs.


Predator-prey application: Simulation window
Predator-prey application: Graph window (exponential prey growth)
Predator-prey application: Graph window (logistic prey growth)