Sea Crossings (dummy data)
Model was written in NetLogo 6.0
•
Viewed 127 times
•
Downloaded 15 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
breed[persons person] breed[trails trail] globals [ competition-value cost-list ] patches-own [ land.or.sea cost motivation boundary difference times.here ] to setup clear-all create-persons 100 set-default-shape persons "person" set-default-shape trails "dot" set-patch-values ask persons [ setxy random-xcor random-ycor set color red ] reset-ticks end to go if ticks >= 500 [stop] ifelse competition [move-persons-with-competition] [move-persons] remove-persons if count persons < 100 [replace-persons] ask patches [ if count persons-here > 0 [set times.here (times.here + 1)] ] tick end to set-patch-values set cost-list [1 2 3 4 5] ask n-of 5125 patches [set land.or.sea 1] ask patches[ set cost one-of cost-list set motivation motivation.value set pcolor blue ifelse land.or.sea = 1 [set pcolor green] [set pcolor blue] ifelse pycor = max-pycor [set boundary 1] [ifelse pycor = min-pycor [set boundary 1] [ifelse pxcor = max-pxcor [set boundary 1] [ifelse pxcor = min-pxcor [set boundary 1] [set boundary 0]]]] ] end to replace-persons create-persons (100 - (count persons)) set-default-shape persons "person" ask persons [ setxy random-xcor random-ycor set color red ] end to move-persons-with-competition if competition-value < max-persons-per-cell [ ask patches [ set motivation (motivation * motivation.coefficient) set cost (cost * cost.coefficient) set difference (motivation - cost) ask persons-here [ uphill4 difference ] ] ] ask persons[ hatch-trails 1 [set color 16] ] end to move-persons ask patches [ set motivation (motivation * motivation.coefficient) set cost (cost * cost.coefficient) set difference (motivation - cost) ask persons-here [ uphill4 difference ] ] ask persons[ hatch-trails 1 [set color 16] ] end to remove-persons ask persons [ if boundary = 1 [die] ] end to export-results export-interface "environment000.png" end
There are 2 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Sea Crossings (dummy data).png | preview | Preview for 'Sea Crossings (dummy data)' | almost 7 years ago, by Bailey Baumann | Download |
This model does not have any ancestors.
This model does not have any descendants.