Management of Canis lupus
Model was written in NetLogo 6.0.4
•
Viewed 124 times
•
Downloaded 10 times
•
Run 0 times
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
; "Management Scenarios for the return of Canis Lupus to Lower Saxony " ; 01.03.2019 ; Jonas Boersch ; Jannis Classnitz ; Leuphana Universität Lüneburg ; Module: Interdisciplinary Sustainability Studies, Course: Oekosystemmodellierung ; Prof. Dr.-Ing. Eckhard Bollow, Dr. Carsten Lemmen ; @copyright CC BY-NC-SA 4.0 ;******************************************************************************************************************************* ; Content: ; 1. Globals and Variables ; 2. Setup Procedure ; 2.1 Setup Patches ; 2.2 Setup Turtles ; 2.3 Setup Calender ; 3. Go Procedure ; 3.1 Advance Calender ; 3.2 Define Forest Procedure ; 3.3 Go Turtles Procedure ; 3.4 Management Procedure ; 3.5 Die Crossing Streets Procedure ; 4. Move Turtle Procedure ; 5. Reproduce Procedure ; 6. Eat and Grow Forest Procedure ; 7. Catch Procedure ; 7.1 Problem Wolves ; 7.2 Wooden Fence ; 7.3 Electric Fence ; 7.4 Shepherd Dog ; 8. Hunt Procedure ; 8.1 Kill Wolves ; 8.2 Protect Fields ; 8.3 Protect Settlements ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 1. Globals and Variables ;******************************************************************************************************************************* globals [ days-in-month ; how many days every month has year month day ; set a year, a month and a day doy ; day of the year is shown forest-patches ; define certain patches as forest ] breed [ boars boar ] ; the different breeds are: boars, breed [ deer a-deer ] ; deer, breed [ wolves wolf ] ; wolves, breed [ livestock a-livestock ] ; livestock and breed [ hunters hunter ] ; hunters wolves-own [ threat-level ] ; wolves own a threat level patches-own [ countdown ] ; patches own a countdown ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 2. Setup Procedure ;******************************************************************************************************************************* to setup clear-all setup-patches setup-turtles reset-calendar reset-ticks end ;******************************************************************************************************************************* ; 2.1 Setup Patches ;******************************************************************************************************************************* to setup-patches Import-pcolors "map - Kopie.png" ; import map as patch color ; scale 1:2.000.000 ( 1 patch = 500 m² ) (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) end ;******************************************************************************************************************************* ; 2.2 Setup Turtles ;******************************************************************************************************************************* ; Similar to Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017 to setup-turtles ask n-of num-boars patches with [ pcolor = 56 ] [ sprout-boars 1 ] ; patches with specific color sprout the breeds ask n-of num-deer patches with [ pcolor = 56 ] [ sprout-deer 1 ] ask n-of num-wolves patches with [ pcolor = 56 ] [ sprout-wolves 1 ] ask n-of num-livestock patches with [ pcolor = 46.7 ] [ sprout-livestock 1 ] ask n-of num-hunters patches with [ pcolor = 46.7 ] [ sprout-hunters 1 ] ask boars ; the breed of boars shall be created [ set shape "wildschwein" set color brown set size 10 ] ask deer ; the breed of deer shall be created [ set shape "rotwild" set color red set size 10 ] ask wolves ; the breed of wolves shall be created [ set shape "wolf" set color black set size 10 set threat-level 1 ] ask livestock ; the breed of livestock shall be created [ set shape "farmtier (kuh)" set color white set size 10 ] ask hunters ; the breed of hunters shall be created [ set shape "jäger" set color orange set size 20 ] end ;******************************************************************************************************************************* ; 2.3 Setup Calender ;******************************************************************************************************************************* to reset-calendar ; by pressing the set-up button, ; the calendar shall be reset on set year 2019 ; 01.01.2019 set doy 1 set day doy set month 1 set days-in-month ( list 31 28 31 30 31 30 31 31 30 31 30 31 ) end ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 3. Go Procedure ;******************************************************************************************************************************* ;Similar to Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017 to go tick advance-calender define-forest if not any? turtles [ stop ] ask boars [ go-boars ] ask deer [ go-deer ] ask wolves [ go-wolves ] ask livestock [ go-livestock ] ask hunters [ go-hunters ] ask patches [ grow-forest ] end ;******************************************************************************************************************************* ; 3.1 Advance Calender ;******************************************************************************************************************************* to advance-calender set day day + 1 ; Update the day monitors set doy doy + 1 ; based on the day of year let my-doy sum sublist days-in-month 0 month + 1 ; sum up the days of the months already passed if doy > my-doy - 1 ; jump to the next month and reset the day [ set month month + 1 set day 1 ] if doy > 59 [ set my-doy my-doy + leap-year ] ; in leap years add 1 ; (2020 is the next leap year) if doy > 365 + leap-year ; jump to the next year and reset the day [ set year year + 1 set month 1 set doy 1 set day 1 ] end to-report leap-year if (( year mod 4 ) != 0 ) [ report 0 ] if (( year mod 400 ) = 0 ) [ report 1 ] if (( year mod 100 ) != 0 ) [ report 0 ] report 1 end ;******************************************************************************************************************************* ; 3.2 Define Forest Procedure ;******************************************************************************************************************************* to define-forest set forest-patches patches with [ shade-of? green pcolor ] ; the forest patches shall be those with green color (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) end ;******************************************************************************************************************************* ; 3.3 Go Turtles Procedure ;******************************************************************************************************************************* to go-boars if ( shade-of? green pcolor ) [ eat-forest ] ; if there is forest of green color, then eat it move-turtle 10 ; if not, move up to 10 patches reproduce-boars ; give birth if human-threats [die-crossing-streets] ; if "human-threats" is active, boars & deer might die when crossing streets (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) end to go-deer if ( shade-of? green pcolor ) [ eat-forest ] ; if there is forest of green color, then eat it move-turtle 20 ; if not, move up to 20 patches reproduce-deer ; give birth if human-threats [ die-crossing-streets ] ; if "human-threats" is active, deer might die when crossing streets (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) end to go-livestock reproduce-livestock ; give birth (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) end to go-wolves catch-prey ; wolves catch their prey reproduce-wolves ; give birth if human-threats [ die-crossing-streets ] ; if "human-threats" is active, wolves might die when crossing streets ;******************************************************************************************************************************* ; 3.4 Management Procedure ;******************************************************************************************************************************* if wolf-management = "no-management" ; if "no-management" is active, [catch-prey] ifelse wolf-management = "problem-wolves" ; if "problem-wolves" is active, [ catch-prey1 ] [ catch-prey ] ask wolves with [ threat-level > wolf-tolerance ] [ set color 125 ] ; wolves with a threat level above the tolerance level turn magenta ifelse wolf-management = "wooden-fence" ; if "wooden-fence" is active, [ catch-prey2 ] [catch-prey] ifelse wolf-management = "electric-fence" ; if "electric-fence" is active, [catch-prey3] [catch-prey] ifelse wolf-management = "shepherd-dog" ; if "shepherd-dog" is active [catch-prey4] [catch-prey] if ProtectSettlements ; if "ProtectSettlements" is active, [protect-Settlements] end to go-hunters hunt-prey ; hunters hunt their prey if wolf-management = "problem-wolves" ; if "problem-wolves" is active, [ hunt-wolves ] if wolf-management = "protect-fields" ; if "protect-fields" is active, [protect-fields] if wolf-management = "kill-wolves" ; if "kill-wolves" is active, [kill-wolves] end ;******************************************************************************************************************************* ; 3.5 Die Crossing Streets Procedure ;******************************************************************************************************************************* to die-crossing-streets ; if "human-threats" is active, let chance-to-die random-float 100 ; there is a chance for turtles to die ifelse one-of neighbors = shade-of? blue pcolor ; when the neighboring patch is blue ( a street ) and chance-to-die < 0.026 [ die ] [ fd 2 ] ; in case they survive, the turtles move end ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 4. Move Turtle Procedure ;******************************************************************************************************************************* to move-turtle [ maximum-speed ] ; each turtle has its own maximum speed ; the overall moment is divided into maximum-speed steps repeat maximum-speed ; which are repeated as often as the maximum-speed value [ let speed random-float 1 ; in each of these steps, the turtles move forward max. 1 patch carefully [ face one-of neighbors with [ shade-of? green pcolor ] ; in each step, preferably a forest patch is looked for (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) ] [ rt random 360 ] fd speed ] end ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 5. Reproduce Procedure ;******************************************************************************************************************************* to reproduce-boars ; boar procedure if month = 3 or month = 4 ; boars give birth in march and april [ if random-float 100 < 0.61 ; throw "dice" to see if you will reproduce [ hatch 1 + random 3 ; hatch between 1 and 4 offsprings and move-to one-of patches with [ pcolor = 56 ] ; move to a green forest patch ] ] end to reproduce-deer ; deer procedure if month = 5 or month = 6 ; deer give birth in may and june [ if random-float 100 < 0.58 ; throw "dice" to see if you will reproduce (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) [ hatch 1 + random 1 ; hatch 1 or 2 offsprings and move-to one-of patches with [ pcolor = 56 ] ; move to a green forest patch ] ] end to reproduce-wolves ; wolf procedure if month = 4 or month = 5 ; give birth in april and may [ if random-float 100 < 0.50 ; throw "dice" to see if you will reproduce [ hatch 1 + random 2 [ set threat-level 1 set color black ] ; hatch between 1 and 3 packs, reset threat-level and color move-to one-of patches with [ pcolor = 56 ] ; move to a green forest patch ] ] end to reproduce-livestock ; livestock procedure if random-float 100 < 0.03 ; throw "dice" to see if you will reproduce (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) [ hatch 1 ; hatch offspring and [rt random-float 360 fd 1 ] ; move forward 1 ] end ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 6. Eat and Grow Forest Procedure ;******************************************************************************************************************************* to eat-forest ; boar & deer procedure set pcolor brown ; when it eats forest, the patch turns brown end to grow-forest ; patch procedure if pcolor = brown ; countdown on brown patches In Anlehnung an Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017 [ ifelse countdown <= 0 ; if reach 0, grow some forest [ set pcolor 56 set countdown 14 ; countdown starts by 14 ] [ set countdown countdown - 1 ; every tick the countdown is reduced by 1 ] ] end ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 7. Catch Procedure ;******************************************************************************************************************************* to catch-prey ; wolf procedure let prey min-one-of ( turtles with ; wolve's prey is a random livestock, deer or boar (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) [ breed = livestock or breed = deer or breed = boars ] in-radius 40 ) [ distance myself ] ; in radius of 20 km ifelse prey != nobody ; if there is some prey [ ifelse distance prey > 5 ; in radius > 5, [ face prey ; face it, fd 5 ; move and ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 1 [ask prey [die]][move-turtle random 20] ; kill it in 1% of the cases, otherwise move ] ; This chance was derived from trial runs of the model ] [ move-turtle random 50 ; if there is no prey, move ] end ;******************************************************************************************************************************* ; 7.1 Problem Wolves ;******************************************************************************************************************************* to catch-prey1 ; wolf procedure let prey1 min-one-of ( turtles with ; wolve's prey1 is a random livestock [ breed = livestock ] in-radius 40 ) [ distance myself ] ; in radius of 20 km let prey min-one-of ( turtles with ; wolve's prey is a random deer or boar [ breed = deer or breed = boars ] in-radius 40 ) [ distance myself ] ; in radius of 20 km ifelse prey1 != nobody ; if there is some prey1 [ ifelse distance prey1 > 5 ; in radius > 5, [ face prey1 ; face it, fd 5 ; move and ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 1 [ask prey [die]][move-turtle random 20] ; kill it in 1% of the cases, otherwise move set threat-level threat-level + 1 ; and set threat-level +1 ] ] [ move-turtle random 50 ; if there is no prey, move ] ifelse prey != nobody ; if there is some prey [ ifelse distance prey > 5 ; in radius > 5, [ face prey ; face it, fd 5 ; move and ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 1 [ask prey [die]][move-turtle random 20] ; kill it in 1% of the cases, otherwise move ] ] [ move-turtle random 50 ; if there is no prey, move ] ifelse one-of neighbors = shade-of? red pcolor ; when wolves get near a settlement [ let chance-to-be-seen random-float 100 if chance-to-be-seen < 5 [set threat-level threat-level + 0.5] ] ; if the wolves get seen [ move-turtle random 20 ] ; their threat-level increases by half a level, otherwise they move end to hunt-wolves ; hunter procedure let prey1 min-one-of ( turtles with ; hunters prey1 are wolves [ breed = wolves and color = 125 ; with a threat-level > 10 ] in-radius 40 ) [ distance myself ] ; in radius of 20 km let prey min-one-of ( turtles with ; hunters prey are deer and boar [ breed = deer or breed = boars in-radius 5 ]) [ distance myself ] ; in radius of 2.5 km ifelse prey != nobody ; if there is some, [ let chance-to-catch random-float 100 if chance-to-catch < 0.5 [ask prey [ die ]] ; there is a chance to kill it ] [ right random 50 ; if not, move left random 50 forward 1 ] ifelse prey1 != nobody ; if there is some prey1 [ ifelse distance prey1 > 10 ; in radius > 5, [ face prey1 ; face it fd 10 ; and move ] [ let chance-to-catch random-float 100 if chance-to-catch < 10 [ ask prey1 [ die ]] ; there is a chance to kill it ] ; this chance was derived from the assumption that the hunter kills a single wolf 75 out of 100 times ] ; And was further reduced by a factor of 7.5 since a single wolf turtle represents a pack of wolves [ right random 50 ; if not, move left random 50 forward 1 ] end ;******************************************************************************************************************************* ; 7.2 Wooden Fence ;******************************************************************************************************************************* to catch-prey2 ; wolf procedure let prey1 min-one-of ( turtles with ; prey1 is a-livestock in radius 20 [ breed = livestock ] in-radius 20 ) [ distance myself ] let prey min-one-of ( turtles with ; prey one of the breeds in radius 20 (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) [ breed = deer or breed = boars ] in-radius 20 ) [ distance myself ] ifelse prey != nobody ; if there is some prey (in radius 20): [ ifelse distance prey > 5 ; if the prey is in radius > 5, [ face prey ; face it, move and fd 5 ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 1 [ask prey [die]][move-turtle random 20] ; kill it in 1% of the cases, otherwise move ] ] ; if there is no prey but prey1 (livestock) [ ifelse prey1 != nobody [ ifelse distance prey1 > 5 ; if prey1 is in radius > 5, [ face prey1 ; face it, move and fd 5 ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 0.5 [ask prey1 [die]][move-turtle random 20] ; kill it in 0.5% of the cases, otherwise move ] ; the wooden fence leads to a lower chance-to-catch threshold for livestock only ] [ move-turtle random 50 ; if not, move ] ] end ;******************************************************************************************************************************* ; 7.3 Electric Fence ;******************************************************************************************************************************* to catch-prey3 ; wolf procedure let prey1 min-one-of ( turtles with ; prey1 is a-livestock in radius 30 [ breed = livestock ] in-radius 20 ) [ distance myself ] let prey min-one-of ( turtles with ; prey is one of the breeds in radius 20 [ breed = deer or breed = boars ] in-radius 20 ) [ distance myself ] ifelse prey != nobody ; if there is some prey (in radius 30): (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) [ ifelse distance prey > 5 ; if prey is in radius > 5, [ face prey ; face it, move and fd 5 ] [ let chance-to-catch random-float 100 ifelse chance-to-catch < 1 [ask prey [die]][move-turtle random 20] ; kill it in 1% of the cases, otherwise move ] ] ; if there is no prey but prey1 (livestock) [ ifelse prey1 != nobody [ ifelse distance prey1 > 5 ; if prey1 is in radius > 5, [ face prey1 ; face it, move and fd 5 ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 0.25 [ask prey1 [die]][move-turtle random 20] ; kill it in 0.25% of the cases, otherwise move ] ; the electrical fence leads to a lower chance-to-catch threshold for livestock only ] [ move-turtle random 50 ; if not, move ] ] end ;******************************************************************************************************************************* ; 7.4 Shepherd Dog ;******************************************************************************************************************************* to catch-prey4 ; wolf procedure let prey1 min-one-of ( turtles with ; prey1 is a-livestock in radius 20 [ breed = livestock ] in-radius 20 ) [ distance myself ] let prey min-one-of ( turtles with ; prey one of the breeds in radius 20 [ breed = deer or breed = boars ] in-radius 20 ) [ distance myself ] ifelse prey != nobody ; (Sagolla & Kloeffer, "Woelfe in Niedersachsen", 2017) [ ifelse distance prey > 5 ; if prey is in radius > 5, [ face prey ; face it, move and fd 5 ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 1 [ask prey [die]][move-turtle random 20] ; kill it in 1% of the cases, otherwise move ] ] ; if where is no prey but prey1 (livestock) [ ifelse prey1 != nobody [ ifelse distance prey1 > 5 ; if prey1 is in radius > 5, [ face prey1 ; face it, move and fd 5 ] [let chance-to-catch random-float 100 ifelse chance-to-catch < 0.125 [ask prey1 [die]][move-turtle random 20] ; kill it in 0.125% of the cases, otherwise move ] ; the shepherd dog leads to a lower chance-to-catch threshold for livestock only ] [ move-turtle random 50 ] ; if not, move ] end ;******************************************************************************************************************************* ;******************************************************************************************************************************* ; 8. Hunt Procedure ;******************************************************************************************************************************* to hunt-prey ; hunter procedure let prey min-one-of ( turtles with ; if "kill-wolves" is not active, [ breed = deer or ; the hunters prey are deer or boars breed = boars ] in-radius 5 ) [ distance myself ] ; in radius of 2.5 km ifelse prey != nobody ; if there is some, [ let chance-to-catch random-float 100 if chance-to-catch < 0.5 [ ask prey [ die ]] ; there is a chance to kill it ] [ right random 50 ; if not, move left random 50 forward 1 ] end ;******************************************************************************************************************************* ; 8.1 Kill Wolves ;******************************************************************************************************************************* to kill-wolves ; hunter procedure let prey min-one-of ( turtles with ; if "kill-wolves" is active, [breed = deer or ; hunters prey are deer or breed = boars ] in-radius 5 ) [ distance myself ] ; boars in radius of 2.5 km let prey1 min-one-of ( turtles with [breed = wolves ] in-radius 5 ) [distance myself] ifelse prey != nobody ; if there is some, [ let chance-to-catch random-float 100 if chance-to-catch < 0.5 [ ask prey [ die ]] ; there is a chance to kill it ] [ carefully [ face one-of neighbors with [ shade-of? green pcolor or shade-of? yellow pcolor ] ] [ rt random 360 ] ; if not, move fd 1 ] ifelse prey1 != nobody ; if there are wolves, [ let chance-to-catch random-float 100 if chance-to-catch < 0.5 [ ask prey [ die ]] ; there is a chance to kill it ] [ carefully [ face one-of neighbors with [ shade-of? green pcolor or shade-of? yellow pcolor ] ] [ rt random 360 ] ; if not, move fd 1 ] end ;******************************************************************************************************************************* ; 8.2 Protect Fields ;******************************************************************************************************************************* to protect-fields ; hunter procedure let prey min-one-of ( turtles with ; if "kill-wolves" is active, [breed = deer or ; hunters prey are deer or breed = boars ] in-radius 5 ) [ distance myself ] ; boars in radius of 2.5 km let prey1 min-one-of ( turtles with ; if "protect-fields" is active, [ breed = wolves] in-radius 5 ) [ distance myself ] ; hunters prey are wolves in radius of 2.5 km ifelse prey1 != nobody ; if there is some, [ifelse shade-of? yellow pcolor [ask prey1 [ die ]][ fd 1] ; hunter kills the whole pack ] [ carefully [ face one-of neighbors with [ shade-of? yellow pcolor ; when a hunter is on a field, he will shoot wolves in the proximity ] ] [ rt random 360 ] ; if not, move fd 1 ] ifelse prey != nobody ; if there is some other prey, [ let chance-to-catch random-float 100 if chance-to-catch < 0.5 [ ask prey [ die ]] ; there is a chance to kill it ] [ carefully [ face one-of neighbors with [ shade-of? green pcolor or shade-of? yellow pcolor ] ] [ rt random 360 ] ; if not, move fd 1 ] end ;******************************************************************************************************************************* ; 8.3 Protect Settlements ;******************************************************************************************************************************* to protect-settlements let chance-to-be-shot random-float 100 ; chance-to-be-shot is a random number between 0 and 99 ifelse one-of neighbors = shade-of? red pcolor ; if one of neighbor-patches red (settlement) and the random number is smaller than 0.026 and chance-to-be-shot < 5 [ask wolves [die] ][move-turtle random 1] ; turtles here die, if it is larger, the animal moves away in a random direction end ;******************************************************************************************************************************* ;*******************************************************************************************************************************
There is only one version of this model, created about 5 years ago by Jonas Boersch.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Management of Canis lupus.png | preview | Preview for 'Management of Canis lupus' | about 5 years ago, by Jonas Boersch | Download |
map - Kopie.png | png | A map of Lower Saxony, Germany (required to run the model) | about 5 years ago, by Jonas Boersch | Download |
This model does not have any ancestors.
This model does not have any descendants.