last one
Model was written in NetLogo 6.4.0
•
Viewed 5 times
•
Downloaded 0 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ plastic-speed turtle-speed ] breed [sea-turtles sea-turtle] breed [plastics plastic] breed [foods food] sea-turtles-own [ body-condition plastic-eaten plastic-mass-ingested food-eaten speed scl ; straight carapace length in cm ] plastics-own [ mass ] to setup clear-all set plastic-speed 0.02 set turtle-speed (1.4 / 3.6) set plastic-ingestion-chance 0.3 ; you can adjust this set food-ingestion-chance 0.6 ; you can adjust this ask patches [ set pcolor sky ] ; light blue background create-sea-turtles 100 [ set shape "turtle" set color green set size 2 set body-condition "excellent" set plastic-eaten 0 set plastic-mass-ingested 0 set food-eaten 0 set speed turtle-speed set scl random-float 50 + 30 ; SCL range 30–80 cm setxy random-xcor random-ycor ] create-plastics 100 [ set shape "circle" set size 0.5 set color pink set mass random-float 69 + 1 ; mass from 1 to 70g setxy random-xcor random-ycor ] create-foods 50 [ set shape "dot" set size 0.4 set color green + 2 setxy random-xcor random-ycor ] reset-ticks end to go add-plastics add-foods ask sea-turtles [ forage avoid-collisions eat-plastic eat-food update-condition ] tick end to add-plastics if count plastics < 200 [ create-plastics 2 [ set shape "circle" set size 0.5 set color pink set mass random-float 69 + 1 setxy random-xcor random-ycor ] ] end to add-foods if count foods < 100 [ create-foods 1 [ set shape "dot" set size 0.5 set color grey + 2 setxy random-xcor random-ycor ] ] end to avoid-collisions let nearby-turtle one-of other turtles in-radius 1.5 if nearby-turtle != nobody [ right random 180 forward 0.5 ] end to update-health-distribution set-current-plot "Turtle Health Distribution" clear-plot let conditions ["excellent" "good" "fair" "poor" "dead"] foreach conditions [ condition -> set-current-plot-pen condition plot count sea-turtles with [body-condition = condition] ] end to eat-plastic let target one-of plastics with [distance myself < 1] if target != nobody and random-float 1 < plastic-ingestion-chance [ set plastic-eaten plastic-eaten + 1 set plastic-mass-ingested plastic-mass-ingested + [mass] of target ask target [ die ] ] end to eat-food let target one-of foods with [distance myself < 1] if target != nobody and random-float 1 < food-ingestion-chance [ set food-eaten food-eaten + 1 ask target [ die ] ] end to forage let decision random-float 1 ; Decide whether to search for food or plastic if decision < food-ingestion-chance [ let target one-of foods in-radius 10 if target != nobody [ face target fd speed * 0.2 ] if target = nobody [ rt random 360 fd speed * 0.1 ] ] if decision >= food-ingestion-chance [ let target one-of plastics in-radius 10 if target != nobody [ face target fd speed * 0.2 ] if target = nobody [ rt random 360 fd speed * 0.1 ] ] end to update-condition let plastic-per-scl plastic-mass-ingested / scl ; Check for body condition if plastic-per-scl <= 0.0718 [ set body-condition "excellent" set color green set speed turtle-speed ] if plastic-per-scl > 0.0718 and plastic-per-scl <= 0.1460 [ set body-condition "good" set color violet set speed turtle-speed * 0.75 ] if plastic-per-scl > 0.1460 and plastic-per-scl <= 0.2282 [ set body-condition "fair" set color yellow set speed turtle-speed * 0.5 ] if plastic-per-scl > 0.2282 and plastic-per-scl <= 0.30 [ set body-condition "poor" set color red set speed turtle-speed * 0.25 ] if plastic-per-scl > 0.30 [ set body-condition "dead" set color black ; Turtle dies die ] end
There is only one version of this model, created 19 days ago by Evelyn Rivera.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
last one.png | preview | Preview for 'last one' | 19 days ago, by Evelyn Rivera | Download |
This model does not have any ancestors.
This model does not have any descendants.