Competitive Exclusion

Competitive Exclusion preview image

1 collaborator

Default-person David Black (Author)

Tags

ecological competition 

Tagged by David Black over 3 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 141 times • Downloaded 11 times • Run 0 times
Download the 'Competitive Exclusion' modelDownload this modelEmbed this model

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


Comments and Questions

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

Click to Run Model

breed [white-footed-mice white-footed-mouse]
breed [jumping-mice jumping-mouse]
breed [weasels weasel]

white-footed-mice-own [wfm-energy]
jumping-mice-own [jm-energy]
patches-own [is-opening?
  regrowth
]

to setup
  if behaviorspace-run-number <= 1 [
    setup-habitat
  ]
  setup-animals
end 

to setup-animals
  clear-turtles
  clear-all-plots
  set-default-shape white-footed-mice "squirrel"
  create-white-footed-mice Number-White-Footed-Mice
  [
  set color grey
  set size 4
  setxy random-xcor random-ycor
  set wfm-energy 100
  ]

  set-default-shape jumping-mice "squirrel"
  create-jumping-mice Number-jumping-Mice
  [
  set color red
  set size 4
  setxy random-xcor random-ycor
  set jm-energy 100
  ]

  set-default-shape weasels "weasel"
  create-weasels Number-of-Weasels
  [
  set color yellow
  set size 8
  setxy random-xcor random-ycor
  ]


  reset-ticks
end 

to go
  wfm-forage
  wfm-lifecycle
  weasels-lifecycle
  jm-forage
  jm-lifecycle
  weasel-hunt
  eat-wfm
  eat-jm
  grow-food-opening
  grow-food-forest
  drought
  if count white-footed-mice <= 0 or count jumping-mice <= 0
     [stop]
  tick
end 

to setup-habitat
  clear-patches
  ask patches [
    set is-opening? false
  ]
  ask n-of Number-of-openings patches [
    set is-opening? true
       set pcolor white
    ask other (patches in-radius (Diameter-of-openings / 2)) [
      set is-opening? true
      set pcolor white
    ]

  ]
  ask patches [
    set regrowth 50
  ]
end 

to grow-food-opening
  ask patches [
    if pcolor = green [
    set regrowth (regrowth - 1)
    if regrowth <= 0 [
      set pcolor white
      set regrowth 50
    ]
    ]
  ]
end 

to grow-food-forest
   ask patches [
    if pcolor = sky [
    set regrowth (regrowth - 1)
    if regrowth <= 0 [
      set pcolor black
      set regrowth 50
    ]
    ]
  ]
end 

to wfm-forage
   ask white-footed-mice [
    rt random 45
    lt random 45
    forward 1

    if pcolor = white [
      set pcolor green
      set wfm-energy (wfm-energy + EV-Opening-White-Footed-Mouse)]

      if pcolor = black [
      set pcolor sky
      set wfm-energy (wfm-energy + EV-Forest-White-Footed-Mouse)]

      if pcolor = sky [
      set wfm-energy (wfm-energy - Cost-of-Moving)]

      if pcolor = green [
      set wfm-energy (wfm-energy - Cost-of-Moving)]

   ]
end 

to jm-forage
   ask jumping-mice [
    rt random 45
    lt random 45
    forward 1

    if pcolor = white [
      set pcolor green
      set jm-energy (jm-energy + EV-Opening-Jumping-Mouse)]

      if pcolor = black [
      set pcolor sky
      set jm-energy (jm-energy + EV-Forest-Jumping-Mouse)]

      if pcolor = sky [
      set jm-energy (jm-energy - Cost-of-Moving)]

      if pcolor = green [
      set jm-energy (jm-energy - Cost-of-Moving)]

   ]
end 

to jm-lifecycle
  ask jumping-mice [
    jm-reproduce
    jm-death]
end 

to wfm-lifecycle
  ask white-footed-mice [
    wfm-reproduce
    wfm-death]
end 

to weasels-lifecycle
  ask weasels [
    eat-wfm
    eat-jm]
end 

to wfm-reproduce
  if wfm-energy > 100 [
  set wfm-energy wfm-energy / 2
  hatch 1
  ]
end 

to wfm-death
  if wfm-energy <= 0 [
  die
  ]
end 

to jm-death
  if jm-energy <= 0 [
    die
  ]
end 

to jm-reproduce
  if jm-energy > 100 [
  set jm-energy jm-energy / 2
  hatch 1
  ]
end 

to weasel-hunt
  ask weasels [
  rt random 30
  lt random 30
  forward 1
  ]
end 

to eat-wfm
   ask weasels [
  if any? (white-footed-mice-here)
    [ask one-of white-footed-mice-here
    [die]  ]
]
end 

to eat-jm
  ask weasels [
  if any? (jumping-mice-here)
    [ask one-of jumping-mice-here
    [die]  ]
]
end 

to drought
  let probdie ceiling count white-footed-mice * Effect-of-drought
  if random-float 1 <= probability-of-drought
     [ask n-of probdie white-footed-mice[
     die]
     ]

  let probdie2 ceiling count jumping-mice * Effect-of-drought
  if random-float 1 <= probability-of-drought
     [ask n-of probdie2 jumping-mice
       [die]
     ]
end 

There is only one version of this model, created over 3 years ago by David Black.

Attached files

File Type Description Last updated
Competitive Exclusion.png preview Preview for 'Competitive Exclusion' over 3 years ago, by David Black Download

This model does not have any ancestors.

This model does not have any descendants.