breed[splants splant] ;;producer 1 say Sony breed[cplants cplant] ;;producer 2 say Canon breed[b1s b1] ;;consumers for primary preference for category 1 camera like P&S or CSC breed[b2s b2] ;;consumers for primary preference for category 2 camera like DSLR b1s-own[b1_preference b1_pref_for2 b1_has_one? global-switch-tick] b2s-own[b2_preference b2_pref_for1 b2_has_one? global-switch-tick] globals[withoutcam s1_strength s2_strength c1_strength c2_strength switch_to_1 switch_to_2 switch_to_s switch_to_c buy-distance-s buy-distance-c switch-local sample-buyer buy-loc-s1 buy-loc-c1 buy-loc-s2 buy-loc-c2 buy-loc-total count-owners prev-s1 prev-s2 prev-c1 prev-c2 npv-s npv-c full-diffusion xx yy zz ww total-traffic initial-number-b2s b2-dist-mean b2-dist-stdev s1-innov-mean s2-innov-mean c1-innov-mean c2-innov-mean buy-distance-canon s2-strength-mean c1-strength-mean c2-strength-mean s1-strength-mean homogen monop full-penet low-penet very-low-penet when-monop when-homogen] to setup clear-all random-seed new-seed setup-plants setup-buyers ;; watch sample-buyer reset-ticks end to go count-without-cam ifelse stop-if-all-hasit = true [if ((withoutcam = 0) and (ticks > (full-diffusion + stop-if-all-hasit-plus - 1))) or ticks >= max-numb-ticks [ stop ]] [if ticks >= max-numb-ticks [ stop ]] move-buyers firms-innovate buyers-switch local-influence-switch buy-camera find-npv do-plots tick end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to local-influence-switch ;; min-#neigbor-switch1 or 2, local-influ-hurdle1 or 2 are not included!! if ((local-influ-switch = true) and ((remainder ticks how-often-switch) = 0)) [ ask turtles with [(breed = b1s with [b1_has_one? != "none"]) or (breed = b2s with [b2_has_one? != "none"])] [ let sw false let ss1 0 let cc1 0 let ss2 0 let cc2 0 let a 0 let b 0 let c 0 let d 0 let ee local-influ-hurdle ask b1s-on neighbors [ if b1_has_one? = "s1" [set ss1 ss1 + 1] if b1_has_one? = "c1" [set cc1 cc1 + 1] ] ask b2s-on neighbors [ if b2_has_one? = "s2" [set ss2 ss2 + 1] if b2_has_one? = "c2" [set cc2 cc2 + 1] ] let ssum ss1 + cc1 + ss2 + cc2 if ssum >= min-#-neighbor-switch [ set a ss1 / ssum set b cc1 / ssum set c ss2 / ssum set d cc2 / ssum if (a >= ee) or (b >= ee) or (c >= ee) or (d >= ee) [set sw true] ] if sw = true [ if (max (list a b c d) = a) and ((breed = b2s and b2_pref_for1 >= s1_strength) or ((breed = b1s) and (b1_has_one? = "c1") and (b1_preference >= s1_strength))) [ let krr 0 ifelse breed = b2s [set krr b2_preference] [set krr b1_preference] hatch-b1s 1 [ set switch-local switch-local + 1 set color blue + 1 set b1_preference krr set b1_pref_for2 (krr - 2 * b1-dist-stdev) set b1_has_one? "s1" set total-traffic total-traffic + 1 ] die ] if (max (list a b c d) = b) and ((breed = b2s and b2_pref_for1 >= c1_strength) or ((breed = b1s) and (b1_has_one? = "s1") and (b1_preference >= c1_strength))) [ let krr 0 ifelse breed = b2s [set krr b2_preference] [set krr b1_preference] hatch-b1s 1 [ set switch-local switch-local + 1 set color blue - 2 set b1_preference krr set b1_pref_for2 (krr - 2 * b1-dist-stdev) set b1_has_one? "c1" set total-traffic total-traffic + 1 ] die ] if (max (list a b c d) = c) and ((breed = b1s and b1_pref_for2 >= s2_strength) or ((breed = b2s) and (b2_has_one? = "c2") and (b2_preference >= s2_strength))) [ let krr 0 ifelse breed = b2s [set krr b2_preference] [set krr b1_preference] hatch-b2s 1 [ set switch-local switch-local + 1 set color red + 1 set b2_preference krr set b2_pref_for1 (krr - 2 * b2-dist-stdev) set b2_has_one? "s2" set total-traffic total-traffic + 1 ] die ] if (max (list a b c d) = d) and ((breed = b1s and b1_pref_for2 >= c2_strength) or ((breed = b2s) and (b2_has_one? = "s2") and (b2_preference >= c2_strength))) [ let krr 0 ifelse breed = b2s [set krr b2_preference] [set krr b1_preference] hatch-b2s 1 [ set switch-local switch-local + 1 set color red + 1 set b2_preference krr set b2_pref_for1 (krr - 2 * b2-dist-stdev) set b2_has_one? "c2" set total-traffic total-traffic + 1 ] die ] ] ] ] end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to buyers-switch if global-switching = true [ if (remainder ticks how-often-switch) = 1 [ ask b1s with [b1_has_one? = "s1" and (distancexy -8 0 < buy-distance-s or distancexy 8 0 < buy-distance-c)] [ ifelse distancexy -8 0 < distancexy 8 0 [if b1_pref_for2 > s2_strength [let guzu b1_pref_for2 set switch_to_2 switch_to_2 + 1 hatch-b2s 1 [ set color red + 1 set b2_preference guzu set b2_pref_for1 (b2_preference - 2 * b2-dist-stdev) set b2_has_one? "s2" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] ] [ifelse b1_pref_for2 > c2_strength [let guzu b1_pref_for2 set switch_to_2 switch_to_2 + 1 set switch_to_c switch_to_c + 1 hatch-b2s 1 [ set color red - 2 set b2_preference guzu set b2_pref_for1 (b2_preference - 2 * b2-dist-stdev) set b2_has_one? "c2" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] [if b1_preference > c1_strength [ set switch_to_c switch_to_c + 1 hatch-b1s 1 [ set color blue - 2 set global-switch-tick ticks set b1_has_one? "c1" set total-traffic total-traffic + 1 ] die ] ] ] ] ask b1s with [b1_has_one? = "c1" and (distancexy -8 0 < buy-distance-s or distancexy 8 0 < buy-distance-c) and (global-switch-tick != ticks)] [ ifelse distancexy -8 0 < distancexy 8 0 [ifelse b1_pref_for2 > s2_strength [let guzu b1_pref_for2 set switch_to_2 switch_to_2 + 1 set switch_to_s switch_to_s + 1 hatch-b2s 1 [ set color red + 1 set b2_preference guzu set b2_pref_for1 (b2_preference - 2 * b2-dist-stdev) set b2_has_one? "s2" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] [if b1_preference > s1_strength [ set switch_to_s switch_to_s + 1 hatch-b1s 1 [ set color blue + 1 set global-switch-tick ticks set b1_has_one? "s1" set total-traffic total-traffic + 1 ] die ] ] ] [if b1_pref_for2 > c2_strength [let guzu b1_pref_for2 set switch_to_2 switch_to_2 + 1 hatch-b2s 1 [ set color red - 2 set b2_preference guzu set b2_pref_for1 (b2_preference - 2 * b2-dist-stdev) set b2_has_one? "c2" set total-traffic total-traffic + 1 set global-switch-tick ticks ] die ] ] ] ask b2s with [b2_has_one? = "c2" and (distancexy -8 0 < buy-distance-s or distancexy 8 0 < buy-distance-c) and (global-switch-tick != ticks)] [ ifelse distancexy -8 0 < distancexy 8 0 [ifelse b2_preference > s2_strength [ set switch_to_s switch_to_s + 1 hatch-b2s 1 [ set color red + 1 set b2_has_one? "s2" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] [if b2_pref_for1 > s1_strength [let guzu b2_pref_for1 set switch_to_1 switch_to_1 + 1 set switch_to_s switch_to_s + 1 hatch-b1s 1 [ set color blue + 1 set b1_preference guzu set b1_pref_for2 (b1_preference - 2 * b1-dist-stdev) set b1_has_one? "s1" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] ] ] [if b2_pref_for1 > c1_strength [let guzu b2_pref_for1 set switch_to_1 switch_to_1 + 1 hatch-b1s 1 [ set color blue - 2 set b1_preference guzu set b1_pref_for2 (b1_preference - 2 * b1-dist-stdev) set b1_has_one? "c1" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] ] ] ] if (remainder ticks how-often-switch) = 1 [ ask b2s with [b2_has_one? = "s2" and (distancexy -8 0 < buy-distance-s or distancexy 8 0 < buy-distance-c) and (global-switch-tick != ticks)] [ ifelse distancexy -8 0 < distancexy 8 0 [if b2_pref_for1 > s1_strength [let guzu b2_pref_for1 set switch_to_1 switch_to_1 + 1 hatch-b1s 1 [ set color blue + 1 set b1_preference guzu set b1_pref_for2 (b1_preference - 2 * b1-dist-stdev) set b1_has_one? "s1" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] ] [ifelse b2_preference > c2_strength [ set switch_to_c switch_to_c + 1 hatch-b2s 1 [ set color red - 2 set b2_has_one? "c2" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] [if b2_pref_for1 > c1_strength [let guzu b2_pref_for1 set switch_to_1 switch_to_1 + 1 set switch_to_c switch_to_c + 1 hatch-b1s 1 [ set color blue - 2 set b1_preference guzu set b1_pref_for2 (b1_preference - 2 * b1-dist-stdev) set b1_has_one? "c1" set global-switch-tick ticks set total-traffic total-traffic + 1 ] die ] ] ] ] ] ] end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;;INNOVATE INNOVATE INNOVATE INNOVATE INNOVATE INNOVATE INNOVATE INNOVATE to firms-innovate let ff 1 if (c2-stops-innov-late = true) and (ticks >= c2-stops-innov) [set ff 2] let gg 1 if (s1-innovates-late = true) and (ticks < s1-starts-innov-at-tick) [set gg 2] if ((remainder ticks innov-freq-ticks) = 0) and (ticks > 0) [ let s1_str random-normal s1-innov-mean innov-stdev let s2_str random-normal s2-innov-mean innov-stdev let c1_str random-normal c1-innov-mean innov-stdev let c2_str random-normal c2-innov-mean innov-stdev if gg = 1 [set s1_strength min list s1_strength s1_str] set s2_strength min list s2_strength s2_str set c1_strength min list c1_strength c1_str if ff = 1 [set c2_strength min list c2_strength c2_str] ;; w/o adjustment it becomes more and more difficult to sucessfully innovate since actual strength gets lower but innov-mean does ;; not; however with the addition below after a successful innovation the innovation distribution mean for the particular ;; product/brand goes down by 5% if (gg = 1) and (s1_strength = s1_str) [set s1-innov-mean (precision (0.95 * s1-innov-mean) 3) set xx 0] if s2_strength = s2_str [set s2-innov-mean (precision (0.95 * s2-innov-mean) 3) set yy 0] if c1_strength = c1_str [set c1-innov-mean (precision (0.95 * c1-innov-mean) 3) set zz 0] if (ff = 1) and (c2_strength = c2_str) [set c2-innov-mean (precision (0.95 * c2-innov-mean) 3) set ww 0] ] end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to buy-camera ask b1s with [b1_has_one? = "none"] [ let goOn false let ss1 0 let cc1 0 let ss2 0 let cc2 0 ask b1s-on neighbors [ if b1_has_one? = "s1" [set ss1 ss1 + 1] if b1_has_one? = "c1" [set cc1 cc1 + 1] ] ask b2s-on neighbors [ if b2_has_one? = "s2" [set ss2 ss2 + 1] if b2_has_one? = "c2" [set cc2 cc2 + 1] ] let ssum ss1 + cc1 + ss2 + cc2 if (local-influ-buy = true) and (ssum != 0) and ((count turtles-on neighbors >= min-#-neighbor-switch)) [set goOn true] let x random 2 ifelse x = 0 [if ((distancexy -8 0 <= buy-distance-s) and (s1_strength <= b1_preference)) or ((goOn = true) and ((ss1 / ssum) > local-influ-hurdle) and (b1_preference > s1_strength)) [ if distancexy -8 0 > buy-distance-s [(set buy-loc-s1 buy-loc-s1 + 1) set buy-loc-total buy-loc-total + 1] set b1_has_one? "s1" set color blue + 1 set total-traffic total-traffic + 1 ]] [if ((distancexy 8 0 <= buy-distance-c) and (c1_strength <= b1_preference)) or ((goOn = true) and ((cc1 / ssum) > local-influ-hurdle) and (b1_preference > c1_strength)) [ if distancexy 8 0 > buy-distance-c [(set buy-loc-c1 buy-loc-c1 + 1) set buy-loc-total buy-loc-total + 1] set b1_has_one? "c1" set color blue - 2 set total-traffic total-traffic + 1 ]] if ((distancexy -8 0 <= buy-distance-s) and (s1_strength <= b1_preference) and (b1_has_one? = "none")) or ((goOn = true) and ((ss1 / ssum) > local-influ-hurdle) and (b1_preference > s1_strength) and (b1_has_one? = "none")) [ if distancexy -8 0 > buy-distance-s [(set buy-loc-s1 buy-loc-s1 + 1) set buy-loc-total buy-loc-total + 1] set b1_has_one? "s1" set color blue + 1 set total-traffic total-traffic + 1 ] if ((distancexy 8 0 <= buy-distance-c) and (c1_strength <= b1_preference) and (b1_has_one? = "none")) or ((goOn = true) and ((cc1 / ssum) > local-influ-hurdle) and (b1_preference > c1_strength) and (b1_has_one? = "none")) [ if distancexy 8 0 > buy-distance-c [(set buy-loc-c1 buy-loc-c1 + 1) set buy-loc-total buy-loc-total + 1] set b1_has_one? "c1" set color blue - 2 set total-traffic total-traffic + 1 ] ] ask b2s with [b2_has_one? = "none"] [ let goOn false let ss1 0 let cc1 0 let ss2 0 let cc2 0 ask b1s-on neighbors [ if b1_has_one? = "s1" [set ss1 ss1 + 1] if b1_has_one? = "c1" [set cc1 cc1 + 1] ] ask b2s-on neighbors [ if b2_has_one? = "s2" [set ss2 ss2 + 1] if b2_has_one? = "c2" [set cc2 cc2 + 1] ] let ssum ss1 + cc1 + ss2 + cc2 if (local-influ-buy = true) and (ssum != 0) and ((count turtles-on neighbors >= min-#-neighbor-switch)) [set goOn true] let x random 2 ifelse x = 0 [if ((distancexy -8 0 <= buy-distance-s) and (s2_strength <= b2_preference)) or ((goOn = true) and ((ss2 / ssum) > local-influ-hurdle) and (b2_preference > s2_strength)) [ if distancexy -8 0 > buy-distance-s [(set buy-loc-s2 buy-loc-s2 + 1) (set buy-loc-total buy-loc-total + 1)] set b2_has_one? "s2" set color red + 1 set total-traffic total-traffic + 1 ]] [if ((distancexy 8 0 <= buy-distance-c) and (c2_strength <= b2_preference)) or ((goOn = true) and ((cc2 / ssum) > local-influ-hurdle) and (b2_preference > c2_strength)) [ if distancexy 8 0 > buy-distance-c [(set buy-loc-c2 buy-loc-c2 + 1) (set buy-loc-total buy-loc-total + 1)] set b2_has_one? "c2" set color red - 2 set total-traffic total-traffic + 1 ]] if ((distancexy -8 0 <= buy-distance-s) and (s2_strength <= b2_preference) and (b2_has_one? = "none")) or ((goOn = true) and ((ss2 / ssum) > local-influ-hurdle) and (b2_preference > s2_strength) and (b2_has_one? = "none")) [ if distancexy -8 0 > buy-distance-s [(set buy-loc-s2 buy-loc-s2 + 1) (set buy-loc-total buy-loc-total + 1)] set b2_has_one? "s2" set color red + 1 set total-traffic total-traffic + 1 ] if ((distancexy 8 0 <= buy-distance-c) and (c2_strength <= b2_preference) and (b2_has_one? = "none")) or ((goOn = true) and ((cc2 / ssum) > local-influ-hurdle) and (b2_preference > c2_strength) and (b2_has_one? = "none")) [ if distancexy 8 0 > buy-distance-c [(set buy-loc-c2 buy-loc-c2 + 1) (set buy-loc-total buy-loc-total + 1)] set b2_has_one? "c2" set color red - 2 set total-traffic total-traffic + 1 ] ] end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to move-buyers ask b1s[ right random 360 ifelse (c2-stops-innov-late = true) and (b1_has_one? = "c1") and (ticks >= c2-stops-innov) and (mobility-c1 < mobility) [forward mobility-c1] [forward mobility] ] ask b2s[ right random 360 ifelse (s1-innovates-late = true) and (b2_has_one? = "s2") and (ticks < s1-starts-innov-at-tick) and (mobility-s2 < mobility) [forward mobility-s2] [forward mobility] ] end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to setup-plants ;; to make simulation simpler s2-strength-mean, c1-strength-mean, c2-strength-mean set equal to s1-strength-mean from the interface ;; ******************************************************************************************************************************** set s1-strength-mean prod-strength-mean set s2-strength-mean prod-strength-mean set c1-strength-mean prod-strength-mean set c2-strength-mean prod-strength-mean ;; ******************************************************************************************************************************** ifelse s1-innovates-late = true [set s1_strength 12] [set s1_strength random-normal s1-strength-mean strength-stdev] set s2_strength random-normal s2-strength-mean strength-stdev set c1_strength random-normal c1-strength-mean strength-stdev set c2_strength random-normal c2-strength-mean strength-stdev ;; to make simulation simpler buy-distance-canon set equal to buy-distance-sony from the interface ;; ******************************************************************** set buy-distance-canon buy-distance-sony ;; ******************************************************************** set buy-distance-s buy-distance-sony set buy-distance-c buy-distance-canon create-splants 1 [set color yellow setxy -8.0 0.] create-cplants 1 [set color green - 1 setxy 8.0 0.] set-default-shape splants "factory" set-default-shape cplants "factory" set prev-s1 0 set prev-s2 0 set prev-c1 0 set prev-c2 0 set npv-s 0 set npv-c 0 set xx 0 set yy 0 set zz 0 set ww 0 ;; to make simulations all innovation means will be equal to s1-innov-mean from the interface ;; ****************************************************************************************** set s1-innov-mean initial-innov-mean set s2-innov-mean initial-innov-mean set c1-innov-mean initial-innov-mean set c2-innov-mean initial-innov-mean ;;******************************************************************************************* set total-traffic 0 ;;******************************************************************************************* set homogen "n" set monop "n" set full-penet "n" set low-penet "n" set very-low-penet "n" set when-monop 0 set when-homogen 0 end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to setup-buyers ;; to make simulation more simple set #b2s equal to #b1s, b2-dist-mean equal to b1-dist-mean, b2-dist-stdev equal to b1-dist-stdev from interface by default ;; **************************************************************************** set initial-number-b2s initial-number-b1s set b2-dist-mean b1-dist-mean set b2-dist-stdev b1-dist-stdev ;;***************************************************************************** set withoutcam (initial-number-b1s + initial-number-b2s) set buy-loc-s1 0 set buy-loc-c1 0 set buy-loc-s2 0 set buy-loc-c2 0 set buy-loc-total 0 set switch-local 0 set switch_to_1 0 set switch_to_2 0 set switch_to_s 0 set switch_to_c 0 set full-diffusion 0 set count-owners [] create-b1s initial-number-b1s [set color white setxy random-pxcor random-pycor let prr random-normal b1-dist-mean b1-dist-stdev set b1_preference prr set b1_pref_for2 (prr - 2 * b1-dist-stdev) set b1_has_one? "none" set global-switch-tick 0 ] create-b2s initial-number-b2s [set color white setxy random-pxcor random-pycor let krr random-normal b2-dist-mean b2-dist-stdev set b2_preference krr set b2_pref_for1 (krr - 2 * b2-dist-stdev) set b2_has_one? "none" set global-switch-tick 0 ] set sample-buyer one-of turtles set-default-shape b1s "person" set-default-shape b2s "person" end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to count-without-cam let no1 count b1s with [b1_has_one? = "none"] let no2 count b2s with [b2_has_one? = "none"] set withoutcam (no1 + no2) if (full-diffusion = 0) and (withoutcam = 0) [set full-diffusion ticks] let withcam initial-number-b1s + initial-number-b2s - withoutcam set count-owners lput withcam count-owners let ts (count b1s with [b1_has_one? = "s1"] + count b2s with [b2_has_one? = "s2"]) let tc (count b1s with [b1_has_one? = "c1"] + count b2s with [b2_has_one? = "c2"]) if demo_effect = true [ set buy-distance-s (min-buy-distance + buy-distance-sony * (ts / (initial-number-b1s + initial-number-b2s))) set buy-distance-c (min-buy-distance + buy-distance-canon * (tc / (initial-number-b1s + initial-number-b2s))) ] ;;print (list buy-distance-sony buy-distance-canon) end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to find-npv ;; this module finds NPV which may not be neccessary or it may be false ;; however it also produces the t-xxx variables which are important reporters to check panetration issues let zs1 count b1s with [b1_has_one? = "s1"] let zs2 count b2s with [b2_has_one? = "s2"] let zc1 count b1s with [b1_has_one? = "c1"] let zc2 count b2s with [b2_has_one? = "c2"] let aa 0 let bb 0 let cc 0 let dd 0 set aa max list (zs1 - prev-s1) 0 set bb max list (zs2 - prev-s2) 0 set cc max list (zc1 - prev-c1) 0 set dd max list (zc2 - prev-c2) 0 set npv-s npv-s + aa * s1_strength / (1.005 ^ xx) + bb * s2_strength / (1.005 ^ yy) set npv-c npv-c + cc * c1_strength / (1.005 ^ zz) + dd * c2_strength / (1.005 ^ ww) set prev-s1 zs1 set prev-s2 zs2 set prev-c1 zc1 set prev-c2 zc2 set xx xx + 1 set yy yy + 1 set zz zz + 1 set ww ww + 1 ;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx let tot1 (count b1s with [b1_has_one? = "s1"]) + (count b1s with [b1_has_one? = "c1"]) let tot2 (count b2s with [b2_has_one? = "s2"]) + (count b2s with [b2_has_one? = "c2"]) let totson (count b1s with [b1_has_one? = "s1"]) + (count b2s with [b2_has_one? = "s2"]) let totcan (count b1s with [b1_has_one? = "c1"]) + (count b2s with [b2_has_one? = "c2"]) let penet (count b1s with [b1_has_one? = "s1"]) + (count b2s with [b2_has_one? = "s2"]) + (count b1s with [b1_has_one? = "c1"]) + (count b2s with [b2_has_one? = "c2"]) if (ticks >= max-numb-ticks - 2) and ((tot1 < 10) or (tot2 < 10)) [set homogen "y"] if (ticks >= max-numb-ticks - 2) and ((totson < 10) or (totcan < 10)) [set monop "y"] if (ticks >= max-numb-ticks - 2) and (penet > (initial-number-b1s + initial-number-b2s - 10)) [set full-penet "y"] if (ticks >= max-numb-ticks - 2) and (penet < (initial-number-b1s + initial-number-b2s - 40)) [set low-penet "y"] if (ticks >= max-numb-ticks - 2) and (penet < (initial-number-b1s + initial-number-b2s - 70)) [set very-low-penet "y"] if when-homogen = 0 and tot1 > 10 and tot2 > 10 [set when-homogen 1] if when-monop = 0 and totson > 10 and totcan > 10 [set when-monop 1] if when-homogen = 1 and (tot1 < 10 or tot2 < 10) [set when-homogen ticks] if when-monop = 1 and (totson < 10 or totcan < 10) [set when-monop ticks] end ;;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx to do-plots set-current-plot "Diffusion curve: # of buyers with digicam" ;;set-plot-x-range 0 5000 set-plot-y-range 0 initial-number-b1s + initial-number-b2s set-current-plot-pen "W/o cams" plot initial-number-b1s + initial-number-b2s - withoutcam set-current-plot "Diffusion: category 1" set-plot-y-range 0 initial-number-b1s + initial-number-b2s set-current-plot-pen "total1" plot (count b1s with [b1_has_one? = "s1"]) + (count b1s with [b1_has_one? = "c1"]) set-current-plot "Diffusion: category 2" set-plot-y-range 0 initial-number-b1s + initial-number-b2s set-current-plot-pen "total2" plot (count b2s with [b2_has_one? = "s2"]) + (count b2s with [b2_has_one? = "c2"]) set-current-plot "Diffusion: Brand 1 (Sony)" set-plot-y-range 0 initial-number-b1s + initial-number-b2s set-current-plot-pen "brand1" plot (count b1s with [b1_has_one? = "s1"]) + (count b2s with [b2_has_one? = "s2"]) set-current-plot "Diffusion: Brand 2 (Canon)" set-plot-y-range 0 initial-number-b1s + initial-number-b2s set-current-plot-pen "brand2" plot (count b1s with [b1_has_one? = "c1"]) + (count b2s with [b2_has_one? = "c2"]) end @#$#@#$#@ GRAPHICS-WINDOW 887 10 1648 617 21 16 17.47 1 10 1 1 1 0 1 1 1 -21 21 -16 16 1 1 1 ticks 30.0 BUTTON 28 20 109 54 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 128 22 209 56 NIL go T 1 T OBSERVER NIL NIL NIL NIL 1 MONITOR 888 624 939 669 sony 1 count b1s with [b1_has_one? = \"s1\"] 17 1 11 MONITOR 943 624 995 669 sony 2 count b2s with [b2_has_one? = \"s2\"] 17 1 11 SLIDER 23 525 158 558 initial-number-b1s initial-number-b1s 0 100 90 1 1 NIL HORIZONTAL SLIDER 25 474 155 507 buy-distance-sony buy-distance-sony 0 20 7 .1 1 NIL HORIZONTAL PLOT 389 10 818 291 Diffusion curve: # of buyers with digicam time NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "W/o cams" 1.0 0 -10649926 true "" "" SLIDER 165 334 299 367 initial-innov-mean initial-innov-mean 2 12 10 0.2 1 NIL HORIZONTAL MONITOR 887 674 940 719 canon 1 count b1s with [b1_has_one? = \"c1\"] 17 1 11 MONITOR 944 674 996 719 canon 2 count b2s with [b2_has_one? = \"c2\"] 17 1 11 BUTTON 221 23 303 56 NIL go NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 25 371 157 404 innov-stdev innov-stdev 0 2 0.7 0.1 1 NIL HORIZONTAL SLIDER 162 525 295 558 b1-dist-mean b1-dist-mean 8 12 10 .1 1 NIL HORIZONTAL SLIDER 22 563 156 596 b1-dist-stdev b1-dist-stdev 0 2 1 .1 1 NIL HORIZONTAL MONITOR 1197 675 1319 720 has1 but switch global switch_to_1 + switch_to_2 + switch_to_s + switch_to_c 17 1 11 MONITOR 887 724 942 769 Total 1 (count b1s with [b1_has_one? = \"s1\"]) + (count b1s with [b1_has_one? = \"c1\"]) 17 1 11 MONITOR 947 725 997 770 Total 2 (count b2s with [b2_has_one? = \"s2\"]) + (count b2s with [b2_has_one? = \"c2\"]) 17 1 11 MONITOR 1000 624 1057 669 Total sony (count b1s with [b1_has_one? = \"s1\"]) + (count b2s with [b2_has_one? = \"s2\"]) 17 1 11 MONITOR 999 674 1059 719 Total canon (count b1s with [b1_has_one? = \"c1\"]) + (count b2s with [b2_has_one? = \"c2\"]) 17 1 11 PLOT 390 303 600 459 Diffusion: category 1 time NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "total1" 1.0 0 -13345367 true "" "" PLOT 609 302 818 458 Diffusion: category 2 time NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "total2" 1.0 0 -2674135 true "" "" PLOT 389 463 601 618 Diffusion: Brand 1 (Sony) time NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "brand1" 1.0 0 -9276814 true "" "" PLOT 610 461 819 617 Diffusion: Brand 2 (Canon) time NIL 0.0 10.0 0.0 10.0 true false "" "" PENS "brand2" 1.0 0 -16777216 true "" "" SLIDER 23 653 154 686 local-influ-hurdle local-influ-hurdle .51 0.99 0.51 .01 1 NIL HORIZONTAL MONITOR 1074 675 1192 720 has1 but switch local switch-local 17 1 11 SLIDER 163 617 294 650 min-#-neighbor-switch min-#-neighbor-switch 2 8 2 1 1 NIL HORIZONTAL SWITCH 26 202 166 235 local-influ-switch local-influ-switch 0 1 -1000 SWITCH 27 129 168 162 stop-if-all-hasit stop-if-all-hasit 1 1 -1000 SLIDER 26 334 160 367 innov-freq-ticks innov-freq-ticks 1 500 10 10 1 NIL HORIZONTAL SWITCH 26 166 168 199 global-switching global-switching 0 1 -1000 SLIDER 392 631 524 664 mobility mobility 1 5 3 1 1 NIL HORIZONTAL SWITCH 170 166 307 199 demo_effect demo_effect 0 1 -1000 SWITCH 169 202 307 235 local-influ-buy local-influ-buy 0 1 -1000 MONITOR 1324 675 1442 720 buy new due peer pres buy-loc-total 17 1 11 SLIDER 25 616 157 649 how-often-switch how-often-switch 1 100 10 1 1 NIL HORIZONTAL SLIDER 163 474 295 507 min-buy-distance min-buy-distance 0.1 5 0.3 0.1 1 NIL HORIZONTAL MONITOR 1074 626 1191 671 NPV Sony precision npv-s 4 17 1 11 MONITOR 1198 626 1318 671 NPV Canon precision npv-c 4 17 1 11 SLIDER 27 422 158 455 s1-starts-innov-at-tick s1-starts-innov-at-tick 1 2001 451 50 1 NIL HORIZONTAL SLIDER 29 77 166 110 max-numb-ticks max-numb-ticks 50 5000 1000 50 1 NIL HORIZONTAL MONITOR 1000 724 1059 769 Total w cam (count b1s with [b1_has_one? = \"s1\"]) + (count b2s with [b2_has_one? = \"s2\"]) + (count b1s with [b1_has_one? = \"c1\"]) + (count b2s with [b2_has_one? = \"c2\"]) 17 1 11 MONITOR 1324 627 1441 672 Full diffusion @ tick full-diffusion 17 1 11 SLIDER 27 286 163 319 prod-strength-mean prod-strength-mean 8 12 11 0.1 1 NIL HORIZONTAL SLIDER 167 286 301 319 strength-stdev strength-stdev 0.1 2 1 0.1 1 NIL HORIZONTAL SLIDER 539 630 672 663 mobility-s2 mobility-s2 0 5 1 1 1 NIL HORIZONTAL SLIDER 170 130 307 163 stop-if-all-hasit-plus stop-if-all-hasit-plus 0 1000 0 50 1 NIL HORIZONTAL SWITCH 26 238 165 271 s1-innovates-late s1-innovates-late 1 1 -1000 SLIDER 165 423 297 456 c2-stops-innov c2-stops-innov 1 2001 451 50 1 NIL HORIZONTAL SWITCH 169 238 305 271 c2-stops-innov-late c2-stops-innov-late 1 1 -1000 SLIDER 680 629 814 662 mobility-c1 mobility-c1 0 5 1 1 1 NIL HORIZONTAL MONITOR 1449 674 1571 719 NIL total-traffic 17 1 11 @#$#@#$#@ ## WHAT IS IT? This model simulates technology diffusion. It postulates a duopoly with heterogeneous consumers and includes several interface variables that control * the number of buyers and their preference distribution; * buyers’ sensitivity to local or global social pressures; * the frequency and distribution of innovation activity; * firms' advertising efficiency; * buyers' mobility (a proxy for network randomness). The model outputs the overall technology diffusion curve and diffusion curves for the competing brands and products. Also, it reports the effect of local/global social pressures on technology adoption decisions. ## HOW IT WORKS **FIRMS:** The motivation for this model was the digital camera industry. The program creates a market with two firms (or brands; _s_, say _Sony_, and _c_, say _Canon_) at fixed locations. Both firms produce two types of products, 1 and 2. At setup initial reserve prices are defined plus the radius within which buyers can acquire information about the products and brands. If switch _demo___effect_ is on this radius proportionally increases with the brand’s diffusion in the total population, otherwise it remains constant. **BUYERS:** In the market there are two types of buyers: type I and II (in the code _b1s_ and _b2s_). Buyers are created at a random initial locations. _b1s_ have a preference for product 1 and like product 2 less while _b2s_ have a preference for product 2 and a secondary taste for product 1. The total number of buyers is constant throughout a simulation however their types may change . At every tick buyers move in a random direction (360 degrees) certain number of squares forward, defined by an input variable named _mobility_. **INNOVATION:** Firms innovate according to a regular schedule. Innovation may or may not be successful. If it is, the producer's reserve price of the product in question diminishes. **FIRST TIME PURCHASE:** At every tick the program considers those who do not own a product yet and checks the following: * Is the player in a buying distance from a producer and if yes does his reserve price for the product of his primary preference exceed the producer's reserve price? If both conditions apply then the player will buy the product. * If the _local-influ-buy_ switch is on: is peer pressure high enough in the potential consumer's neighborhood and do reserve prices allow purchase? If yes then due to local social pressures the player will buy the majority product even if he is not in buying distance from the producer. If the _local-influ-buy_ switch is on the above conditions are checked in a random order. **SWITCHING DUE TO GLOBAL PRESSURES:** The program regularly checks (according to variable _how-often-switch_) if those who already purchased a product are within buying distance of a brand AND if they are either ready (reserve prices allow) to switch types AND brands or they are ready to switch only brands. Under favorable conditions the player will switch brands and/or products. **SWITCHING DUE TO PEER (LOCAL) PRESSURES:** The program regularly checks if there is a dominant product/brand in the neighborhood of consumers who already own a product. If yes, and reserve prices allow, consumers owning a minority brand/product will cave in to peer-pressure and switch brand and/or product type, no matter of their location. ## HOW TO USE IT **SWITCHES:** _**stop-if-all-hasit**_ When on, simulation stops if either all consumers have a product or the simulation runs out of time [i.e. ticks >= 10,000]. When off, simulation stops only when the simulation time expired [ticks >= 10,000], i.e. switching will continue even if new purchases stop. **_demo___effect_** When on _buy-distance-s_ and _buy-distance-c_ proportionally increase with the brand’s diffusion in the total population [NB: not within owners only!] within the same simulation. Otherwise they are constant interface input parameters. _**global-switching**_ When on the program checks if those who already purchased a product are within buying distance of a brand AND if they are ready to switch types and/or brands. When off this type of switching is impossible after purchase. _**local-influ-switch**_ When on, the routine considers those who already own a camera and checks if in the 8-cell neighborhood of an owner * the total number of neighbors >= _min-#-neighbor-switch_ AND * the proportion of a product > _local-influ-hurdle_ AND * reserve prices allow switching. If all these apply then the consumer who owns a minority brand/product in a neighborhood will cave in to peer-pressure and switch brand and/or type. _**local-influ-buy**_ When on, a first time buyer will consider buying the product even if he is not in buying distance due to local pressure (conditions are the same as with _local-influ-switch_); when off, local peer pressure will not affect first time purchase. **SLIDERS:** _**initial-number-b1s, initial-number-b2s**_ Buyers are heterogeneous: either type I or type II (b1s and b2s); they are created at random locations. The difference is that type I has primarily a taste for product 1 and a secondary preference for product 2 while type II has a primary preference for product 2 and a secondary taste for product 1. These sliders specify the initial number of type I and type II buyers, minimum 0, maximum 100 each. When switching is allowed the proportion of the different types will change while the aggregate number of costumers remains the same. _**b1-dist-mean, b2-dist-mean, b1-dist-stdev, b2-dist-stdev**_ Parameters of the normal distribution functions that the code uses to generate individual buyers' reserve prices for the two different products. For example an individual type I buyer's reserve price for product 1 (in the code: _b1_ _ _preference_) is a random draw from N(_b1-dist-mean, b1-dist-stdev_) and his reserve price for product 2 (in the code: _b1_ _ _pref_ _ _for2_) is equal to _b1___preference_ – 2*_b1-dist-stdev_. Reserve prices for a type II buyer are generated similarly by using _b2-dist-mean_ and _b2-dist-stdev_. _**mobility**_ _Mobility_ determines the number of squares playes move in a random direction per tick. _Mobility_ is between 1 and 5. _**innov-freq-ticks**_ Determines how frequently firms innovate. Its value is between 1 and 500 ticks. _**s1-innov-mean, s2-innov-mean, c1-innov-mean, c2-innov-mean, innov-stdev**_ Parameters that determine if an innovation was successful or not. In a round when firms innovate the code produces four random draws: one from N(_s1-innov-mean, innov-stdev_), a second from N(_s2-innov-mean, innov-stdev_), etc. If the first random number is less that the producer's current reserve price for s1 [_s1_ _ _strength_], then _s1_ _ _strength_ will be replaced by the first number i.e. the innovation was successful. If the second number is less than _s2___strength_, then it will be replaced by the lower number, etc. The means are between 6 and 10, the standard deviation is between 0 and 2. _**buy-distance-canon, buy-distance-sony**_ These parameters define the radius in which buyers can buy without local social pressure. Outside of this radius and without group pressure buyers cannot buy even if their reserve prices would allow (because, say, they don’t have sufficient information about the product). These parameters remain constant within a simulation except when _demo___effect_ is true; then they change, say due to advertising, according to a formula specified in the sub-routine called _count-without-cam_. Values are between 0 and 20. _**local-influ-hurdle, min-#-neighbor-switch, how-often-switch**_ If buyers are influenced by their peers, i.e. switch _local-influ-switch_ is on, then the code considers those who already own a camera and checks in every (12 - _how-often-switch_) tick if * in the 8-cell neighborhood of an owner the total number of neighbors >= _min-#-neighbor-switch_, * the proportion of a product > _local-influ-hurdle_ [which has to be > 0.5], * reserve prices allow the switch [switch preference exceeds product strength]. If all these apply then the owner who owns a minority brand/product will cave in to peer-pressure and switch to the majority brand and/or type. _how-often-switch_ is between 1 (= players consider switching in every 11 tick) and 10 (= players consider switching in every other tick). _local-influ-hurdle_ is between 0.51 and 0.99, and _min-#-neighbor-switch_ is between 2 and 8. ## THINGS TO NOTICE, THINGS TO TRY This section could give some ideas of things for the user to notice while running the model. ## EXTENDING THE MODEL This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc. ## NETLOGO FEATURES This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features. ## RELATED MODELS This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest. ## CREDITS AND REFERENCES Author: Peter Bodo Department of Economics and Finance Southern Connecticut State University 501 Crescent Street New Haven, CT 06515 Email: bodop1@southernct.edu Voice: 203 392-5617 @#$#@#$#@ 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 factory false 0 Rectangle -7500403 true true 76 194 285 270 Rectangle -7500403 true true 36 95 59 231 Rectangle -16777216 true false 90 210 270 240 Line -7500403 true 90 195 90 255 Line -7500403 true 120 195 120 255 Line -7500403 true 150 195 150 240 Line -7500403 true 180 195 180 255 Line -7500403 true 210 210 210 240 Line -7500403 true 240 210 240 240 Line -7500403 true 90 225 270 225 Circle -1 true false 37 73 32 Circle -1 true false 55 38 54 Circle -1 true false 96 21 42 Circle -1 true false 105 40 32 Circle -1 true false 129 19 42 Rectangle -7500403 true true 14 228 78 270 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 0 Rectangle -7500403 true true 151 225 180 285 Rectangle -7500403 true true 47 225 75 285 Rectangle -7500403 true true 15 75 210 225 Circle -7500403 true true 135 75 150 Circle -16777216 true false 165 76 116 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 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.0.3 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go initial-number-b1s + initial-number-b2s - withoutcam total-traffic setup go initial-number-b1s + initial-number-b2s - withoutcam total-traffic setup go homogen monop full-penet low-penet very-low-penet when-homogen when-monop initial-number-b1s + initial-number-b2s - withoutcam setup go initial-number-b1s + initial-number-b2s - withoutcam setup go homogen monop full-penet low-penet very-low-penet when-homogen when-monop initial-number-b1s + initial-number-b2s - withoutcam setup go homogen monop full-penet low-penet very-low-penet when-homogen when-monop initial-number-b1s + initial-number-b2s - withoutcam setup go homogen monop full-penet low-penet very-low-penet when-homogen when-monop initial-number-b1s + initial-number-b2s - withoutcam setup go homogen monop full-penet low-penet very-low-penet when-homogen when-monop initial-number-b1s + initial-number-b2s - withoutcam setup go homogen monop full-penet low-penet very-low-penet when-homogen when-monop initial-number-b1s + initial-number-b2s - withoutcam @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 1.0 0.0 0.0 1 1.0 0.0 0.2 0 1.0 0.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 0 @#$#@#$#@