# Updated Estimating Stream Diversity

Model was written in NetLogo 5.0
•
Viewed 45 times
•
Downloaded 2 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

breed [seine seines] breed [critter critters] globals [time StTime catchem s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 sTot] to startup setup end to setup ;; (for this model to work with NetLogo's new plotting features, ;; __clear-all-and-reset-ticks should be replaced with clear-all at ;; the beginning of your setup procedure and reset-ticks at the end ;; of the procedure.) clear-all reset-ticks setup-patches ;import-pcolors "streampic4.jpg" set catchem 0 end to setup-patches ask patches [ set pcolor blue if pycor < 25 [set pcolor black] if pycor < 23 and pycor > 2 [set pcolor blue + 2] if pycor < 23 and pxcor < 11 [set pcolor black] if pycor < 23 and pxcor > 88 [set pcolor black] if pycor < 23 and (pxcor = 9 or pxcor = 10) [set pcolor black] if pycor < 23 and (pxcor = 19 or pxcor = 20) [set pcolor black] if pycor < 23 and (pxcor = 29 or pxcor = 30) [set pcolor black] if pycor < 23 and (pxcor = 39 or pxcor = 40) [set pcolor black] if pycor < 23 and (pxcor = 49 or pxcor = 50) [set pcolor black] if pycor < 23 and (pxcor = 59 or pxcor = 60) [set pcolor black] if pycor < 23 and (pxcor = 69 or pxcor = 70) [set pcolor black] if pycor < 23 and (pxcor = 79 or pxcor = 80) [set pcolor black] if pycor < 23 and (pxcor = 89 or pxcor = 90) [set pcolor black] if pycor <= 14 and pycor >= 11 [set pcolor black] ] end to go init-critters move-critters update if catchem = 1 [do-plots] if sttime = 1 [set time time + .1] if time > sampling-time [close] tick end to init-critters let x random 100 if random 100 < 5 [ create-critter 1 [ set size 3 set xcor 100 set ycor 45 + random 10 - random 10 if Pollution = "None" [ if x <= 10 [set shape "caddisfly"] if x > 10 and x <= 15 [set shape "mayfly"] if x > 15 and x <= 25 [set shape "stonefly"] if x > 25 and x <= 30 [set shape "rifflebeetle"] if x > 30 and x <= 35 [set shape "waterpenny"] if x > 35 and x <= 40 [set shape "gilledsnail"] if x > 40 and x <= 45 [set shape "dobsonfly"] if x > 45 and x <= 50 [set shape "cranefly"] if x > 50 and x <= 55 [set shape "dragonfly"] if x > 55 and x <= 60 [set shape "crawdad"] if x > 60 and x <= 65 [set shape "sowbug"] if x > 65 and x <= 70 [set shape "worm"] if x > 70 and x <= 75 [set shape "blackfly"] if x > 75 and x <= 80 [set shape "midge"] if x > 80 and x <= 85 [set shape "leech"] if x > 85 [set shape "lungedsnail"] ] if Pollution = "Moderate" [ if x <= 0 [set shape "caddisfly"] if x > 0 and x <= 2 [set shape "mayfly"] if x > 2 and x <= 4 [set shape "stonefly"] if x > 4 and x <= 6 [set shape "rifflebeetle"] if x > 6 and x <= 8 [set shape "waterpenny"] if x > 8 and x <= 10 [set shape "gilledsnail"] if x > 10 and x <= 15 [set shape "dobsonfly"] if x > 15 and x <= 22 [set shape "cranefly"] if x > 22 and x <= 32 [set shape "dragonfly"] if x > 32 and x <= 50 [set shape "crawdad"] if x > 50 and x <= 60 [set shape "sowbug"] if x > 60 and x <= 70 [set shape "worm"] if x > 70 and x <= 75 [set shape "blackfly"] if x > 75 and x <= 80 [set shape "midge"] if x > 80 and x <= 85 [set shape "leech"] if x > 85 [set shape "lungedsnail"] ] if Pollution = "Severe" [ if x <= 0 [set shape "caddisfly"] if x > 0 and x <= 0 [set shape "mayfly"] if x > 0 and x <= 0 [set shape "stonefly"] if x > 0 and x <= 0 [set shape "rifflebeetle"] if x > 0 and x <= 0 [set shape "waterpenny"] if x > 0 and x <= 0 [set shape "gilledsnail"] if x > 0 and x <= 3 [set shape "dobsonfly"] if x > 3 and x <= 6 [set shape "cranefly"] if x > 6 and x <= 9 [set shape "dragonfly"] if x > 9 and x <= 13 [set shape "crawdad"] if x > 13 and x <= 20 [set shape "sowbug"] if x > 20 and x <= 60 [set shape "worm"] if x > 60 and x <= 75 [set shape "blackfly"] if x > 75 and x <= 80 [set shape "midge"] if x > 80 and x <= 85 [set shape "leech"] if x > 85 [set shape "lungedsnail"] ] ] ] end to move-critters ask critter [ ifelse [pcolor = black] of patch-ahead 1 [ set heading heading + 260 - random 20 fd .2 if ycor > 24 [set xcor xcor - .5] ] [ set heading heading + random 20 - random 20 fd .2 if ycor > 24 [set xcor xcor - .5] ] if xcor < 1 [die] if catchem = 1 and xcor < 50 and xcor > 48 and ycor < 48 and ycor > 34 [ if shape = "caddisfly" [setxy 15 19] if shape = "mayfly" [setxy 25 19] if shape = "stonefly" [setxy 35 19] if shape = "rifflebeetle" [setxy 45 19] if shape = "waterpenny" [setxy 55 19] if shape = "gilledsnail" [setxy 65 19] if shape = "dobsonfly" [setxy 75 19] if shape = "cranefly" [setxy 85 19] if shape = "dragonfly" [setxy 15 9] if shape = "crawdad" [setxy 25 9] if shape = "sowbug" [setxy 35 9] if shape = "worm" [setxy 45 9] if shape = "blackfly" [setxy 55 9] if shape = "midge" [setxy 65 9] if shape = "leech" [setxy 75 9] if shape = "lungedsnail" [setxy 85 9] ] ] end to update ifelse count critter with [shape = "caddisfly" and ycor < 24] > 0 [set s1 1] [set s1 0] ifelse count critter with [shape = "mayfly" and ycor < 24] > 0 [set s2 1] [set s2 0] ifelse count critter with [shape = "stonefly" and ycor < 24] > 0 [set s3 1] [set s3 0] ifelse count critter with [shape = "rifflebeetle" and ycor < 24] > 0 [set s4 1] [set s4 0] ifelse count critter with [shape = "waterpenny" and ycor < 24] > 0 [set s5 1] [set s5 0] ifelse count critter with [shape = "gilledsnail" and ycor < 24] > 0 [set s6 1] [set s6 0] ifelse count critter with [shape = "dobsonfly" and ycor < 24] > 0 [set s7 1] [set s7 0] ifelse count critter with [shape = "cranefly" and ycor < 24] > 0 [set s8 1] [set s8 0] ifelse count critter with [shape = "dragonfly" and ycor < 24] > 0 [set s9 1] [set s9 0] ifelse count critter with [shape = "crawdad" and ycor < 24] > 0 [set s10 1] [set s10 0] ifelse count critter with [shape = "sowbug" and ycor < 24] > 0 [set s11 1] [set s11 0] ifelse count critter with [shape = "worm" and ycor < 24] > 0 [set s12 1] [set s12 0] ifelse count critter with [shape = "blackfly" and ycor < 24] > 0 [set s13 1] [set s13 0] ifelse count critter with [shape = "midge" and ycor < 24] > 0 [set s14 1] [set s14 0] ifelse count critter with [shape = "leech" and ycor < 24] > 0 [set s15 1] [set s15 0] ifelse count critter with [shape = "lungedsnail" and ycor < 24] > 0 [set s16 1] [set s16 0] set sTot s1 + S2 + s3 + s4 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + s15 + s16 end to open ask seine [die] create-seine 1 [ set shape "seine" set size 15 set xcor 50 set ycor 40 ] set catchem 1 set sttime 1 end to Close ask Seine [die] set catchem 0 set sttime 0 end to release plot-pen-up ask critter [ if ycor < 24 [setxy 40 45]] set time 0 set stot 0 do-plots plot-pen-down end to do-plots set-current-plot "Cumulative Species" set-current-plot-pen "Total" plotxy time sTot end

There is only one version of this model, created 8 months ago by Bella Fassett.

## Attached files

File | Type | Description | Last updated | |
---|---|---|---|---|

Updated Estimating Stream Diversity.png | preview | Preview for 'Updated Estimating Stream Diversity' | 8 months ago, by Bella Fassett | Download |

This model does not have any ancestors.

This model does not have any descendants.