globals [infinity clustering-coefficient informationlist ] breed[sub1 turtle1] ;; the first subgroup breed[sub2 turtle2] ;; the second subgroup breed[events event] turtles-own [ information self-identity safety behavior behavior0 new distance-from-other-turtles utility degree node-cc neighborhood] ;; values and variables owned by turtles links-own [information2 information3 old] ;; used as indicator for comparison to setup clear-all setup-nodes setup-spatially-clustered-network set infinity 99999 find-path-lengths calculate-utility calculate-cc setup-informationlist ask links [ set color white ] ask turtles[ if behavior < 0 [set behavior 0 - behavior] set behavior0 behavior] reset-ticks end to find-path-lengths ;; reset the distance list ask turtles [ set distance-from-other-turtles [] ] let i 0 let j 0 let k 0 let node1 one-of turtles let node2 one-of turtles let node-count count turtles ;; initialize the distance lists while [i < node-count] [ set j 0 while [j < node-count] [ set node1 turtle i set node2 turtle j ;; zero from a node to itself ifelse i = j [ ask node1 [ set distance-from-other-turtles lput 0 distance-from-other-turtles ] ] [ ;; 1 from a node to it's neighbor ifelse [ in-link-neighbor? node1 or out-link-neighbor? node1] of node2 [ ask node1 [ set distance-from-other-turtles lput 1 distance-from-other-turtles ] ] ;; infinite to everyone else [ ask node1 [ set distance-from-other-turtles lput infinity distance-from-other-turtles ] ] ] set j j + 1 ] set i i + 1 ] set i 0 set j 0 let dummy 0 while [k < node-count] [ set i 0 while [i < node-count] [ set j 0 while [j < node-count] [ ;; alternate path length through kth node set dummy ( (item k [distance-from-other-turtles] of turtle i) + (item j [distance-from-other-turtles] of turtle k)) ;; is the alternate path shorter? if dummy < (item j [distance-from-other-turtles] of turtle i) [ ask turtle i [ set distance-from-other-turtles replace-item j distance-from-other-turtles dummy ;; replace distance if shorter ] ] set j j + 1 ] set i i + 1 ] set k k + 1 ] end to calculate-utility ;; this calculate a list for each turtle, containing utility for connecting to each other turtle ask turtles [set utility [] ] let m 0 while [m < count turtles] [ask turtle m [ let n 0 while [n < length distance-from-other-turtles] [ifelse item n distance-from-other-turtles = 0 ;; distance to another turtle is 0 or infinity [ let p -999999 set utility lput p utility ] [ ifelse item n distance-from-other-turtles > 10000 [let p 4 * (1 - safety) - safety * (abs ([behavior] of turtle m - [behavior] of turtle n)) set utility lput p utility ; utility connecting to itself or turtle it has no access to = minus infinity ] [ let p (item n distance-from-other-turtles - 1) * (1 - safety) - safety * (abs ([behavior] of turtle m - [behavior] of turtle n)) ;; utility function, consisted of reducing maximal path length and homophily set utility lput p utility ]] set n n + 1] ] set m m + 1] ask turtles [set degree count in-link-neighbors] end to setup-nodes set-default-shape sub1 "X" set-default-shape sub2 "circle" set-default-shape events "square" create-sub1 number-of-sub1 [ ; for visual reasons, we don't put any nodes *too* close to the edges setxy (random-xcor * 0.95) (random-ycor * 0.95) set information n-values 3 [random 15];; set initial information each turtle has set information lput n-values 2 [random -15] information set information reduce sentence information ;; eliminate the redundent information set information shuffle information set self-identity 1 - k-parameter * alpha set safety alpha set behavior random-normal (behavior-mean + 2 * behavior-sd) behavior-sd ; set behavior behavior + 0.5 * behavior-sd ] create-sub2 number-of-sub2 [ ; for visual reasons, we don't put any nodes *too* close to the edges setxy (random-xcor * 0.95) (random-ycor * 0.95) set information n-values 2 [random 15] set information lput n-values 3 [random -15] information set information reduce sentence information set information shuffle information set self-identity 1 - k-parameter * alpha set safety alpha set behavior random-normal (behavior-mean - 2 * behavior-sd) behavior-sd ; set behavior behavior - 0.5 * behavior-sd ] ask sub1 [set color grey] ask sub2 [set color grey] ask turtles [set new 0] ; if one-of sub1 with [safety < 0.1] = nobody [ask one-of sub1 [set safety 0.05 set self-identity 1 - k-parameter * 0.05 ]] ;; set value for bridgers ; if one-of sub2 with [safety < 0.1] = nobody [ask one-of sub2 [set safety 0.05 set self-identity 1 - k-parameter * 0.05 ]] ;; end to setup-informationlist set informationlist [] let ii 0 while [ii < count turtles] [set informationlist lput [information] of turtle ii informationlist set informationlist reduce sentence informationlist set informationlist remove-duplicates informationlist set ii ii + 1] end to setup-spatially-clustered-network let num-links1 (p-within * number-of-sub1 * (number-of-sub1 - 1)) ;number of links in group1 let num-links2 (p-within * number-of-sub2 * (number-of-sub2 - 1)) ;number of links in group2 let num-links3 (p-between * 2 * number-of-sub1 * number-of-sub2 ) ;number of links between group ; if average-node-degree > min [number-of-sub1 - 1 number-of-sub2 - 1] ; [set average-node-degree min [number-of-nodes - 1 number-of-sub2 - 1] ; stop] while [count links < num-links1 ] [ ask one-of sub1 [ let choice (one-of other sub1 with [not in-link-neighbor? myself ] ; "myself" here refers to "one-of other sub1" ) if choice != nobody [ create-link-to choice ] ;; "choice" is "one-of other sub1" ] ] while [ (num-links1 <= count links) and (count links < num-links1 + num-links2) ] [ ask one-of sub2 [ let choice (one-of other sub2 with [not in-link-neighbor? myself ] ) if choice != nobody [ create-link-to choice ] ] ] while [(count links >= num-links1 + num-links2) and (count links < num-links1 + num-links2 + num-links3)] [ ask one-of turtles [ ifelse breed = sub1 [ let choice (one-of other turtles with [(breed = sub2) and (not in-link-neighbor? myself ) ]) if choice != nobody [ create-link-to choice ] ] [ ifelse breed = sub2 [let choice (one-of other turtles with [(breed = sub1) and (not in-link-neighbor? myself ) ]) if choice != nobody [ create-link-to choice ] ] [] ] ] ] if p-within != 0 ; this is to make sure every turtle is connected to at least one other turtle [ ask sub1 with [count out-link-neighbors = 0] [create-link-to one-of other sub1] ask sub2 with [count out-link-neighbors = 0] [create-link-to one-of other sub2] ] repeat 80 ;; lay out turtles [ layout-spring turtles with [breed != events]links 0.6 3 20 ] ask sub1 with [safety < 0.1] [set color white] ; color of the broker ask sub2 with [safety < 0.1] [set color orange] ask links [set information2 n-values 2 [random 0] set information2 remove 0 information2 set information3 n-values 2 [random 0] set information3 remove 0 information3 set old 0 ] ;; set information2 and information3 as empty list end to go calculate-cc information-seeking ;change-ties find-path-lengths calculate-utility ;if ticks > 20 [change-path-length] change-path-length ; influence ask sub1 [ ifelse show-information? [set label length information] [set label ""] ] ask sub2 [ ifelse show-information? [set label length information] [set label ""] ] if ticks = 30 [ ifelse venue = 1 [create-neutral-event] [ifelse venue = 2 [create-positive-event] [ ] ] ] ;if [sort information] of one-of turtles with-min [length information] = [sort information] of one-of turtles with-max [length information][stop] ; condition to check if everyone get all the information if min [length information] of sub1 = length informationlist and min [length information] of sub2 = length informationlist [stop] if ticks = 600 [stop] tick end to information-seeking let i 0 let q count sub1 while [i < count sub1 ] [ask turtles [set new 0] ; indicator for giving new information ask turtle1 i [ let j 0 let ie1 1 while [j < count out-link-neighbors] [ let l random [length information] of item j sort out-link-neighbors ; a random information from the alter let k item j sort out-link-neighbors ask link i [who] of k ; information flow is recorded in the link by information2 [ set information2 fput [item l information] of k information2 set information2 remove-duplicates information2 ] ifelse member? [item l information] of k information [ask link i [who] of k [set old old + 1]] [ask link i [who] of k [set old 0]] if not member? [item l information] of k information ; alter's information is new to the ego,put the new information in ego's list [ set information lput [item l information] of k information set information reduce sentence information set information remove-duplicates information set information shuffle information ask k [set new 1] ifelse [item l information] of k >= 0 [set ie1 ie1 * 1.05] [set ie1 ie1 * 0.95] ] set j j + 1] if count out-link-neighbors with [new = 1] != 0 ; alters who have given ego new information ;set behavior0 behavior0 * ie1 [set behavior (self-identity * behavior * ie1 + (1 - self-identity) * mean [behavior] of out-link-neighbors with [new = 1]) ]]; social influence model set i i + 1] ;; same for group2 while [q < count turtles with [breed != events] ] [ask turtles [set new 0] ask turtle2 q [ let p 0 let ie2 1 while [p < count out-link-neighbors] [ let v random [length information] of item p sort out-link-neighbors let z item p sort out-link-neighbors ask link q [who] of z [set information2 fput [item v information] of z information2 set information2 remove-duplicates information2 ] if member? [item v information] of z information [ask link q [who] of z [set old old + 1]] if not member? [item v information] of z information [ set information lput [item v information] of z information set information reduce sentence information set information remove-duplicates information set information shuffle information ask z [set new 1] ifelse [item v information] of z >= 0 [set ie2 ie2 * 1.05] [set ie2 ie2 * 0.95] ] set p p + 1] if count out-link-neighbors with [new = 1] != 0 ;set behavior0 behavior0 * ie2 [set behavior (self-identity * behavior * ie2 + (1 - self-identity) * mean [behavior] of out-link-neighbors with [new = 1])] ] set q q + 1] ;if ticks mod 3 = 1 [ask links [set information3 information2]] ; information3 is set same as the current information flow when ticks= 3t+1, this is for future comparison with information2 to check whether new information flows through this link in past 3 ticks end to change-ties ;; this function is for changing tie randomly, we are not using this function in this program if ticks mod 3 = 0 [ let m 0 let r count sub1 while [ m < count sub1 ] [ ask turtle1 m [ ifelse color != white [let n 0 while [n < count out-link-neighbors] [ let x item n sort out-link-neighbors if [sort information2] of link m [who] of x = [sort information3] of link m [who] of x [ ask link m [who] of x [die] create-link-to one-of other sub1 with [(who != x ) and (not in-link-neighbor? myself)] ; ifelse one-of other [ out-link-neighbors ] of one-of out-link-neighbors != nobody ; [create-link-to one-of other [ out-link-neighbors ] of one-of out-link-neighbors] ; [create-link-to one-of other [ in-link-neighbors ] of one-of out-link-neighbors] ask links with [information2 = 0] [set information2 n-values 2 [random 0] set information2 remove 0 information2 set information3 n-values 2 [random 0] set information3 remove 0 information3 ] ] set n n + 1 ] ] [let n 0 while [n < count out-link-neighbors] [ let x item n sort out-link-neighbors if [sort information2] of link m [who] of x = [sort information3] of link m [who] of x [ ask link m [who] of x [die] create-link-to one-of other turtles with [(who != x) and (not in-link-neighbor? myself)] ; ifelse one-of other [ out-link-neighbors ] of one-of out-link-neighbors != nobody ; [create-link-to one-of other [ out-link-neighbors ] of one-of out-link-neighbors] ; [create-link-to one-of other [ in-link-neighbors ] of one-of out-link-neighbors] ask links with [information2 = 0] [set information2 n-values 2 [random 0] set information2 remove 0 information2 set information3 n-values 2 [random 0] set information3 remove 0 information3 ] ] set n n + 1 ] ] set m m + 1 ] ] while [ r < count turtles ] [ ask turtle2 r [ ifelse color != orange [let a 0 while [a < count out-link-neighbors] [ let y item a sort out-link-neighbors if [sort information2] of link r [who] of y = [sort information3] of link r [who] of y [ ask link r [who] of y [die] create-link-to one-of other sub2 with [(who != y) and (not in-link-neighbor? myself)] ; ifelse one-of other [ out-link-neighbors ] of one-of out-link-neighbors != nobody ; [create-link-to one-of other [ out-link-neighbors ] of one-of out-link-neighbors] ; [create-link-to one-of other [ in-link-neighbors ] of one-of out-link-neighbors] ask links with [information2 = 0] [set information2 n-values 2 [random 0] set information2 remove 0 information2 set information3 n-values 2 [random 0] set information3 remove 0 information3 ] ] set a a + 1 ] ] [let a 0 while [a < count out-link-neighbors] [ let y item a sort out-link-neighbors if [sort information2] of link r [who] of y = [sort information3] of link r [who] of y [ ask link r [who] of y [die] create-link-to one-of other turtles with [(who != y) and not (in-link-neighbor? myself)] ; ifelse one-of other [ out-link-neighbors ] of one-of out-link-neighbors != nobody ; [create-link-to one-of other [ out-link-neighbors ] of one-of out-link-neighbors] ; [create-link-to one-of other [ in-link-neighbors ] of one-of out-link-neighbors] ask links with [information2 = 0] [set information2 n-values 2 [random 0] set information2 remove 0 information2 set information3 n-values 2 [random 0] set information3 remove 0 information3 ] ] set a a + 1 ] ] set r r + 1 ] ] repeat 100 [ layout-spring turtles links 0.6 3 30 ;layout-spring turtles links 0.3 (world-width / (sqrt number-of-nodes)) 1 display] ] end to influence ;; social influence model, we are not using this in this program because we embed social influence model in the "information-seeking function" ask turtles [ set behavior self-identity * behavior + (1 - self-identity ) * mean [behavior] of out-link-neighbors ] end to change-path-length ; every 3 times if ego doesn't get any new information from alters, ego just switch its tie to another turtle based on the utility function let m 0 while [ m < count turtles with [breed != events]] [ ask turtle m [ let n 0 let o count out-link-neighbors while [n < count out-link-neighbors] [ let x item n sort out-link-neighbors let xx random-float 1 if ((0.8 ^ ([old] of link m [who] of x)) < xx ) [ ask link m [who] of x [die] ] set n n + 1 ] let p count out-link-neighbors ;; number of ties haven't been deleted( which means these ties provide new information in past 3 ticks) let q 0 while [p < o] [if item q (sort-by > utility) > -999999 and (not out-link-neighbor? turtle (position (item q (sort-by > utility)) utility)) ; turtle with max utility and ego has not connected to [create-link-to turtle (position (item q (sort-by > utility)) utility)] ;;position (item q (sort-by > utility)) utility is to find number of turtle with the max utility to the ego ask links with [information2 = 0] [set information2 [] set information3 [] set old 0] set p count out-link-neighbors ;; remain number of neighbors as constant set q q + 1 ] ] set m m + 1] if ticks mod 3 = 0 [repeat 100 [ layout-spring turtles with [breed != events ]links 0.6 3 30 ;layout-spring turtles links 0.3 (world-width / (sqrt number-of-nodes)) 1 display] ] end to shock-bridger-behavior ask one-of turtles with [color = white or color = orange] [set behavior behavior + 2 ] end to shock-bridger-information ask one-of turtles with [color = white or color = orange] [ set information lput [30 31 32] information set information reduce sentence information ] end to shock-sub1-behavior ask one-of sub1 with [degree = max [degree] of sub1 with [color = grey] and color = grey] [set behavior behavior + 2 ] end to shock-sub2-behavior ask one-of sub2 with [degree = max [degree] of sub2 with [color = red] and color = red] [set behavior behavior + 2 ] end to shock-sub1-information ask one-of sub1 with [degree = max [degree] of sub1 with [color = grey] and color = grey] [ set information lput [30 31 32] information set information reduce sentence information ] end to shock-sub2-information ask one-of sub2 with [degree = max [degree] of sub2 with [color = red] and color = red] [ set information lput [30 31 32] information set information reduce sentence information ] end to calculate-cc ask turtles [set neighborhood [who] of out-link-neighbors set neighborhood lput [who] of in-link-neighbors neighborhood set neighborhood reduce sentence neighborhood set neighborhood remove-duplicates neighborhood ] let total 0 let xx 0 while [xx < count turtles] [ask turtle xx [if length neighborhood > 1 [set node-cc (count links with [member? [who] of end1 [neighborhood] of turtle xx and member? [who] of end2 [neighborhood] of turtle xx]) / (([length neighborhood] of turtle xx) * ([length neighborhood] of turtle xx - 1)) set total total + node-cc ] ] set xx xx + 1 ] set clustering-coefficient total / count turtles with [length neighborhood > 1] end to create-neutral-event create-events 1 [ setxy 0 0 set information [ -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 2 3 4 5 6 7 8 9 10 11 16 17 18 ] set size 2 set color blue set behavior mean [behavior] of turtles ] setup-informationlist end to create-positive-event create-events 1 [ setxy 0 0 set information [ 16 17 18 ] set size 2 set color red set behavior 13 ] setup-informationlist end to record-movie ;; record and save a 31 frame movie, about 3 seconds long ;; run your setup procedure setup ;; if for some reason a movie is in progress, cancel it. movie-cancel ;; (this happens when a run-time error occurs ;; in the middle of recording a movie, so that ;; movie-close never happens. This is not as ;; important once a model is "mature" and has ;; less change of runtime errors ;; initialize the movie ;; use whatever filename you want ;; (or add a way to allow the user to specify the file and location) movie-start "out.mov" ;; set the frame-rate per-second movie-set-frame-rate 10 ;; this means that 10 "steps" of your model will take 1 second of movie time. ;; 15 is the default, if you didn't use movie-set-frame-rate ;; save the first frame as the initial state of the model movie-grab-view ;; run the model's go procedure 30 times, then ;; record a frame of the movie after each GO repeat 60 [ ;; run the model for 1 go go ;; record the result as a frame of the movie movie-grab-view ] ;; all done, now close the movie to save in the movie file movie-close end @#$#@#$#@ GRAPHICS-WINDOW 246 19 744 538 16 16 14.8 1 10 1 1 1 0 1 1 1 -16 16 -16 16 0 0 1 ticks 30.0 SLIDER 17 17 189 50 number-of-sub1 number-of-sub1 2 50 10 1 1 NIL HORIZONTAL BUTTON 18 88 81 121 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 132 89 195 122 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 20 54 192 87 number-of-sub2 number-of-sub2 2 50 10 1 1 NIL HORIZONTAL PLOT 819 15 1310 242 plot 1 time information 0.0 10.0 0.0 10.0 true true "" "" PENS "variance of information sub1" 1.0 0 -4539718 true "" "plot variance [length information] of sub1" "variance of information sub2" 1.0 0 -2674135 true "" "plot variance [length information] of sub2" "mean information of sub1" 1.0 0 -16777216 true "" "plot mean [length information] of sub1" "mean information of sub2" 1.0 0 -955883 true "" "plot mean [length information] of sub2" SLIDER 14 269 186 302 behavior-mean behavior-mean 0 30 10 1 1 NIL HORIZONTAL SLIDER 15 305 187 338 behavior-sd behavior-sd 0 10 1 1 1 NIL HORIZONTAL SWITCH 19 345 188 378 show-information? show-information? 0 1 -1000 PLOT 819 242 1310 513 plot 2 time behavior 0.0 10.0 10.0 15.0 true true "" "" PENS "mean behavior sub1" 1.0 0 -7500403 true "" "plot mean [behavior] of sub1" "mean behavior sub2" 1.0 0 -2674135 true "" "plot mean [behavior] of sub2" SLIDER 17 385 189 418 p-within p-within 0 1 0.4 0.01 1 NIL HORIZONTAL SLIDER 17 426 189 459 p-between p-between 0 1 0.02 0.01 1 NIL HORIZONTAL TEXTBOX 754 466 810 501 note\n \n safety\n low moderate high\n low no no unstable\nself-efficacy moderate no no unstable\n high no yes yes\n\n\n 11 0.0 1 SLIDER 18 232 190 265 alpha alpha 0 1 0.9 0.01 1 NIL HORIZONTAL SWITCH 16 476 188 509 show-behavior? show-behavior? 1 1 -1000 SLIDER 18 199 190 232 k-parameter k-parameter 0 1 0.5 0.01 1 NIL HORIZONTAL SLIDER 27 127 199 160 venue venue 0 2 1 1 1 NIL HORIZONTAL TEXTBOX 211 155 361 173 NIL 11 0.0 1 TEXTBOX 30 161 180 189 1 = neutral event\n2 = positive event 11 0.0 0 @#$#@#$#@ ## WHAT IS IT? (turtles of 2 subgroups interact with each other, seeking for information and influenced by each other ) ## HOW IT WORKS (each ego seek information from alters they connect to each round, and each time the alter randomly gives a piece of information to ego. And when they are exchanging information, their behavior will be influenced by both information and alter's behavior from whom they get new information. And Every 3 time if a turtle doesn't get new information from its alter, it just delete that tie and connect with someone else,using the selection model embedded in the program. And all the influence and selection process are decided by our model. ) ## HOW TO USE IT (you can control for number of nodes in each group, probability (density) of ties within subgroup and between group, behaviors of nodes in each group,(you can control for mean and sd of distribution of their behavior, which is assumed normal), and you can control for self-identity value (which decides their influence model) and safty value (which decides their selection model)for the turtles ) ## THINGS TO NOTICE ( you can see how infomation flows in the network, and how peoples' behavior and selection of connection change with it. And bridgers ( white and yellow ) has very low safety values, you can see how they become bridgers even when they are not bridgers at the very beginning. But when in certain time two groups are set apart and don't have a tie between them, they can never be connected again because they have no access to other groups) ## THINGS TO TRY (you can change turtles initial behavior, self-identity values and safety values to see how that might affect network on the systematic level, how information flows and how turltes finally behave. ) ## EXTENDING THE MODEL (you can set turltles safety value and self-identity value different from each other, such as random or correlated, based on your hypothesis.) ## NETLOGO FEATURES (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) ## RELATED MODELS (the part of setting up initial network is based on virus network in model library from Netlogo, the part of find-path-length is based on small worlds in model library in Netlogo.) ## CREDITS AND REFERENCES (most of its part is based on modifications and extensions from Ken Frank's 1999 paper "Organization Culture as a Complex System") @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 15 Circle -1 true true 203 65 88 Circle -1 true true 70 65 162 Circle -1 true true 150 105 120 Polygon -7500403 true false 218 120 240 165 255 165 278 120 Circle -7500403 true false 214 72 67 Rectangle -1 true true 164 223 179 298 Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 Circle -1 true true 3 83 150 Rectangle -1 true true 65 221 80 296 Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 Polygon -7500403 true false 276 85 285 105 302 99 294 83 Polygon -7500403 true false 219 85 210 105 193 99 201 83 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -16777216 true false 253 133 245 131 245 133 Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 5.2.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go mean [behavior] of sub1 mean [behavior] of sub2 mean [behavior] of turtles variance [length information] of turtles variance [length information] of sub1 variance [length information] of sub2 mean [length information] of turtles mean [length information] of sub1 mean [length information] of sub2 clustering-coefficient setup go mean [behavior] of sub1 mean [behavior] of sub2 mean [behavior] of turtles @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@