Homophily
Model was written in NetLogo 5.2.0
•
Viewed 403 times
•
Downloaded 37 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
extensions[nw] globals[number-homophily] to setup clear-all nw:set-context turtles links create-turtles 10 [ set color one-of [yellow blue violet red] ] ask turtles [ if != myself if color = yellow [create-link-with one-of turtles with [color = yellow]] if color = blue [create-link-with one-of turtles with [color = blue]] if color = violet[create-link-with one-of turtles with [color = violet]] if color = red [create-link-with one-of turtles with [color = red]] ] ;setxy random-xcor random-ycor set-default-shape turtles "circle" ;make-node nobody ;make-node turtle 0 reset-ticks end to go ask links [ set color gray ] ;make-node ;find-partner tick ;if layout? [ layout ] end ;to make-node [old-node] ;crt 1 ; [ ;setxy random-xcor random-ycor ;set color one-of [yellow blue violet red] ;ifelse any? old-node with [[color] of myself][ ;!= nobody[ ; [color] of old-node = [color] of myself[ ;create-link-with old-node ; move-to old-node ;fd 8 ;set number-homophily number-homophily + 1 ;] ;] ;end to-report find-partner report one-of turtles end
There is only one version of this model, created almost 10 years ago by Jiawei Fu.
This model does not have any ancestors.
This model does not have any descendants.