Forest Dynamic Model - Bell (2000)

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 35 times • Downloaded 0 times • Run 0 times
Download the 'Forest Dynamic Model - Bell (2000)' 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

extensions [table csv]
globals [meta-sp extinct-species n-speciation spi local-s K1 i1 K2 i2 hist-frq-local rel-hist-frq-local local-richness local-richness-counts count-dead-trees immigrant-trees count-new-trees n crowding conspecifics di-locx di-locy neighbor-patch JL1]
breed [meta-trees meta-tree]
breed [trees tree]
meta-trees-own [species]
trees-own [species h]
patches-own [occupied]
circles-own []
breed [circles a-circle]

to setup2
  clear-all
  set meta-sp 0
  set JMS (w1 + 1) * (w1 + 1)
  resize-world 0 (w1 + w2 + 20) 0 (w1 + w2 + 20)
  ;set hist-frq-meta sort-by > map count table:values table:group-agents meta-trees [ meta-species ]
  ;set rel-hist-frq-meta map [ i -> i / JM ] hist-frq-meta
  set extinct-species 0
  set n-speciation 0
  set JL initial-local-richness * Ni
  set K (w2 + 1) * (w2 + 1)
  set w2 w2
  set n 0
  set di-locx 0
  set di-locy max-pycor
  ask patches with [pycor <= max-pycor AND pycor >= w1 + 20 AND pxcor >= 0 AND pxcor <= w2] [
    set pcolor gray
    set occupied 0 ]
  species-generator-1
  species-generator-4
  set hist-frq-local sort-by > map count table:values table:group-agents turtles with [ycor >= w1 + 20] [species]
  set rel-hist-frq-local map [ i -> i / JL ] hist-frq-local
  set local-richness local-s
  set count-dead-trees 0
  set immigrant-trees 0
  set count-new-trees 0
  create-channel
  reset-ticks
end 

to species-generator-1
  set k1 -1
  while [k1 < w1 ] [
    set k1 k1 + 1
    set i1 -1
    while [i1 < w1 ] [
      set i1 i1 + 1
      create-meta-trees 1 [
        let random-patch one-of patches with [pycor <= w1 AND pycor >= 0 AND pxcor >= 0 AND pxcor <= w1 AND occupied = 0]
        setxy [pxcor] of random-patch [pycor] of random-patch
        set shape "circle"
        set size 1
        set species (meta-sp + 1)
        set meta-sp meta-sp + 1
        set color species
        ask patch-here [set occupied 1]
      ]
    ]
  ]
end 

to species-generator-4
  set k2 1
  while [k2 <= initial-local-richness] [
    set k2 k2 + 1
    set i2 max-pxcor + 1
    set local-s local-s + 1
    repeat Ni [
      let random-patch one-of patches with [pycor <= max-pycor AND pycor >= w1 + 20 AND pxcor >= 0 AND pxcor <= w2 AND occupied = 0]
      create-trees 1 [
        set i2 i2 - 1
        set shape "circle"
        set size 1
        set species local-s
        setxy [pxcor] of random-patch [pycor] of random-patch
        set color local-s
        ask patch-here [set occupied 1]
        ]
      ]
    ]
end 

to go2
  test-capacity
  death-rates
  birth-rates
  immigration
  set JL1 count turtles-on patches with [pycor <= max-pycor AND pycor >= w1 + 20 AND pxcor >= 0 AND pxcor <= w2]
  set hist-frq-local sort-by > map count table:values table:group-agents turtles with [pycor > w1 + 20] [ species ]
  set rel-hist-frq-local map [ i -> i / JL1 ] hist-frq-local
  set local-richness-counts map count table:values table:group-agents turtles with [pycor >= w1 + 20] [species ]
  set local-richness length local-richness-counts
  update-plots
  tick
end 

to immigration
  let random-number3 random-float 1
  if (immigration-rate > random-number3) [
      replace-previous-immigrant
      move-immigrant
      immigration-through-channel
    ask one-of meta-trees [
      hatch 1
      let random-patch one-of patches with [pycor <= max-pycor AND pycor >= w1 + 20 AND pxcor >= 0 AND pxcor <= w2 AND occupied = 0]
      setxy [pxcor] of random-patch [pycor] of random-patch
      ask patch-here [set occupied 1]
    ]
    set immigrant-trees immigrant-trees + 1
  ]
end 

to birth-rates
 let random-number1 random-float 1
    if (b > random-number1) [
      set count-new-trees count-new-trees + 1
    ask one-of turtles with [ycor >= w1 + 20] [
        hatch 1
        let random-patch one-of patches with [pycor <= max-pycor AND pycor >= w1 + 20 AND pxcor >= 0 AND pxcor <= w2 AND occupied = 0]
        setxy [pxcor] of random-patch [pycor] of random-patch
        ask patch-here [set occupied 1]
        ]
      ]
end 

to death-rates
 let random-number2 random-float 1
  if (d > random-number2) [
    ask one-of turtles with [ycor >= w1 + 20] [
      set di-locx xcor
      set di-locy ycor
      die]
    set count-dead-trees count-dead-trees + 1
  ]
end 

to create-channel
  ask patches [
    if (pxcor > w2 / 2 AND pxcor < ((w2 / 2) + 2) AND pycor > w1 AND pycor < w1 + 20) [
      set pcolor gray
    ]
  ]
end 

to immigration-through-channel
  create-circles 1 [
    set color ticks
    set heading 0
    set size 1
    setxy ((w2 + 2) / 2) (w1 + 1)
   ]
end 

to move-immigrant
  ask circles [ fd 4]
end 

to replace-previous-immigrant
  ask circles with [ycor > (w1 + 13) ] [die]
end 

to update-plot2
set-current-plot "Species Abundance Distribution Local Community"
set n 1
while [n <= meta-sp] [
create-temporary-plot-pen (word n)
set-current-plot-pen (word n)
set-plot-pen-color 5 * n + 4
plotxy ticks count trees with [ycor >= w1 + 20 AND species = n]
set n n + 1
plot-pen-down
]
end 

to test-capacity
  if (count turtles with [ycor >= w1 + 20] > K - 5) [
    ask one-of turtles with [ycor >= w1 + 20] [die]
    ]
  ask patches [
    if (count turtles-here > 0) [
      set occupied 1
    ]
    if (count turtles-here = 0) [
      set occupied 0
    ]
  ]
end 

; Copyright 2023e Ruwan Punchi-Manage.
; See Info tab for full copyright and license.

There is only one version of this model, created 5 months ago by Ruwan Punchi-Manage.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.