globals [movedcell temp dataprinted RndNbr RndNbr2 tempxcoor tempycoor mingapxcoor maxgapxcoor mintopxcoor maxtopxcoor movedup minxcoor maxxcoor Zone1 Zone2 Zone3 Zone4 maxred minred dispersion Zone5 Zone6 Zone7 Zone8 Zone9 Zone10 Zone11 Zone12 ZoneTEST dilution clock stage D1 D2 D3 D4 D5] breeds [ top middle bottom moved top-sticky FN] bottom-own [RTime ;residency time in the bottom layer ;amount of FN fibrils grown below that cell grownow] ;boolean to determine if fibril should be incremented turtles-own [fibril fibril2] to setup ca set clock 0 set stage 8 ;assuming thinning starts at developmental stage 8 set temp 0 set dataprinted false set RndNbr 3 ;random variable to determine if cell moves left or right set RndNbr2 3 ;random variable to determine if cell moves up(1) or down(0) set tempxcoor 0 ;xcoordinate of the most recently moved cell set tempycoor 0 ;ycoordinate of the most recently moved cell set mingapxcoor 0 ;minimum x coord of the gap in the layer a cell has moved to set maxgapxcoor 0 ;maximum x coord of the gap in the layer a cell has moved to set mintopxcoor -5000 ;min xcor of top cell in layer cell moved to set maxtopxcoor 5000 ;max xcor of top cell in layer cell moved to set maxxcoor 0 ;the xcor of the rightmost cell in the bottom layer after thinning is complete set minxcoor 0 set dilution 0 ;used to keep track of % dilution of the bottom row of cells w/ upper cells (red and green) set movedcell 0 set movedup 0 ;final counts of red, green yellow in left quarter, middle half, right quarter set Zone1 0 set Zone2 0 set Zone3 0 set Zone4 0 set Zone5 0 set Zone6 0 set Zone7 0 set Zone8 0 set Zone9 0 set Zone10 0 set Zone11 0 set Zone12 0 set ZoneTEST 0 set maxred 0 set minred 0 set dispersion 0 set D1 0 set D2 0 set D3 0 set D4 0 set D5 0 ;dispersion after each hour placetopcells placemiddlecells placebottomcells ;ask turtles [set shape "square"] ask patches [set pcolor gray] end to setup-experiment ca set dataprinted false set stage 8 set movedcell 0 set movedup 0 ;final counts of red, green yellow in left quarter, middle half, right quarter set Zone1 0 set Zone2 0 set Zone3 0 set Zone4 0 set Zone5 0 set Zone6 0 set Zone7 0 set Zone8 0 set Zone9 0 set Zone10 0 set Zone11 0 set Zone12 0 set ZoneTEST 0 placetopcells placemiddlecells placebottomcells ask turtles [set shape "square"] ask patches [set pcolor grey] end to placetopcells ask patches [ if ((pxcor > -42 and pxcor < -25 and pycor = 3) or (pxcor > 25 and pxcor < 43 and pycor = 3)) [sprout 1 [set color blue set breed top set shape "square"]]] ask patches [ if ((pxcor > -26 and pxcor < -23) or (pxcor > 24 and pxcor < 27) and pycor = 2) [sprout 1 [set color blue set breed top set shape "square"]]] ask patches [ if ((pxcor > -24 and pxcor < -18) or (pxcor > 19 and pxcor < 25) and pycor = 1) [sprout 1 [set color blue set breed top set shape "square"]]] ;**********-18 is L:blue/pink 19 is pink/blue ask patches [ if (pxcor > -19 and pxcor < 20 and pycor = 1) [sprout 1 [set color blue set breed top set shape "square"]]] ;********** > (one less than above) and < (one greater than above) ;ask patches [ if ((pxcor > 25 and pxcor < 26) or (pxcor > 14 and pxcor < 26) and pycor = 2) [sprout 1 [set breed top]]] ;***Change here to change size of red implant cells*** ;ask patches [ if (((pxcor > -16 and pxcor < 15))and pycor = 2) [sprout 1 [set breed top]]] ;***Change here to change size of red implant cells*** ;ask patches [ if (pxcor > 26 and pxcor < 43 and pycor = 1) [sprout 1 [set breed top]]] ;ask patches [ if ((pxcor > -20 and pxcor < 20) and pycor = 1) [sprout 1 [set breed top]]] ;ask patches [ if (pxcor > 25 and pxcor < 27 and pycor = 2) [sprout 1 [set breed top]]] ;ask patches [ if (pxcor > 26 and pxcor < 43 and pycor = 3) [sprout 1 [set breed top]]] ;ask top [set color blue] ;scale-color blue xcor -15 15] end to placemiddlecells ask patches [ if ((pxcor > -42 and pxcor < -27) or (pxcor > 26 and pxcor < 43) and pycor = 2) [sprout 1 [set color orange set breed middle set shape "square"]]] ask patches [ if ((pxcor > -28 and pxcor < -25) and pycor = 2) [sprout 1 [set color 17 set breed top-sticky set shape "square"]]] ask patches [ if (((pxcor > -42 and pxcor < -28) or (pxcor > 24 and pxcor < 43)) and pycor = 1) [sprout 1 [set color red set breed middle set shape "square"]]] ask patches [ if ((pxcor > -29 and pxcor < -23) and pycor = 1) [sprout 1 [set color 17 set breed top-sticky set shape "square"]]] ask patches [ if (((pxcor > -42 and pxcor < -28) or (pxcor > -4 and pxcor < 43)) and pycor = 0) [sprout 1 [set color green set breed middle set shape "square"]]] ;********** -18 is L:green/pink 19 is pink/green ask patches [ if ((pxcor > -29 and pxcor < -3) and pycor = 0) [sprout 1 [set color 17 set breed top-sticky set shape "square"]]] ;create red patch ; ask patches [ if (((pxcor > -16 and pxcor < 15))and pycor = 1) [sprout 1 [set breed middle]]] ;***Change here to change size of red implant cells*** ; ask patches [ if (((pxcor > -42 and pxcor < 43))and pycor = 0) [sprout 1 [set breed middle]]] ; ask middle [if (ycor = 2) [set color orange ] ;scale-color red xcor -20 20] ; if (ycor = 1) [set color red] ; if((ycor = 1) and (xcor > -24 and xcor < 25))[set color red ] ; if(ycor = 0)[set color green ]] ;scale-color green xcor -20 20]] end to placebottomcells ask patches [ if (pxcor > -42 and pxcor < -29) or (pxcor > -3 and pxcor < 43) and pycor = -1 [sprout 1 [set breed bottom set shape "square" set color yellow]]] ask patches [ if (pxcor > -30 and pxcor < -2 and pycor = -1) [sprout 1 [set breed bottom set color 17 set shape "square"]]] ask bottom [ set RTime 0 ;initialize their residency time to zero set fibril 0 ;initialize all fibril lengths to zero set grownow false] ;initialize boolean to false ; ask patches [if (pxcor > -42 and pxcor < 43 and pycor = -2) [sprout 1 [set breed FN set shape "circle" set color black]]] end to place-FN ask bottom [hatch 1 [set breed FN set shape "circle" set heading 180 fd 1 set color scale-color gray fibril 1 167]] ask FN [set label no-label] ask bottom [set label no-label] end to go movecell do-plots if (dataprinted = false) [getfibrildata] displayfibrils if (dataprinted = true) [stop] end to getfibrildata ;if (clock > 240) [ ;get fibril data after hour 1 if(count turtles with [ycor > 0] = 0) [;when this is true, the cells have thinned to 2 layers ;find the rightmost cell in the bottomlayer (it's xcoordinate varies each run) ask turtles [set minxcoor min values-from (turtles with [ycor = -1]) [xcor] set temp minxcoor] print "xcor = " + temp + " fibril length = " + fibril-of one-of bottom with [xcor = temp] repeat 235 [ set temp temp + 1 ifelse (count bottom with [xcor = temp] != 0 ) [print "xcor = " + temp + " fibril length = " + fibril-of one-of bottom with [xcor = temp]][print "xcor = " + temp] ] set dataprinted true ] end to write-data ;if (clock > 59 and clock < 60) [print "1 hr " + count turtles with [ycor = -1 and color != yellow]] ;if (clock > 119 and clock < 120) [print "2 hr " + count turtles with [ycor = -1 and color != yellow]] ;if (clock > 179 and clock < 180) [print "3 hr " + count turtles with [ycor = -1 and color != yellow]] ;if (clock > 239 and clock < 240) [print "4 hr " + count turtles with [ycor = -1 and color != yellow]] end to movecell ;pick a random middle cell if there are still middle cells left if (random-one-of middle != nobody) [ ask random-one-of middle [ ;if moving the selected random cell would cause the superficial layer to become discontinuous, ;do not move this cell. Note - this will not waste one cell movement because movedcell is only incremented if a cell has moved ifelse((count top-at 0 1 = 1 and (count top-at -1 2 = 1 or count top-at 1 2 = 1)) or (count top-at 0 2 = 1 and (count top-at -1 3 = 1 or count top-at 1 3 = 1))) [ ][ set movedcell movedcell + 1 ;increment the counter for number of times a random cell was selected to move set clock clock + (60 / 42.41) ;increment the clock by aobut 1.9 minutes each time moved cell increments (this time NOT derived from dilution rate) set stage stage + ((60 / 42.41) / 60) ;increment the stage (assuming 1 stage = 60 min) ask bottom [set RTime RTime + (60 / 42.41)] ;increment the residency time for the bottom cells ;growfibrils NOW? if (clock >= 30) [growfibrils] set breed moved ;set the random numbers to 0 or 1 so 50% chance of moving left right up or down set RndNbr random 2 set RndNbr2 random 2 ;if there are top cells above the middle cell, set the RndNbr2 to 0 so the cell can't move up into the superficial layer if(count top-at -1 1 = 1 or count top-at 0 1 = 1 or count top-at 1 1 = 1) [set RndNbr2 0] ;if there are no cells below the cell selected to move, move it down, set RndNbr to 2 so know cell has already moved if(count turtles-at 0 -1 = 0) [set ycor ycor - 1 set RndNbr 2] ;otherwise, use the random number generator to decide if the cell will move left or right (this will have to be modified to let the cell move away from FN as well) ;if the random number is 0 move it left ifelse (RndNbr = 0) ;if ycor = 1, cell can only move down. if ycor = 0, the cell can move up or down use RndNbr2 to determine up(1) or down(0) [ifelse(ycor = 1) [set xcor xcor - 1 set ycor ycor - 1] [ifelse(RndNbr2 = 0)[set xcor xcor - 1 set ycor ycor - 1] [set xcor xcor - 1 set ycor ycor + 1 set movedup movedup + 1] ] ] ;if the random number is 1 move it right ;if ycor = 1, cell can only move down. if ycor = 0, the cell can move up or down use RndNbr2 to determine up or down [if (RndNbr = 1) ;if ycor = 1, cell can only move down. if ycor = 0, the cell can move up or down use RndNbr2 to determine up or down [ifelse(ycor = 1) [set xcor xcor + 1 set ycor ycor - 1][ifelse(RndNbr2 = 0)[set xcor xcor + 1 set ycor ycor - 1] [set xcor xcor + 1 set ycor ycor + 1 set movedup movedup + 1]]]] set tempxcoor xcor set tempycoor ycor ] ] ] shiftcells ;shift the cells in the row moved entered as necessary changebreed ;change the breed of moved accordingly movetopdown ;move superficial cells down if gap created below them fillholes ;fill in holes in the 2nd layer (holes in 3rd layer would be filled by top dropping down) spreadtopcells ;keep top layer continuous killextratopcells ;kill top cells if stacked up or pushed over edge movetopdown setdilution end to growfibrils ;find bottom in patch of at least 3 that all have RTimes of at least 30 minutes ask bottom [ ;first make sure there are 2 cells on either side (will take care of end cells last) if(count turtles-at -1 0 = 1 and count bottom-at -2 0 = 1 and count bottom-at 1 0 = 1 and count bottom-at 2 0 = 1) [ ifelse((RTime >= 30 and RTime-of one-of bottom-at -1 0 >= 30 and RTime-of one-of bottom-at 1 0 >= 30) or (RTime >= 30 and RTime-of one-of bottom-at 1 0 >= 30 and RTime-of one-of bottom-at 2 0 >= 30) or (RTime >= 30 and RTime-of one-of bottom-at -1 0 >= 30 and RTime-of one-of bottom-at -2 0 >= 30))[set grownow true][set grownow false]] ;take care of end and one-from-end cells now if(count bottom-at -1 0 = 0 and count bottom-at 1 0 = 1 and count bottom-at 2 0 = 1)[ ifelse(RTime >= 30 and RTime-of one-of bottom-at 1 0 >= 30 and RTime-of one-of bottom-at 2 0 >= 30)[set grownow true][set grownow false]] if(count bottom-at 1 0 = 0 and count bottom-at -1 0 = 1 and count bottom-at -2 0 = 1)[ ifelse(RTime >= 30 and RTime-of one-of bottom-at -1 0 >= 30 and RTime-of one-of bottom-at -2 0 >= 30)[set grownow true][set grownow false]] if((count bottom-at -1 0 = 1 and count bottom-at 1 0 = 1) and (count bottom-at -2 0 = 0 or count bottom-at 2 0 = 0))[ ifelse(RTime >= 30 and RTime-of one-of bottom-at -1 0 >= 30 and RTime-of one-of bottom-at 1 0 >= 30)[set grownow true][set grownow false]] ] ask bottom [ifelse(grownow = true) [set fibril fibril + 1][set fibril 0]] ;reset fibrils to zero if the conditions aren't met ;ask bottom [if(grownow = true) [set fibril fibril + 1]] ;OR don't reset the fibrils to zero if the conditions aren't met ;displayfibrils end to displayfibrils ask bottom [ set label fibril] ask top [set label no-label] ; ask patches [if pycor = -2 [ ; set pcolor scale-color gray pfn -15 15 ; ] ; ] ;ask patches [set pcolor grey] ; ask patches [if(count turtles with [xcor = pxcor] > 0) ; [if((pycor < -1) and (pycor > (-1 - fibril-of one-of bottom with [xcor = pxcor]))) [set pcolor orange]] ;] end to shiftcells ;shift the cells in the row moved to out if a cell has just moved in that layer if(count moved != 0 and count turtles-at tempxcoor tempycoor > 0) [ ;if tempxcoor is less than zero, move the cells left ifelse(tempxcoor < 0) [ ;find the xcor of closest gap to the left or end of the row of cells set maxgapxcoor max values-from (patches with [pycor = tempycoor and pxcor < tempxcoor and count turtles-here = 0]) [pxcor] ;if(), just use the gap to determine where to shift the cells, else ifelse(count top with [ycor = tempycoor and xcor < tempxcoor] = 0) [ask turtles [if(breed != moved and ycor = tempycoor and xcor <= tempxcoor and xcor > maxgapxcoor) [set xcor xcor - 1]]] ;else, find xcor of closest top cell [set maxtopxcoor max values-from (top with [ycor = tempycoor and xcor < tempxcoor]) [xcor] ifelse(maxgapxcoor > maxtopxcoor) [ask turtles [if(breed != moved and ycor = tempycoor and xcor <= tempxcoor and xcor > maxgapxcoor) [set xcor xcor - 1]]] ;else maxtopxcoor is greater, so if the top is not the outermost cell: [ifelse(maxtopxcoor != maxgapxcoor + 1) [ask top-at maxtopxcoor tempycoor [die] ask turtles [if(breed != moved and ycor = tempycoor and xcor <= tempxcoor and xcor > maxtopxcoor) [set xcor xcor - 1]]] ;else the top cell is the outermost cell [ask turtles [if(breed != moved and ycor = tempycoor and xcor <= tempxcoor) [set xcor xcor - 1]]]]] ] ;else tempxcoor >= 0, move the cells right [;find the xcor of closest gap to the right or end of the row of cells set mingapxcoor min values-from (patches with [pycor = tempycoor and pxcor > tempxcoor and count turtles-here = 0]) [pxcor] ifelse(count top with [ycor = tempycoor and xcor > tempxcoor] = 0) [ask turtles [if(breed != moved and ycor = tempycoor and xcor >= tempxcoor and xcor < mingapxcoor) [set xcor xcor + 1]]] ;else, find the xcor of closest top cell [set mintopxcoor min values-from (top with [ycor = tempycoor and xcor > tempxcoor]) [xcor] ifelse(mingapxcoor < mintopxcoor) [ask turtles [if(breed != moved and ycor = tempycoor and xcor >= tempxcoor and xcor < mingapxcoor) [set xcor xcor + 1]]] ;else mintopxcoor is less,so if the top is not the outermost cell: [ifelse(mintopxcoor != mingapxcoor - 1) [ask top-at mintopxcoor tempycoor [die] ask turtles [if(breed != moved and ycor = tempycoor and xcor >= tempxcoor and xcor < mintopxcoor) [set xcor xcor + 1]]] ;else the top cell is the outermost cell [ask turtles [if(breed != moved and ycor = tempycoor and xcor >= tempxcoor) [set xcor xcor + 1]]]]] ] ] end to changebreed ;change the breed of moved accordingly ask moved [ ;if the cell moved to the bottom layer, change its breed to bottom else change back to middle ifelse (ycor = -1) [set breed bottom set shape "square" set grownow false] [set breed middle set shape "square"] ] end to movetopdown ;move the superficial cells down accordingly ask top [ if (count turtles-at 0 -1 = 0) [set ycor ycor - 1] ;kill top layer if stacked up if (count top-at 0 -1 = 1) [die] if (pxcor > -19 and pxcor < 20 and pycor = 2) [die] ] ;] end to fillholes ;check for "holes" in the middle layer ask patches [ if (count turtles-at 0 0 = 0 and count turtles-at -1 0 = 1 and count turtles-at 0 1 = 1 and count turtles-at 1 0 = 1 and count turtles-at 1 -1 = 1 and count turtles-at 0 -1 = 1 and count turtles-at -1 -1 = 1) [ ; select the MIDDLE cell above to fill the hole ask middle-at 0 1 [set ycor ycor - 1 ] ] ] end to spreadtopcells ;keep superficial cells in middle contiguous by ensuring top above each middle or bottom if nothing else is there ask turtles [ if(breed != top and count turtles-at 0 1 = 0 and count turtles-at 0 2 = 0) [hatch 1 [set breed top set ycor ycor + 1 set color blue set shape "square" set label-color blue]] ] end to killextratopcells ;kill top layer if stacked up on another top cell ask top [if (count top-at 0 -1 = 1) [die]] ;kill a top cell if it gets pushed over and there is nothing in the 3 cell layers below it ask top [ if(count turtles-at 0 -1 = 0 and count turtles-at 0 -2 = 0 and count turtles-at 0 -3 = 0) [die] ] ;if a top cell on edge is covered by layer above it spreading, kill this top cell ask top [if(count middle-at 0 1 = 1) [die]] end to setdilution set dilution ((count turtles with [ycor = -1 and color != yellow] / count turtles with [ycor = -1]) * 100) end to do-plots set-current-plot "Cell Count" plot count turtles set-current-plot "Dispersion" plot dispersion end to run-experiment go if (dataprinted = true) [setup-experiment] ;calculate "dispersion" of implanted patch ; set maxred max values-from (turtles with [color = red]) [xcor] ;print maxred ; set minred min values-from (turtles with [color = red]) [xcor] ;print minred ; set dispersion maxred - minred + 1 ;if (stage > 9 and stage < 9.1) [set D1 dispersion] ; if (stage > 10 and stage < 10.1) [set D2 dispersion] ; if (stage > 11 and stage < 11.1) [set D3 dispersion] ; if (stage > 12 and stage < 12.1) [set D4 dispersion] ; if (stage > 13) [ ; set D5 dispersion ; print "1 hr: " + D1 + " 2 hr: " + D2 + " 3 hr: " + D3 + " 4 hr: " + D4 + " 5 hr: " + D5 ; print "Time to thin = " + clock setup-experiment ;] ;run multiple experiments to obtain an accurate estimate of movedcell after 1 hr (i.e. when %dilution = 20%) ;if (dilution >= 20) [print "dilution = " + dilution + " movedcell = " + movedcell ;setup-experiment ;] ;determine the number of red cells in the zones of the bottom row upon completion ; to enable many repetitions with same settings if (count turtles with [ycor > 0] = 0) [;when this is true, the cells have thinned to 2 layers ;find the rightmost cell in the bottomlayer (it's xcoordinate varies each run) set maxxcoor max values-from (turtles with [ycor = -1]) [xcor] ;find # of R in zones ; set Zone12 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 77 and xcor <= maxxcoor - 66] ; set Zone11 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 88 and xcor <= maxxcoor - 77] ; set Zone10 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 99 and xcor <= maxxcoor - 88] ; set Zone9 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 110 and xcor <= maxxcoor - 99] ; set Zone8 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 121 and xcor <= maxxcoor - 110] ; set Zone7 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 132 and xcor <= maxxcoor - 121] ; set Zone6 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 143 and xcor <= maxxcoor - 132] ; set Zone5 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 154 and xcor <= maxxcoor - 143] ; set Zone4 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 165 and xcor <= maxxcoor - 154] ; set Zone3 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 176 and xcor <= maxxcoor - 165] ; set Zone2 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 187 and xcor <= maxxcoor - 176] ; set Zone1 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 198 and xcor <= maxxcoor - 187] ;set ZoneTEST count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 198 and xcor <= maxxcoor - 66] ;print ZoneTEST ;print " Z1 = " + Zone1 + " Z2 = " + Zone2 + " Z3 = " + Zone3 + " Z4 = " + Zone4 + " Z5 = " + Zone5 + " Z6 = " + Zone6 + " Z7 = " + Zone7 + " Z8 = " + Zone8 ; + " Z9 = " + Zone9 + " Z10 = " + Zone10 + " Z11 = " + Zone11 + " Z12 = " + Zone12 ;set Zone8 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 33 and xcor <= maxxcoor] ;set Zone7 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 66 and xcor <= maxxcoor - 33] ;set Zone6 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 99 and xcor <= maxxcoor - 66] ;set Zone5 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 132 and xcor <= maxxcoor - 99] ;set Zone4 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 165 and xcor <= maxxcoor - 132] ;set Zone3 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 198 and xcor <= maxxcoor - 165] ;set Zone2 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 231 and xcor <= maxxcoor - 198] ;set Zone1 count turtles with [color = red and ycor = -1 and xcor > maxxcoor - 264 and xcor <= maxxcoor - 231] ;print " Z1 = " + Zone1 + " Z2 = " + Zone2 + " Z3 = " + Zone3 + " Z4 = " + Zone4 + " Z5 = " + Zone5 + " Z6 = " + Zone6 + " Z7 = " + Zone7 + " Z8 = " + Zone8 setup-experiment] end @#$#@#$#@ GRAPHICS-WINDOW -897 75 2722 223 200 6 9.0 1 10 0 0 CC-WINDOW 303 501 861 736 Command Center BUTTON 289 237 344 270 NIL setup NIL 1 T OBSERVER MONITOR 400 43 478 92 NIL movedcell 3 1 PLOT 20 407 242 585 Cell Count NIL # of cells 0.0 10.0 20.0 30.0 true false MONITOR 488 43 560 92 NIL movedup 3 1 BUTTON 363 240 444 273 NIL go T 1 T OBSERVER BUTTON 498 243 673 276 NIL run-experiment T 1 T OBSERVER MONITOR 117 43 295 92 NIL count turtles with [xcor > 0] 3 1 MONITOR 571 43 634 92 NIL dilution 3 1 MONITOR 643 42 753 91 clock (minutes) clock 3 1 MONITOR 301 43 395 92 NIL count turtles 3 1 MONITOR 855 48 943 97 NIL dataprinted 3 1 MONITOR 759 44 816 93 NIL stage 1 1 MONITOR 143 249 224 298 NIL dispersion 3 1 PLOT 6 362 206 512 Dispersion NIL NIL 0.0 100.0 15.0 60.0 true false MONITOR 689 233 746 282 NIL D1 3 1 MONITOR 751 233 808 282 NIL D2 3 1 MONITOR 813 232 870 281 NIL D3 3 1 MONITOR 876 230 933 279 NIL D4 3 1 MONITOR 938 230 995 279 NIL D5 3 1 BUTTON 361 322 473 355 Fibril Counts if breed = bottom [show fibril] NIL 1 T TURTLE BUTTON 362 282 466 315 Sticky Cells ask turtle 280 [print " sticky cells' (#261-#296) fibronectin content = " + fibril] NIL 1 T OBSERVER BUTTON 362 366 451 399 place-FN place-FN NIL 1 T OBSERVER @#$#@#$#@ add model documentation here ;calculate "dispersion" of implanted patch set maxred max values-from (turtles with [color = red]) [xcor] set minred min values-from (turtles with [color = red]) [xcor] set dispersion maxred - minred + 1 print dispersion @#$#@#$#@ default true 0 Polygon -7566196 true true 150 5 40 250 150 205 260 250 ant true 0 Polygon -7566196 true true 136 61 129 46 144 30 119 45 124 60 114 82 97 37 132 10 93 36 111 84 127 105 172 105 189 84 208 35 171 11 202 35 204 37 186 82 177 60 180 44 159 32 170 44 165 60 Polygon -7566196 true true 150 95 135 103 139 117 125 149 137 180 135 196 150 204 166 195 161 180 174 150 158 116 164 102 Polygon -7566196 true true 149 186 128 197 114 232 134 270 149 282 166 270 185 232 171 195 149 186 149 186 Polygon -7566196 true true 225 66 230 107 159 122 161 127 234 111 236 106 Polygon -7566196 true true 78 58 99 116 139 123 137 128 95 119 Polygon -7566196 true true 48 103 90 147 129 147 130 151 86 151 Polygon -7566196 true true 65 224 92 171 134 160 135 164 95 175 Polygon -7566196 true true 235 222 210 170 163 162 161 166 208 174 Polygon -7566196 true true 249 107 211 147 168 147 168 150 213 150 Polygon -7566196 true true 270 14 Polygon -7566196 true true 276 21 arrow true 0 Polygon -7566196 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 bee true 0 Polygon -256 true false 151 152 137 77 105 67 89 67 66 74 48 85 36 100 24 116 14 134 0 151 15 167 22 182 40 206 58 220 82 226 105 226 134 222 Polygon -16777216 true false 151 150 149 128 149 114 155 98 178 80 197 80 217 81 233 95 242 117 246 141 247 151 245 177 234 195 218 207 206 211 184 211 161 204 151 189 148 171 Polygon -7566196 true true 246 151 241 119 240 96 250 81 261 78 275 87 282 103 277 115 287 121 299 150 286 180 277 189 283 197 281 210 270 222 256 222 243 212 242 192 Polygon -16777216 true false 115 70 129 74 128 223 114 224 Polygon -16777216 true false 89 67 74 71 74 224 89 225 89 67 Polygon -16777216 true false 43 91 31 106 31 195 45 211 Line -1 false 200 144 213 70 Line -1 false 213 70 213 45 Line -1 false 214 45 203 26 Line -1 false 204 26 185 22 Line -1 false 185 22 170 25 Line -1 false 169 26 159 37 Line -1 false 159 37 156 55 Line -1 false 157 55 199 143 Line -1 false 200 141 162 227 Line -1 false 162 227 163 241 Line -1 false 163 241 171 249 Line -1 false 171 249 190 254 Line -1 false 192 253 203 248 Line -1 false 205 249 218 235 Line -1 false 218 235 200 144 bird1 false 0 Polygon -7566196 true true 2 6 2 39 270 298 297 298 299 271 187 160 279 75 276 22 100 67 31 0 bird2 false 0 Polygon -7566196 true true 2 4 33 4 298 270 298 298 272 298 155 184 117 289 61 295 61 105 0 43 boat1 false 0 Polygon -1 true false 63 162 90 207 223 207 290 162 Rectangle -6524078 true false 150 32 157 162 Polygon -16776961 true false 150 34 131 49 145 47 147 48 149 49 Polygon -7566196 true true 158 33 230 157 182 150 169 151 157 156 Polygon -7566196 true true 149 55 88 143 103 139 111 136 117 139 126 145 130 147 139 147 146 146 149 55 boat2 false 0 Polygon -1 true false 63 162 90 207 223 207 290 162 Rectangle -6524078 true false 150 32 157 162 Polygon -16776961 true false 150 34 131 49 145 47 147 48 149 49 Polygon -7566196 true true 157 54 175 79 174 96 185 102 178 112 194 124 196 131 190 139 192 146 211 151 216 154 157 154 Polygon -7566196 true true 150 74 146 91 139 99 143 114 141 123 137 126 131 129 132 139 142 136 126 142 119 147 148 147 boat3 false 0 Polygon -1 true false 63 162 90 207 223 207 290 162 Rectangle -6524078 true false 150 32 157 162 Polygon -16776961 true false 150 34 131 49 145 47 147 48 149 49 Polygon -7566196 true true 158 37 172 45 188 59 202 79 217 109 220 130 218 147 204 156 158 156 161 142 170 123 170 102 169 88 165 62 Polygon -7566196 true true 149 66 142 78 139 96 141 111 146 139 148 147 110 147 113 131 118 106 126 71 bottom-shape false 0 Rectangle -44544 true false 21 23 284 278 box true 0 Polygon -7566196 true true 45 255 255 255 255 45 45 45 butterfly1 true 0 Polygon -16777216 true false 151 76 138 91 138 284 150 296 162 286 162 91 Polygon -7566196 true true 164 106 184 79 205 61 236 48 259 53 279 86 287 119 289 158 278 177 256 182 164 181 Polygon -7566196 true true 136 110 119 82 110 71 85 61 59 48 36 56 17 88 6 115 2 147 15 178 134 178 Polygon -7566196 true true 46 181 28 227 50 255 77 273 112 283 135 274 135 180 Polygon -7566196 true true 165 185 254 184 272 224 255 251 236 267 191 283 164 276 Line -7566196 true 167 47 159 82 Line -7566196 true 136 47 145 81 Circle -7566196 true true 165 45 8 Circle -7566196 true true 134 45 6 Circle -7566196 true true 133 44 7 Circle -7566196 true true 133 43 8 circle false 0 Circle -7566196 true true 35 35 230 middle-shape false 0 Rectangle -256 true false 24 22 282 282 person false 0 Circle -7566196 true true 155 20 63 Rectangle -7566196 true true 158 79 217 164 Polygon -7566196 true true 158 81 110 129 131 143 158 109 165 110 Polygon -7566196 true true 216 83 267 123 248 143 215 107 Polygon -7566196 true true 167 163 145 234 183 234 183 163 Polygon -7566196 true true 195 163 195 233 227 233 206 159 spacecraft true 0 Polygon -7566196 true true 150 0 180 135 255 255 225 240 150 180 75 240 45 255 120 135 square false 0 Rectangle -7566196 true true 16 28 280 279 sticky false 0 Rectangle -65413 true false 46 47 253 255 thin-arrow true 0 Polygon -7566196 true true 150 0 0 150 120 150 120 293 180 293 180 150 300 150 top-shape false 0 Rectangle -16745473 true false 16 27 280 279 truck-down false 0 Polygon -7566196 true true 225 30 225 270 120 270 105 210 60 180 45 30 105 60 105 30 Polygon -8716033 true false 195 75 195 120 240 120 240 75 Polygon -8716033 true false 195 225 195 180 240 180 240 225 truck-left false 0 Polygon -7566196 true true 120 135 225 135 225 210 75 210 75 165 105 165 Polygon -8716033 true false 90 210 105 225 120 210 Polygon -8716033 true false 180 210 195 225 210 210 truck-right false 0 Polygon -7566196 true true 180 135 75 135 75 210 225 210 225 165 195 165 Polygon -8716033 true false 210 210 195 225 180 210 Polygon -8716033 true false 120 210 105 225 90 210 turtle true 0 Polygon -7566196 true true 138 75 162 75 165 105 225 105 225 142 195 135 195 187 225 195 225 225 195 217 195 202 105 202 105 217 75 225 75 195 105 187 105 135 75 142 75 105 135 105 wolf-left false 3 Polygon -6524078 true true 117 97 91 74 66 74 60 85 36 85 38 92 44 97 62 97 81 117 84 134 92 147 109 152 136 144 174 144 174 103 143 103 134 97 Polygon -6524078 true true 87 80 79 55 76 79 Polygon -6524078 true true 81 75 70 58 73 82 Polygon -6524078 true true 99 131 76 152 76 163 96 182 104 182 109 173 102 167 99 173 87 159 104 140 Polygon -6524078 true true 107 138 107 186 98 190 99 196 112 196 115 190 Polygon -6524078 true true 116 140 114 189 105 137 Rectangle -6524078 true true 109 150 114 192 Rectangle -6524078 true true 111 143 116 191 Polygon -6524078 true true 168 106 184 98 205 98 218 115 218 137 186 164 196 176 195 194 178 195 178 183 188 183 169 164 173 144 Polygon -6524078 true true 207 140 200 163 206 175 207 192 193 189 192 177 198 176 185 150 Polygon -6524078 true true 214 134 203 168 192 148 Polygon -6524078 true true 204 151 203 176 193 148 Polygon -6524078 true true 207 103 221 98 236 101 243 115 243 128 256 142 239 143 233 133 225 115 214 114 wolf-right false 3 Polygon -6524078 true true 170 127 200 93 231 93 237 103 262 103 261 113 253 119 231 119 215 143 213 160 208 173 189 187 169 190 154 190 126 180 106 171 72 171 73 126 122 126 144 123 159 123 Polygon -6524078 true true 201 99 214 69 215 99 Polygon -6524078 true true 207 98 223 71 220 101 Polygon -6524078 true true 184 172 189 234 203 238 203 246 187 247 180 239 171 180 Polygon -6524078 true true 197 174 204 220 218 224 219 234 201 232 195 225 179 179 Polygon -6524078 true true 78 167 95 187 95 208 79 220 92 234 98 235 100 249 81 246 76 241 61 212 65 195 52 170 45 150 44 128 55 121 69 121 81 135 Polygon -6524078 true true 48 143 58 141 Polygon -6524078 true true 46 136 68 137 Polygon -6524078 true true 46 130 Polygon -6524078 true true 45 129 35 142 37 159 53 192 47 210 62 238 80 237 Line -16777216 false 74 237 59 213 Line -16777216 false 59 213 59 212 Line -16777216 false 58 211 67 192 Polygon -6524078 true true 38 138 66 149 Polygon -6524078 true true 46 128 33 120 21 118 11 123 3 138 5 160 13 178 9 192 0 199 20 196 25 179 24 161 25 148 45 140 Polygon -6524078 true true 67 122 96 126 63 144 @#$#@#$#@ NetLogo 1.3beta1 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@