Intraspecific Competition Model-CNDD

No preview image

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.3.0 • Viewed 54 times • Downloaded 4 times • Run 0 times
Download the 'Intraspecific Competition Model-CNDD' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [J N2 empty-patch-random K1 K2 K3]
breed [species1 a-species1]
breed [species2 a-species2]
turtles-own [species]
patches-own [random-number]

to setup
  clear-all
  set J (w1 + 1) * (w1 + 1)
  resize-world 0 w1 0 w1
  set N2 J - N1
  set K1 N1
  set K2 J - N1
  while [K1 > 0] [
    set empty-patch-random one-of patches with [count turtles-here = 0]
    create-species1 1 [
      setxy [pxcor] of empty-patch-random [pycor] of empty-patch-random
      set species 1
      set size 1
      set shape "circle"
      set color orange
    ]
    set K1 K1 - 1
  ]
  while [K2 > 0] [
    set empty-patch-random one-of patches with [count turtles-here = 0]
    create-species2 1 [
      setxy [pxcor] of empty-patch-random [pycor] of empty-patch-random
      set species 2
      set size 1
      set shape "circle"
      set color blue
    ]
    set K2 K2 - 1
  ]
  reset-ticks
end 

to go
  species1-die
  species2-die
  ask turtles [species-birth]
  stochastic-death
  update-plots
  tick
end 

to species1-die
  ask species1 [
    let count-neighbor-species1 count species1-on neighbors
    if (count-neighbor-species1 > CND-sp1) [
      die
    ]
  ]
end 

to species2-die
  ask species2 [
    let count-neighbor-species2 count species2-on neighbors
    if (count-neighbor-species2 > CND-sp2) [
      die
    ]
  ]
end 

to species-birth
  let empty-patches count patches with [count turtles-here = 0]
  if (empty-patches > 0) [
    set empty-patch-random one-of patches with [count turtles-here = 0]
    ask empty-patch-random [
      let species1-count count species1-on neighbors
      let species2-count count species2-on neighbors
      if (species1-count < CND-sp1) [
        ask one-of species1 [
          hatch 1
          setxy [pxcor] of empty-patch-random [pycor] of empty-patch-random
        ]
      ]
      if (species2-count < CND-sp2) [
        ask one-of species2 [
          hatch 1
          setxy [pxcor] of empty-patch-random [pycor] of empty-patch-random
        ]
      ]
    ]
  ]
end 

to stochastic-death
  if-else (non-overlapping-genrations? = true) [
    set K J
    setup
  ]
  [
    set K3 K
    while [K3 > 0][
      ask one-of turtles [
        die
      ]
      set K3 K3 - 1
    ]
  ]
end 


; Copyright 2023 Sareena, B. & Ruwan Punchi-Manage.
; * Corresponding Email: spunchi@sci.pdn.ac.lk
; See Info tab for full copyright and license.

There are 3 versions of this model.

Uploaded by When Description Download
Ruwan Punchi-Manage 7 months ago Web version Download this version
Ruwan Punchi-Manage 7 months ago Web version Download this version
Ruwan Punchi-Manage 7 months ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.