# Simulation file for Lotka-Voltera reaction

graphics opengl
graphic_iter 5

dim 3

define K_RABBIT_REPRODUCTION 10
define K_FOX_EAT_RABBIT_AND_REPRODUCE 8000
define K_FOX_DEATH 10
define INIT_RABBIT_COUNT 1000
define INIT_FOX_COUNT 1000

species rabbit fox

boundaries x -100 100 p
boundaries y -100 100 p
boundaries z -10 10 p

time_start 0
time_stop 20
time_step 0.001

color rabbit red
color fox green
display_size rabbit 2
display_size fox 3

molecule_lists rlist flist
mol_list rabbit rlist
mol_list fox flist
molperbox 1

difc all 100
reaction r1 rabbit -> rabbit + rabbit K_RABBIT_REPRODUCTION
reaction r2 rabbit + fox -> fox + fox K_FOX_EAT_RABBIT_AND_REPRODUCE
reaction r3 fox -> 0 K_FOX_DEATH

mol INIT_RABBIT_COUNT rabbit u u u
mol INIT_FOX_COUNT fox u u u

#cmd B pause
#output_files lotvoltout.txt
#cmd i 0 5 0.01 molcount lotvoltout.txt
#output_files stdout
#cmd i 0 2 0.1 molcount stdout

text_display time rabbit fox

end_file

