Organizing Model 1

Organizing Model 1 preview image

1 collaborator

Iron_label_brush_2 CJ Castillo (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.2.0 • Viewed 203 times • Downloaded 19 times • Run 0 times
Download the 'Organizing Model 1' modelDownload this modelEmbed this model

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.

Uploaded by When Description Download
CJ Castillo almost 9 years ago This model illustrates conversion of an agent into something. The model assumes that agents are readily convertible. Download this version
CJ Castillo almost 9 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Organizing Model 1.png preview Preview for 'Organizing Model 1' almost 9 years ago, by CJ Castillo Download

This model does not have any ancestors.

This model does not have any descendants.