Herbivory and Animal Interspecific Competition
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model simulates animal interspecific competition and herbivory.
HOW IT WORKS
Agents:
There are three types of agents: plants, mice1, and mice2.
Model Rules:
There are 168 patches (light blue squares) in the model. The nutrients in each patch may support and only support one plant.
Both species of mice feed on the same type of plants. Plants regrow every year.
Mice lose energy when they move around to search for food and die when running out of energy.
Mice gain energy when they find food and will produce offspring when they accumulate enough energy.
Mice' life spans are determined by the slides “mouse1-lifespan” and “mouse2-lifespan”.
HOW TO USE IT
Use sliders number-of-plants and other similar sliders to set up the number of organisms. Click Start/Reset to confirm the settings.
Put a number in years to define when the model ends.
Click Run/Pause to run or pause the model. Good for gaining an overview and a long-term result.
Click Run a year to run the model for a hypothetical year. Good for systematically collecting data.
Use plot-plants? and other similar switches to decide whether or not to plot certain organisms in the real-time plot. Good for providing a clear visualization.
Use mouse1-lifespan and mouse1-lifespan to define the lifespans of the mouse species.
THINGS TO TRY
What population patterns emerge in the model when plants and one mouse species are present?
What population patterns emerge when plants and mouse species are present in the model?
How do mouse lifespans affect the interaction between two species of mice?
What population patterns indicate herbivory interaction? Why?
What population patterns indicate a competition interaction? Why?
RELATED MODELS
Find more community interaction models at http://3dsciencemodeling.com
CREDITS AND REFERENCES
Dr. Lin Xiang (lin.xiang@uky.edu) created this module at the University of Kentucky in 2022. If you mention this model in a publication, we ask that you include the citations below.
Xiang, L. (2022). Herbivory and Animal Interspecific Competition. Department of STEM Education, University of Kentucky, Lexington, KY.
Comments and Questions
; Coded in 2022 by Lin Xiang; Last revised in 2022 by Lin Xiang (lxiang75@gmail.com; lin.xiang@uky.edu) ;; ;; If you mention this model in a publication, we ask that you include the citations below. ;; ;; Xiang, L. (2022). Herbivory and Animal Interspecific Competition. Department of STEM Education, University of Kentucky, Lexington, KY. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; breed [plant1s plant1] breed [plant2s plant2] breed [animal1s animal1 ] breed [animal2s animal2 ] breed [legends legend] plant1s-own [ num-seed-1 erg-0] plant2s-own [ num-seed-2 erg-00] animal1s-own [erg-1 life-1] animal2s-own [erg-2 life-2] patches-own [] Globals [ running-avg-list1 running-avg-list2 running-avg-lista1 running-avg-lista2 mean-total-1 mean-total-2 mean-total-a1 mean-total-a2 ] to-report empty-patches report patches with [pcolor >= 79 and pcolor <= 79.5 and not any? plant1s-here and not any? plant2s-here] end to setup clear-all setup-patches setup-legends add-plants add-mice1 add-mice2 set running-avg-list1 [] set running-avg-list2 [] set running-avg-lista1 [] set running-avg-lista2 [] reset-ticks end to setup-patches ask patches [set pcolor 79 + random-float 0.5] ask patches with [pycor = max-pycor or pycor < 2] [set pcolor white] end to add-plants ask up-to-n-of number-of-plants empty-patches [sprout-plant2s 1 [set shape "plant-1" set size 0.6 + random-float 0.4 set erg-00 10]] end to add-mice1 create-animal1s number-of-mice1 [set color 34 set size 0.65 set erg-1 5 + random 10 set shape "mouse" setxy 1 + random (max-pxcor - 1) 2 + random (max-pycor - 2) ] end to add-mice2 create-animal2s number-of-mice2 [set color 37 set size 0.75 set erg-2 5 + random 10 set shape "mouse" setxy 1 + random (max-pxcor - 1) 2 + random (max-pycor - 2) ] end ;;;;;;;;;;;;;;;;;;;;; ;; GO PROCEDURE ;; ;;;;;;;;;;;;;;;;;;;;; to go every 0.05[ if ticks >= Years [stop] move feeding reproduce-2 death find-running-avg tick ] end to move if any? animal1s [ask animal1s [ifelse life-1 >= 2 + mouse1-lifespan * 3 [die] [set life-1 life-1 + 1] right random 360 if [pcolor] of patch-at dx dy <= 79.5 and [pcolor] of patch-at dx dy >= 79 [fd 1 if ycor < 2 [set ycor 2] set erg-1 erg-1 - 1] if erg-1 <= 0 [die]]] if any? animal2s [ask animal2s [ifelse life-2 >= 2 + mouse2-lifespan * 3 [die] [set life-2 life-2 + 1] right random 360 if [pcolor] of patch-at dx dy <= 79.5 and [pcolor] of patch-at dx dy >= 79 [fd 1 if ycor < 2 [set ycor 2] set erg-2 erg-2 - 1] if erg-2 <= 0 [die]]] end to feeding (ifelse any? animal1s and not any? animal2s [feeding-1] any? animal2s and not any? animal1s [feeding-2] any? animal1s and any? animal2s [ifelse random 2 = 0 [feeding-1 feeding-2] [feeding-2 feeding-1]] ) end to feeding-1 ask animal1s [ if any? plant2s-here [ let food one-of plant2s-here set erg-1 erg-1 + [erg-00] of food ask food [die]]] ask animal1s [ if erg-1 > 20 [if random 100 < 20 [hatch 1 [set erg-1 5 set life-1 0] set erg-1 erg-1 - 10]]] end to feeding-2 ask animal2s [ if any? plant2s-here [ let food one-of plant2s-here set erg-2 erg-2 + [erg-00] of food ask food [die]]] ask animal2s [ if erg-2 > 20 [if random 100 < 20 [hatch 1 [set erg-2 5 set life-2 0] set erg-2 erg-2 - 10]]] end to reproduce-2 if any? plant2s [ask plant2s [set num-seed-2 1 + random 2 ask up-to-n-of num-seed-2 neighbors with [pcolor <= 79.5 and pcolor >= 79 and not any? plant1s-here and not any? plant2s-here] [sprout-plant2s 1 [set shape "plant-1" set size 0.6 + random-float 0.4 set erg-00 10]] ]] end to death ask plant2s [if random 100 < 30 [die]] ;a mortality of 30%-50% is optimal end to find-running-avg ;find the 5-year running averages (ifelse ticks < 10 [set running-avg-list1 lput (count plant1s) running-avg-list1 set mean-total-1 mean running-avg-list1 set running-avg-list2 lput (count plant2s) running-avg-list2 set mean-total-2 mean running-avg-list2 set running-avg-lista1 lput (count animal1s) running-avg-lista1 set mean-total-a1 mean running-avg-lista1 set running-avg-lista2 lput (count animal2s) running-avg-lista2 set mean-total-a2 mean running-avg-lista2] [set running-avg-list1 lput count plant1s running-avg-list1 set running-avg-list1 remove-item 0 running-avg-list1 set mean-total-1 mean running-avg-list1 set running-avg-list2 lput count plant2s running-avg-list2 set running-avg-list2 remove-item 0 running-avg-list2 set mean-total-2 mean running-avg-list2 set running-avg-lista1 lput count animal1s running-avg-lista1 set running-avg-lista1 remove-item 0 running-avg-lista1 set mean-total-a1 mean running-avg-lista1 set running-avg-lista2 lput count animal2s running-avg-lista2 set running-avg-lista2 remove-item 0 running-avg-lista2 set mean-total-a2 mean running-avg-lista2]) end to setup-legends create-legends 9 ask legend 0 [set shape "plant-1" set size 1 setxy 6 0.6] ask legend 1 [set shape "mouse" set color 34 set size 0.9 setxy 3 1] ask legend 2 [set shape "mouse" set color 36 set size 1 setxy 9 1] ask legend 3 [set shape "line" set color 8 set size 12 set heading 90 setxy 6 1.5] ask legend 4 [set shape "arrow-1" set color 136 set size 1.5 set heading -75 setxy 4.5 0.75] ask legend 5 [set shape "arrow-1" set color 136 set size 1.5 set heading 75 setxy 7.5 0.75] ask legend 6 [set shape "blank" set color 136 set size 1.5 set label "Mouse-2" set label-color 35 set heading 75 setxy 9 1] ask legend 7 [set shape "blank" set color 136 set size 1.5 set label "Mouse-1" set label-color 33 set heading 75 setxy 3 1] ask legend 8 [set shape "blank" set color 136 set size 1 set label "Both mouse species feed on the same type of plants." set label-color 0 set heading 75 setxy 10 0.2] end
There are 5 versions of this model.
This model does not have any ancestors.
This model does not have any descendants.