Organizing Model 1
Model was written in NetLogo 5.2.0
•
Viewed 237 times
•
Downloaded 21 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
;; this is a simple model involving the convertion of one breed to another. This simulation mimics a simple recruitment process. ;; this model assumes that all non-mice are easily convertible. breed [ cats cat ] breed [ mice mouse ] ;; to setup the agents, here is the command. Here, there are two breeds defined: cats and mice. The cats try to catch and convert the mice into cats. to setup clear-all reset-ticks create-mice nummice [ set color white setxy random-xcor random-ycor ] create-cats numcats [ set color red setxy random-xcor random-ycor ] end ;;Here are the procedures. This specifies the actions/interaction between cats and mice. Cats pursue the nearest mouse and convert it. The converts will seek other mice to convert. The process goes on until all mice are converted into cats. to go ask mice [ forward 1 set heading random 360 ] ask cats [ if any? mice [ face one-of mice ] if not any? mice [ stop ] ] ask cats [ forward 1] ask cats [ let current-cat self ask mice with [ distance current-cat < 2 ] [ set breed cats ;; mice is recruited to cats set color red ] ] tick end to plot-agents plot count cats plot count mice end
There are 2 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Organizing Model 1.png | preview | Preview for 'Organizing Model 1' | over 9 years ago, by CJ Castillo | Download |
This model does not have any ancestors.
This model does not have any descendants.