Two foresters GERMAN

Two foresters GERMAN preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Default-person Susan Hanisch (Author)

Tags

social dilemma 

Tagged by Susan Hanisch almost 3 years ago

sustainability 

Tagged by Susan Hanisch almost 3 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 190 times • Downloaded 17 times • Run 0 times
Download the 'Two foresters GERMAN' 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

breed [trees tree]
breed [farmers farmer]
breed [fences fence]

farmers-own [
  amount
  harvest
  wealth
]

trees-own [height]

globals [
  pasture1
  pasture2
  farmers1
  farmers2
 ]

;;;;;;;;;;;;;;;;;;;;;;
;;;Setup Procedures;;;
;;;;;;;;;;;;;;;;;;;;;;

to setup
  clear-all

  setup-pastures
  setup-trees
  if Privatforst? [setup-fence]
  setup-farmers

  reset-ticks
end 

to setup-pastures
  ask patches [set pcolor brown + 2]
  set pasture1 patch-set patches with [pxcor < 5]
  set pasture2 patch-set patches with [pxcor >= 5]
end 

to setup-trees
  ask patches [
    sprout-trees 1 [
    set shape "tree"
    set color green - 2
    set height Max-Baumhöhe
    set size ( height / 100 )
  ]]
end 

to setup-fence
  ask patches with [ pxcor = 4 ] [
    sprout-fences 1 [
    set shape "thick line"
    set color grey
    set xcor 4.5
      ifelse pycor  < 4
      [facexy 4.5 5 ]
      [facexy 4.5 0 ]
  ]]
end 

to setup-farmers
  ask one-of pasture1
    [sprout-farmers  1 [
      set shape "person logger"
      set color green
      set size 1.2 ] ]

  ask one-of pasture2
    [sprout-farmers 1 [
      set shape "person logger"
      set color red
      set size 1.2] ]

  set farmers1 turtle-set farmers-on pasture1
  set farmers2 turtle-set farmers-on pasture2
end 


;;;;;;;;;;;;;;;;;;;;;;;;
;;;Runtime Procedures;;;
;;;;;;;;;;;;;;;;;;;;;;;;

to go

  ifelse Privatforst?
   [setup-fence]
   [ask fences [die]]

  ask farmers1 [set amount Anteil-abholzen1]
  ask farmers2 [set amount Anteil-abholzen2]

  cut-trees

  ask trees [ regrow]

  tick
end 

to cut-trees
  ifelse Privatforst?
  [harvest-private]
  [harvest-commons]

  ask farmers [set wealth wealth + harvest]
end 

to harvest-private
   ask farmers1 [
    if member? patch-here pasture1 = false [ move-to one-of pasture1]
    let trees1 trees-on pasture1
    let harvest-tree max-one-of (trees1 in-radius 1) [height]
    move-to harvest-tree
    set harvest (  [height] of harvest-tree  * amount / 100)
    ask  harvest-tree [set height (height - (height * [amount ] of myself / 100))]
  ]

  ask farmers2 [
    if member? patch-here pasture2 = false [ move-to one-of pasture2]
    let trees2 trees-on pasture2
    let harvest-tree max-one-of (trees2 in-radius 1) [height]
    move-to harvest-tree
    set harvest (  [height] of harvest-tree  * amount / 100)
    ask  harvest-tree [set height (height - (height * [amount ] of myself / 100))]
  ]
end 

to harvest-commons
  ask farmers [
    let harvest-tree max-one-of (trees in-radius 2) [height]
     move-to harvest-tree
     set harvest (  [height] of harvest-tree  * ( amount / 100))
     ask  harvest-tree [set height (height - (height * [amount ] of myself / 100))]
  ]
end 

to regrow ;; tree
  ifelse height > 0
 [ set height  (height + ((Wachstumsrate * height) * (1 - (height / ( Max-Baumhöhe)  ))))
   ]
  [set height 0.1]
  set size height / 100
end 

There is only one version of this model, created almost 3 years ago by Susan Hanisch.

Attached files

File Type Description Last updated
Two foresters GERMAN.png preview Preview for 'Two foresters GERMAN' almost 3 years ago, by Susan Hanisch Download

This model does not have any ancestors.

This model does not have any descendants.