Final
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This is a model simulating a marine ecosystem and let users try several human activities and see the result returned by the model. Details: In my models, there are two main focuses. The first is how would human beings’ behaviors impact on the ecosystem at continental shelf. In this study, I involved in 3 factors in total: building an island on the sea surface, fishing with boats moving around, emit wastes and pollution to the sea. The second is the fishes’ behavior. In this study, I implemented a lot of fishes’ normal habits and its relationship with predators. I observe their moving patterns under several varied different situations.
HOW IT WORKS
Rules For forage fishes: it has the option to form a flock to act and move together which in the real world would help fish for reducing the resistance produced by water and would also help forage fishes to escape from its predators. Besides the flock feature, the fishes can also choose avoid action to detect nearby predators and escape to another direction. Every move would reduce their energy by one and if the possibility is big enough, they can reproduce which would cost them half energy. The hatch number is controlled by the fish-reproduce-percent slider. The fishes can eat seaweed and gain energy. And the energy is also determined by a slider named fish-gain-from-food. For predators: They can chase after the forage fishes for food and if there is no fish nearby but some other predators nearby, they would fight with each other and one of them would die. Predators can eat fishes to gain energy and reproduce at a certain possibility that would lose half of its energy. If the age of predator is over 10 or its energy is less than 5, it would die. Every move would also make predator’s age plus one.
For human-beings: there is an option to decide whether the human would be involved in this ecosystem. If human-involved is false, the system would only have predators and forage fishes which would form a balanced ecosystem. If human-involved is true, the system would have boats moving around and catching predators and fishes. The boats’ speed is higher than fishes and when there is a predator nearby, the boat would prefer catching a predator rather than all the fishes in radius 3. For plankton: Their color is green. Forage fishes are feed on the planktons. And planktons can regrow randomly in a certain amount of time. When they are eaten by the fishes, they would disappear and pcolor would go back to blue.
Activities Drawing an island: The users can turn a patch into color red, which means building an island on the ocean. These parts are not accessible by any kinds of fish or boats. We can use this feature to study how would the size of the island effect all the ecosystem around continental shelf. Emit pollution: The users can turn a patch into color grey, which means make that part of ocean too dirty for plankton to live on. So at the grey patches, plankton would not grow there. However, the ocean has an ability to clean it self. When the water turns back to blue the plankton would regrow again. Fish migrations: The users can turn a patch into color pink, which means it is a place for forage fishes to reproduce. No forage fish can reproduce at plankton or blue. We can draw several sources for fishes and observe their movings.
HOW TO USE IT
The first step to study how will human would affect a system, we need to have the precondition that the whole ecosystem is balanced. So first, we have to set my model to be balanced only with the fish, predators and planktons. This is easy to achieve. For second step, we can try flock? slider or chase? Slider to see whether these natural features would make one side has any advantage. For third step, we can draw island on the screen and see how the size of the island affects the whole ecosystem. For the following steps, we can try draw the source for forage fishes or draw the pollution. Then we can combine these three features to see the impact. For example, we can draw the island surround the reproduce source which makes no forage fishes can reach the source for reproducing and see what is the result. Or we can draw four sources and a straight island cross them. There are a lot of interesting features and phenomena exist in my model.
THINGS TO NOTICE
When we want to circle a piece of island, we have to make sure there are no cracks.
THINGS TO TRY
We can draw the island surround the reproduce source which makes no forage fishes can reach the source for reproducing and see what is the result. Or we can draw four sources and a straight island cross them. Details have been writen in the how to use it.
EXTENDING THE MODEL
May be would add the marine current flow in which would change the distributions of the planktons in the future.
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
breed [fishes fish] breed [predators predator] breed [boats boat] breed [detritus detritu] turtles-own [ age flockmates nearest-neighbor energy] patches-own [plankton polution ] globals [ timenum] to draw-island ;; draw island if mouse-down? ;; reports true or false to indicate whether mouse button is down [ ;; mouse-xcor and mouse-ycor report the position of the mouse -- ;; note that they report the precise position of the mouse, ;; so you might get a decimal number like 12.3, but "patch" ;; automatically rounds to the nearest patch ask patch mouse-xcor mouse-ycor [ set pcolor red ] ] end to draw-source ;;draw the source of reproduce if mouse-down? ;; reports true or false to indicate whether mouse button is down [ ;; mouse-xcor and mouse-ycor report the position of the mouse -- ;; note that they report the precise position of the mouse, ;; so you might get a decimal number like 12.3, but "patch" ;; automatically rounds to the nearest patch ask patch mouse-xcor mouse-ycor [ set pcolor pink ] ] end to draw-polution ;; draw the pollution area if mouse-down? ;; reports true or false to indicate whether mouse button is down [ ;; mouse-xcor and mouse-ycor report the position of the mouse -- ;; note that they report the precise position of the mouse, ;; so you might get a decimal number like 12.3, but "patch" ;; automatically rounds to the nearest patch ask patch mouse-xcor mouse-ycor [ set pcolor grey ] ] end to setup clear-all ask patches [ ;;set up the planktons set pcolor blue set plankton random sea-regrow-time set pcolor one-of [green blue] ] end to create create-fishes number-of-fish [ ;;create certain numbers of forage fishes setxy random-xcor random-ycor set color red set shape "fish" set age random 3 set energy random random (2 * fish-gain-from-food) let x 0 let y 0 ask one-of patches with [pcolor != red] [ set x pxcor set y pycor ] setxy x y ] create-predators number-of-predator [ ;;create certain numbers of predators setxy random-xcor random-ycor set color yellow set shape "shark" set age random 5 set energy random (2 * predator-gain-from-food) set size 1.5 ;; increase their size so they are a little easier to see let x 0 let y 0 ask one-of patches with [pcolor != red] [ set x pxcor set y pycor ] setxy x y ] if human-involoved? ;;if human being involved, create certain numbers of boats [ create-boats boats-number [ let x 0 let y 0 ask one-of patches with [pcolor != red] [ set x pxcor set y pycor ] setxy x y set color white set shape "boat" set size 2 ]] reset-ticks end to go if not any? turtles [ stop ] ask fishes [ ifelse flock? [ ;; check if the forage fishes would go in the pattern as a flock flock avoid ;;forage fishes would escape if there is any predators around ; move ; fd 1 ; set age age + 1 set energy energy - 1 ] [ avoid ;move ; set age age + 1 set energy energy - 1 ] eat-plankton ;;eat food and gain energy check-fish-dead ;;check if the forage is dead or not fish-reproduce ;;fish reproduce ] ask predators [ ;; ask predators to eat forage fishes and gain energy eat-fish set energy energy - 1 check-if-dead set age age + 1 predator-reproduce ;;predator reproduce ] if human-involoved? [ ask boats [ move fishing ;;human go fishing ] ] regrow-plankton ;; regrow the plankton tick my-update-plots end to flock ;; turtle procedure find-flockmates if any? flockmates [ find-nearest-neighbor ifelse distance nearest-neighbor < 0.75 [ separate ] [ align cohere ] ] end to find-flockmates ;; turtle procedure set flockmates other turtles in-radius 3 end to find-nearest-neighbor ;; turtle procedure set nearest-neighbor min-one-of flockmates [distance myself] end to separate ;; turtle procedure turn-away ([heading] of nearest-neighbor) 3.50 end to align ;; turtle procedure turn-towards average-flockmate-heading 5 end to cohere ;; turtle procedure turn-towards average-heading-towards-flockmates 5.75 end to turn-towards [new-heading max-turn] ;; turtle procedure turn-at-most (subtract-headings new-heading heading) max-turn end to turn-away [new-heading max-turn] ;; turtle procedure turn-at-most (subtract-headings heading new-heading) max-turn end to turn-at-most [turn max-turn] ;; turtle procedure ifelse abs turn > max-turn [ ifelse turn > 0 [ rt max-turn ] [ lt max-turn ] ] [ rt turn ] end to-report average-flockmate-heading ;; turtle procedure ;; We can't just average the heading variables here. ;; For example, the average of 1 and 359 should be 0, ;; not 180. So we have to use trigonometry. let x-component sum [dx] of flockmates let y-component sum [dy] of flockmates ifelse x-component = 0 and y-component = 0 [ report heading ] [ report atan x-component y-component ] end to-report average-heading-towards-flockmates ;; turtle procedure ;; "towards myself" gives us the heading from the other turtle ;; to me, but we want the heading from me to the other turtle, ;; so we add 180 let x-component mean [sin (towards myself + 180)] of flockmates let y-component mean [cos (towards myself + 180)] of flockmates ifelse x-component = 0 and y-component = 0 [ report heading ] [ report atan x-component y-component ] end to avoid ;; android procedure let candidates patches in-radius 1 with [ not any? predators ] ;;if there is any predators around ifelse any? candidates [ face one-of candidates ] [ let wall? false ;; check if there are walls ahead ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 ;;if there are walls between walls between predators and fishes, random move move ] [ rt (random 3) * 90 ask patch-ahead 1[ ;;else random pick a direction and escape if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ avoid ] [forward 1 ]]] ;;if there are no predators around, move. end to chase ;;let predators chase after forage fishes for food ifelse any? fishes in-radius 2 [ let candidates one-of fishes in-radius 2 let wall? false ;;if there are forage fishes nearby ask patch-ahead 1[ if(pcolor = red) [ set wall? true ;;check if there are walls between them ] ] ifelse (wall?) [ rt random 360 ;;if there are walls, random move move ] [ face candidates ;;if there are no walls, face the forage fish and move set energy energy - 1 fd 1 ] ] [ if random 100 < predator-fight-percent ;;if there are no forage fishes around, they might fight for their space [fight ] ] end to polution-on ; ifelse ticks != nobody ; [set timenum ticks] ;[set timenum 0] set timenum ticks let polution-factor random 10 ask patches with [pcolor = grey] [ set polution polution-factor ] end to self-restore ;;self restore the pollution emitted into the ocean clean tick end to clean ;;check if it has passed enough time to let ocean clean the pollution let now ticks if now = timenum + 3000 [ ask patches with [pcolor = grey] [set pcolor blue]] end to fight ;; predators fight each other when there are not enough food around for their place ifelse any? predators in-radius 1 [let candidates one-of predators in-radius 1 set energy energy - 4 face candidates let walls patches in-radius 1 with [pcolor = red] ifelse any? walls [ move] [forward 1 ] ask candidates [ die ] ;;one of the predators would die in this fight and the other one would loose a lot of energy also ] [ move set energy energy - 2] end to eat-plankton ;;forage fishes eat plankton if ( pcolor = green) [ set pcolor blue set energy energy + fish-gain-from-food ] end to eat-fish ;;predators eat forage fishes ifelse any? fishes in-radius 1 [ ask fishes in-radius 1 [ die ] set energy energy + predator-gain-from-food ] [ if chase? ;;if there are no food around, look further and chase [chase]] end to fishing ;;human go fishing if random 100 < 70 [ ifelse prefer-big? [ ;;if human are prefer fishing the predators, they would catch one predator rather than all the nearby fishes ifelse any? predators-here [ let target one-of predators ask target [ die ]] [ ask fishes in-radius 3 [ die ] ] ] [ ask fishes in-radius 2 [ die] ]] end to fish-reproduce ifelse produce-source? ;;let fish reproduce. If there required a reproduce source, make the forage fishes can only reproduce at certain place [ let location false ;;so every time fish want to reproduce, they have to move towards those sources ask patch-here[ if pcolor = pink ;;and hatch their childeren out side the walls [ set location true ]] ifelse location != false [ if random 100 < fish-reproduce-percent [ set energy (energy / 2) move move hatch fish-hatch-number [ hatch 1 [ rt random-float 360 let wall? false ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 move ] [ fd 1]]] ]] [ trace-back ]] ;;the moving towards sources procedure [ if random 100 < fish-reproduce-percent [ ;;otherwise, just normal reproduce. Can happen at any place set energy (energy / 2) hatch fish-hatch-number [ hatch 1 [ rt random-float 360 let wall? false ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 move ] [forward 1 ] ] ] ] ] end to trace-back let x 0 ;;find the way back to the sources and reproduce let y 0 let candidates one-of patches with [pcolor = pink] if candidates != nobody [ ask one-of patches with [pcolor = pink] [ set x pxcor set y pycor ] facexy x y let wall? false ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 ;;if there are walls on them way, they would try to find another path move ] [ fd 1]] end to predator-reproduce ;;predators' reproduce, the same with the normal forage fishes' reproduce if random 100 < predator-reproduce-percent and energy > 60[ set energy (energy / 2) hatch 1 [ rt random-float 360 let wall? false ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 move ] [forward 1 ] ] ] end to check-if-dead ;;check whether the predators are dead if energy < 5 and age > 10[ if random 100 < 62 [ die ;ask detritus [hatch 2] ] ] end to check-fish-dead ;; check whether the forage fishes are dead if energy < 1 [ die ] end to regrow-plankton ;;regrow the planktons after certain amount of time and possibilities ask patches with [ pcolor = blue][ if random 100 < sea-regrow-time [ set pcolor green set plankton sea-regrow-time]] ask patches with [pcolor = green] [set plankton plankton - 1] end to my-update-plots set-current-plot-pen "fish" plot count fishes set-current-plot-pen "shark" plot count predators ;; scaling factor so plot looks nice set-current-plot-pen "plankton" plot sum [plankton] of patches / 30 ;; scaling factor so plot looks nice end end to boat-move ;;let boats moving around without hitting the walls rt random 360 let wall? false ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 move ] [forward 1 ] end to move ;;let turtles moving without hitting the walls rt random 360 let wall? false ask patch-ahead 1[ if(pcolor = red) [ set wall? true ] ] ifelse (wall?) [ rt random 360 move ] [forward 1 ] end
There is only one version of this model, created over 12 years ago by Yun Zhou.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Additional model.nlogo | extension | addition model | over 12 years ago, by Yun Zhou | Download |
EECS 472 Final Project Progress Report.pdf | process report1 | over 12 years ago, by Yun Zhou | Download | |
EECS 472 Final Project Progress Report2.pdf | process report2 | over 12 years ago, by Yun Zhou | Download | |
EECS 472 Final Project Progress Report3.pdf | process report3 | over 12 years ago, by Yun Zhou | Download | |
EECS 472 Final Project Progress Report4.pdf | process report4 | over 12 years ago, by Yun Zhou | Download | |
Final Paper.pdf | final paper | over 12 years ago, by Yun Zhou | Download | |
Final.png | preview | Preview for 'Final' | over 12 years ago, by Yun Zhou | Download |
HubNet.nlogo | extension | hubnet | over 12 years ago, by Yun Zhou | Download |
present.pptx | powerpoint | present slides | over 12 years ago, by Yun Zhou | Download |
User Guide.pdf | user guide | over 12 years ago, by Yun Zhou | Download |
This model does not have any ancestors.
This model does not have any descendants.