globals [ price.pcs ; purchase price P1 price.wsl ; wholesale price P2 price.ctr ; contract price Pr price.deal ; price of making deal num-product ; product number per a producer cost.low ; cost of producing goods with low qos Cl cost.high ; cost of producing goods with high qos Cs cost.c.high ; cost of producing goods with high qos by contracted producer C's cost.ivg ; cost of investigating by contracted seller Ci rho ; stochastic number ρ expect.n ; non-contracted producer expect value between trusted and nontrusted produce expect.c ; contracted producer expect value between trusted and nontrusted production expect ; expect value qos.p ; positive factor of qos d+ qos.n ; negative factor of qos d- qos.m ; minimal qos - qos_min mean.qos ; average qos of producers mean.p.c ; average profit of contracted producer mean.p.n ; average profit of non-contracted producer mean.r.s.c ; average profit rate of contracted seller mean.r.s.n ; average profit rate of non-contracted seller sample.p.f.m ; amount of nontrusted contracted producer who is found by sampled seller threshold.p.a1 ; active factor of producer's threshold s1+ threshold.p.a2 ; active factor of producer's threshold s2+ threshold.p.i1 ; inactive factor of producer's threshold s1- threshold.p.i2 ; inactive factor of producer's threshold s2- inspect-seller ; the number of seller inspected inspect-producer ; the number of producer inspected fine.s ; seller's fine per unit ratio.c.p ; contract production ratio ] breed [ producers producer ] breed [ sellers seller ] breed [ regulators regulator ] breed [ inspectors inspector ] undirected-link-breed [ contracts contract ] ; link producer and seller undirected-link-breed [ products product ] ; link producer and inspector undirected-link-breed [ goods good ] ; link seller and inspector undirected-link-breed [ p.insps p.insp ] ; link regulator and producer undirected-link-breed [ s.insps s.insp ] ; link regulator and seller producers-own [ contract.f ; 1 contracted producer wealth.p ; wealth of producer qos ; qos of producer producer.m ; producer is matched with seller scam ; 1 producer nontrusted, 0 producer trusted sample.p ; 1 producer is sampled by regulator sample.p.f ; 1 nontrusted contracted producer is found by sampled seller profit.p ; profit of producer profit.r.f ; profit rate of producer threshold.p ; transforming threshold value between two kinds of producers transform.f ; 1 producer has transformed transform.f.c ; 1 non-contracted producer wants to transform to contracted producer ] sellers-own [ contract.s ; 1 contracted seller num-match ; the number of producers match with one seller wealth.s ; wealth of seller qos ; qos of seller sample.s ; 1 seller is sampled by regulator sample.s.f ; 1 sampled seller is found cheating profit.s ; profit of seller profit.r.s ; profit rate of seller threshold.s ; transforming threshold value between two kinds of sellers transform.s.c ; 1 non-contracted seller want to transform to contracted seller transform.s.n ; 1 contracted seller want to transform to non-contracted seller ] regulators-own [ qualification.r.g ; the regulator's goal on the qualified rate of inspections budget.g ; budget constraint on regulator's inspection ] inspectors-own [ qos ; quality-of-service ] ;;;;;;;;;;;;;;;;;;;;;;;; ;;; Setup procedures ;;; ;;;;;;;;;;;;;;;;;;;;;;;; to setup ca setup-initialize set-default-shape producers "factory" set-default-shape sellers "building store" ask patches [set pcolor green] setup-producers setup-sellers setup-match setup-regulators set inspect-seller ceiling (inspect-rate.s * num-seller) set inspect-producer ceiling (inspect-rate.p * num-producer) let a (cost.high - cost.low - (fine-producer * inspect-producer / num-producer)) ; setting k1 let b (cost.high - cost.low) set expect.n a / b reset-ticks end ;;; Procedures in setup to setup-initialize set num-product 50 set cost.low 1 set cost.high 1.5 set cost.c.high 1.4 set cost.ivg 0.5 set qos.p 0.1 set qos.n 0.11 set qos.m 0.1 set price.deal cost.c.high set price.ctr lambda * cost.c.high + (1 - lambda) * price.deal set threshold.p.a1 0.1 set threshold.p.a2 0.05 set threshold.p.i1 0.15 set threshold.p.i2 0.2 end to setup-producers create-producers num-producer [ setxy random-xcor random-ycor set color yellow set size 1.2 set contract.f 0 set producer.m 0 set qos 0.01 set scam 0 set wealth.p 100 set threshold.p 0.1 set transform.f 0 set transform.f.c 0 ] end to setup-sellers create-sellers num-seller [ setxy random-xcor random-ycor set color yellow set size 2.2 set qos 0.01 set contract.s 0 set wealth.s 1000 set threshold.s 0.2 set transform.s.c 0 set transform.s.n 0 ] end to setup-match if contractual? ; switch on [ ask one-of sellers [ set color blue set contract.s 1 ] ask n-of (round (num-producer / num-seller)) producers ; generate contracted seller [ create-contract-with min-one-of (sellers with [ contract.s = 1 ]) [ distance myself ] [ set color red ] set contract.f 1 ] ] ask producers with [ contract.f = 0 ] [ create-contract-with min-one-of (sellers with [ contract.s = 0 ]) [ distance myself ] ] ask sellers [ set num-match (count contract-neighbors) ] end to setup-regulators set-default-shape regulators "person police" create-regulators num-inspect [ set size 1.5 set color red move-to one-of patches with [ pycor > 0 and pycor < 31 and pxcor > 0 and pxcor < 31 ] ] end ;;;;;;;;;;;;;;;;;;;;;;;; ;;; Go procedures ;;; ;;;;;;;;;;;;;;;;;;;;;;;; to go ;; generate purchase price P1 set price.pcs lambda * cost.high + (1 - lambda) * cost.low + ( random-normal 0.35 0.35 ) if (ticks = 100) [ stop ] ;; if (count producers with [ contract.f = 0 ] = 0) ;; [ stop ] ask producers with [ contract.f = 0 ] [ if any? contract-neighbors [ set expect expect.n do-produce ] ] ask producers with [ contract.f = 1 ] [ if any? contract-neighbors [ define-expect.c do-produce ] ] ;; calculate the qualified rate of producers do-qualified-rate ;; inspect producers do-monitor-producer ;; inspect sellers do-monitor-seller ask producers [ update-qos.producer update-wealth.producer ] set mean.qos mean [ qos ] of producers ;; contracted producer's transformation decision if any? producers with [ contract.f = 0 ] [ ask producers with [ contract.f = 1 ] [ do-compare-profit.producer.c ] ] ;; non-contracted producer's transformation decision if any? producers with [ contract.f = 1 ] [ ask producers with [ contract.f = 0 and transform.f = 0 ] [ do-compare-profit.producer.n ] ] ;; transaction price of contracted producer in the last term P1'(t-1) update-price.deal ;; generate contract price Pr set price.ctr lambda * cost.c.high + (1 - lambda) * price.deal ask sellers [ update-qos.seller update-wealth.seller ] ;; non-contracted seller's transformation decision if any? sellers with [ contract.s = 1 ] [ ask sellers with [ contract.s = 0 ] [ do-compare-profit.seller.n ] ] ;; contracted seller's transformation decision if any? sellers with [ contract.s = 0 ] [ ask sellers with [ contract.s = 1 ] [ do-compare-profit.seller.c ] ] do-transform-seller ask inspectors [ die ] ask producers with [contract.f = 0] [ ask my-links [die] ] ;; producer match with seller do-match ;; calculate contract production ratio do-contract-production-ratio ;; restore agent's relevant variables do-restore do-plots1 do-plots2 tick end ;;; Procedures in go to define-expect.c ; setting k2 let c (cost.c.high - cost.low - fine-producer * inspect-producer / num-producer) let d (fine-deposit * inspect-seller * num-inspect) let f (num-seller * num-product * [ num-match ] of (one-of contract-neighbors)) let h (fine-producer + fine-deposit) * inspect-seller * inspect-producer * num-inspect let i (num-seller * num-product * [ num-match ] of (one-of contract-neighbors) * num-producer) let j (cost.c.high - cost.low) set expect.c (c - d / f + h / i) / j set expect expect.c end to do-produce set rho random-float 1 let expect.difference lambda * expect + (1 - lambda) * rho ; expected profit difference set price.wsl price.pcs * (1 + delta) ; generate wholesale price P2 let sellerID [ who ] of one-of contract-neighbors ifelse expect.difference > qos [ set scam 1 hatch-inspectors num-product [ set qos (qos - qos.m) set hidden? true create-product-with myself ; link inspectoretables with producers create-good-with (seller sellerID) ] ] [ set scam 0 hatch-inspectors num-product [ set qos (qos + qos.m) set hidden? true create-product-with myself create-good-with (seller sellerID) ] ] end to do-qualified-rate ask regulators [ let qr count inspectors with [ qos > mean.qos ] let tv count inspectors set qualification.r.g (qr / tv) ] end to do-monitor-producer ; inspect producers, sellers and inspectoretables ask n-of inspect-producer producers [ if any? contract-neighbors [ set sample.p 1 set color red ask producers in-radius 3 [ set color red ] ] ] end to do-monitor-seller ; inspect sellers and inspectoretables ask n-of inspect-seller sellers [ if any? contract-neighbors [ set sample.s 1 set color red ifelse contract.s = 1 [ ask n-of num-inspect good-neighbors ; inspect contracted seller's inspectoretables [ if qos < qos.m [ ask good-neighbors [ set sample.s.f 1 ] ask product-neighbors [ set color red set sample.p.f 1 ] ] ] set sample.p.f.m (count contract-neighbors with [ sample.p.f = 1 ]) ] [ ask n-of num-inspect good-neighbors ; inspect non-contracted seller's inspectoretables [ if qos < qos.m [ ask good-neighbors [ set sample.s.f 1 ] ] ] ] ] ] end to update-qos.producer ; to change qos of producers ifelse color = red [ set qos (1 - qos.n) * qos + qos.m ] [ set qos (1 - qos.p) * qos + qos.p * qos.m ] end to update-qos.seller ; to change qos of sellers ifelse color = red [ set qos (1 - qos.n) * qos + qos.m ] [ set qos (1 - qos.p) * qos + qos.p * qos.m ] end to update-wealth.producer ; to change wealth of producers update-profit.p.non update-profit.p.con set wealth.p profit.p + wealth.p end to update-profit.p.non ; non-contracted producer's profit ifelse any? contract-neighbors [ if contract.f = 0 [ ifelse scam = 0 ; producing trusted products [ set profit.p num-product * (price.pcs - cost.high) ] [ ifelse sample.p = 1 [ set profit.p num-product * (price.pcs - cost.low - fine-producer) ] [ set profit.p num-product * (price.pcs - cost.low) ] ] ] ] [ set profit.p 0 ] end to update-profit.p.con ; contracted producer's profit ifelse any? contract-neighbors [ if contract.f = 1 [ ifelse price.pcs > price.ctr ; P1 > Pr [ ifelse scam = 0 [ set profit.p num-product * (price.pcs - cost.c.high) ] [ ifelse sample.p = 1 [ ifelse sample.p.f = 1 [ set profit.p num-product * (price.pcs - cost.low - fine-producer - fine-deposit) ] [ set profit.p num-product * (price.pcs - cost.low - fine-producer) ] ] [ ifelse sample.p.f = 1 [ set profit.p num-product * (price.pcs - cost.low - fine-deposit) ] [ set profit.p num-product * (price.pcs - cost.low) ] ] ] ] [ ; P1 <= Pr ifelse scam = 0 [ set profit.p num-product * (price.ctr - cost.c.high) ] [ ifelse sample.p = 1 [ ifelse sample.p.f = 1 [ set profit.p num-product * (price.ctr - cost.low - fine-producer - fine-deposit) ] [ set profit.p num-product * (price.ctr - cost.low - fine-producer) ] ] [ ifelse sample.p.f = 1 [ set profit.p num-product * (price.ctr - cost.low - fine-deposit) ] [ set profit.p num-product * (price.ctr - cost.low) ] ] ] ] ] ] [ set profit.p 0 ] end to update-price.deal ifelse price.ctr < price.pcs [ set price.deal price.pcs ] [ set price.deal price.ctr ] end to do-compare-profit.producer.c ; contracted producer's transformation decision set rho random-float 1 if any? (producers in-radius 3) with [ contract.f = 0 ] [ set mean.p.n mean [ profit.p ] of ((producers in-radius 3) with [ contract.f = 0 ]) ] ifelse profit.p < mean.p.n [ if mean.p.n = 0 [ set mean.p.n 0.001 ] let ψ1 (abs (lambda * (mean.p.n - profit.p) / mean.p.n) + (1 - lambda) * rho) ifelse ψ1 > threshold.p [ ask my-links [ die ] set contract.f 0 set transform.f 1 set producer.m 0 set threshold.p 0.1 ] [ ifelse sample.p.f = 1 [ set threshold.p (1 - qos) * threshold.p ] ; (1 - threshold.p.i2) * threshold.p ] [ set threshold.p (1 - qos) * threshold.p + threshold.p ] ; (1 - threshold.p.i1) * threshold.p ] ] ] [ ifelse sample.p.f = 1 [ set threshold.p (1 - qos) * threshold.p ] ; (1 - threshold.p.a2) * threshold.p + threshold.p.a2 ] [ set threshold.p (1 - qos) * threshold.p + threshold.p ] ; (1 - threshold.p.a1) * threshold.p + threshold.p.a1 ] ] end to do-compare-profit.producer.n ; non-contracted producer's transformation decision set rho random-float 1 ask my-links [ die ] set producer.m 0 if any? (producers in-radius 3) with [ contract.f = 1 ] [ set mean.p.c mean [ profit.p ] of (producers in-radius 3) with [ contract.f = 1 ] ] ifelse profit.p < mean.p.c [ if mean.p.c = 0 [ set mean.p.c 0.001 ] let ψ2 (abs (lambda * (mean.p.c - profit.p) / mean.p.c) + (1 - lambda) * rho) ifelse ψ2 > threshold.p [ set transform.f.c 1 ] [ set threshold.p (1 - qos) * threshold.p ] ; (1 - threshold.p.i1) * threshold.p ] ] [ set threshold.p (1 - qos) * threshold.p + threshold.p ; (1 - threshold.p.a1) * threshold.p + threshold.p.a1 ] end to update-wealth.seller ; to change wealth of seller ifelse contract.s = 0 [ update-profit.s.non ] [ update-profit.s.con ] set wealth.s profit.s + wealth.s end to update-profit.s.non ; non-contracted seller's profit ifelse num-match > 0 [ ifelse sample.s.f = 1 [ set fine.s fine-seller set threshold.s (1 - qos) * threshold.s ] [ set fine.s 0 set threshold.s (1 - qos) * threshold.s + threshold.s ] set profit.s num-product * num-match * (price.wsl - price.pcs - fine.s) set profit.r.s profit.s / (num-product * num-match * price.wsl) ] [ set profit.s 0 set profit.r.s 0 ] end to update-profit.s.con ; contracted seller's profit ifelse num-match > 0 [ if price.pcs > price.ctr ; P1 > Pr [ ifelse sample.s.f = 1 [ let s1 num-product * num-match * (price.wsl - price.pcs - fine-seller) set profit.s (s1 - cost.ivg * num-match + num-product * sample.p.f.m * fine-deposit) set profit.r.s profit.s / (num-product * num-match * price.wsl) set threshold.s (1 - qos) * threshold.s ] [ set profit.s num-product * num-match * (price.wsl - price.pcs) set profit.r.s profit.s / (num-product * num-match * price.wsl) set threshold.s (1 - qos) * threshold.s + threshold.s ] ] if price.pcs < price.ctr ; P1 < Pr [ ifelse sample.s.f = 1 [ let s2 num-product * num-match * (price.wsl - price.ctr - fine-seller) set profit.s (s2 - cost.ivg * num-match + num-product * sample.p.f.m * fine-deposit) set profit.r.s profit.s / (num-product * num-match * price.wsl) set threshold.s (1 - qos) * threshold.s ] [ set profit.s num-product * num-match * (price.wsl - price.ctr) set profit.r.s profit.s / (num-product * num-match * price.wsl) set threshold.s (1 - qos) * threshold.s + threshold.s ] ] ] [ set profit.s 0 set profit.r.s 0 ] end to do-compare-profit.seller.n ; non-contracted seller's transformation decision set rho random-float 1 ask my-links [ die ] if any? sellers with [ contract.s = 1 ] [ set mean.r.s.c mean [ profit.r.s ] of sellers with [ contract.s = 1 ] ] if profit.r.s < mean.r.s.c [ if mean.r.s.c = 0 [ set mean.r.s.c 0.001 ] let u2 (abs (lambda * (mean.r.s.c - profit.r.s) / mean.r.s.c) + (1 - lambda) * rho) if u2 > threshold.s [ set transform.s.c 1 ] ] end to do-compare-profit.seller.c ; contracted seller's transformation decision set rho random-float 1 if any? sellers with [ contract.s = 0 ] [ set mean.r.s.n mean [ profit.r.s ] of sellers with [ contract.s = 0 ] if profit.r.s < mean.r.s.n [ if mean.r.s.n = 0 [ set mean.r.s.n 0.001 ] let u1 (abs (lambda * (mean.r.s.n - profit.r.s) / mean.r.s.n) + (1 - lambda) * rho) if u1 > threshold.s [ set transform.s.n 1 ] ] ] end to do-transform-seller if (count sellers with [ contract.s = 1 ] > 0) and (count sellers with [ contract.s = 0 ] > 0) [ if any? sellers with [ transform.s.c = 1 ] [ ask one-of sellers with [ transform.s.c = 1 ] ; choose one of non-contracted seller who want to transform [ ask other sellers with [ transform.s.c = 1 ] [ set transform.s.c 0 ] ] ] if any? sellers with [ transform.s.n = 1 ] [ ask one-of sellers with [ transform.s.n = 1 ] [ set contract.s 0 ask contract-neighbors [ set contract.f 0 set producer.m 0 ] ask my-links [ die ] ] ] ask sellers with [ contract.s = 1 ] [ if not any? contract-neighbors [ set contract.s 0 ] ] ] end to do-match let nn (count producers with [ transform.f.c = 1 ]) if nn > 0 [ if any? sellers with [ contract.s = 1 or transform.s.c = 1 ] [ ask producers with [ transform.f.c = 1 ] [ create-contract-with min-one-of (sellers with [ contract.s = 1 or transform.s.c = 1 ]) [ distance myself ] [ set color red ] set contract.f 1 set transform.f.c 0 set producer.m 1 set threshold.p 0.1 ask contract-neighbors [ set contract.s 1 set color green set transform.s.c 0 ] ] ] ] let fn count producers with [ contract.f = 0 ] if fn > 0 [ if (count sellers with [ contract.s = 0 ] > 0) [ ask producers with [ contract.f = 0 ] [ create-contract-with min-one-of (sellers with [ contract.s = 0 ]) [ distance myself ] ] ] ] end to do-contract-production-ratio let c.p count producers with [ contract.f = 1 ] let p.s count producers set ratio.c.p (c.p / p.s ) end to do-restore ask producers [ set color yellow set sample.p 0 set sample.p.f 0 set transform.f.c 0 set transform.f 0 set producer.m 0 ] ask sellers [ set sample.s 0 set sample.s.f 0 set transform.s.c 0 set transform.s.n 0 set num-match (count contract-neighbors) ] ask sellers with [ contract.s = 0 ] [ set color yellow ] ask sellers with [ contract.s = 1 ] [ set color blue ] end to do-plots1 set-current-plot "Qualified Rate" set-current-plot-pen "qualified-rate" plot [qualification.r.g] of one-of regulators end to do-plots2 set-current-plot "Average QoS" set-current-plot-pen "average-qos" plot mean.qos end @#$#@#$#@ GRAPHICS-WINDOW 762 14 1223 476 -1 -1 14.16 1 10 1 1 1 0 1 1 1 0 31 0 31 0 0 1 ticks 30.0 BUTTON 129 409 220 469 Go go T 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 13 408 104 468 Setup setup NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 10 17 228 50 num-producer num-producer 10 100 50.0 1 1 NIL HORIZONTAL SLIDER 262 17 480 50 num-seller num-seller 1 10 5.0 1 1 NIL HORIZONTAL SLIDER 5 125 223 158 fine-producer fine-producer 0 2 0.85 0.05 1 NIL HORIZONTAL SLIDER 260 125 478 158 fine-seller fine-seller 0 10 1.2 0.1 1 NIL HORIZONTAL SLIDER 6 202 224 235 fine-deposit fine-deposit 0 2 0.55 0.05 1 NIL HORIZONTAL SLIDER 6 164 224 197 inspect-rate.p inspect-rate.p 0.01 1 0.51 0.1 1 NIL HORIZONTAL SLIDER 259 163 477 196 inspect-rate.s inspect-rate.s 0.1 1 0.6 0.1 1 NIL HORIZONTAL SLIDER 262 69 480 102 num-inspect num-inspect 0 20 5.0 1 1 NIL HORIZONTAL SLIDER 5 245 223 278 lambda lambda 0 1 0.5 0.1 1 NIL HORIZONTAL PLOT 514 181 733 328 Qualified Rate time rate 0.0 10.0 0.0 1.0 true false "" "" PENS "qualified-rate" 1.0 0 -2674135 true "" "" SWITCH 11 69 229 102 contractual? contractual? 0 1 -1000 PLOT 515 350 734 496 Average QoS time value 0.0 10.0 0.0 1.0 true false "" "" PENS "average-qos" 1.0 0 -13345367 true "" "" MONITOR 513 19 731 80 Contract Production Ratio ratio.c.p 2 1 15 MONITOR 514 98 733 163 Average QoS mean.qos 3 1 16 SLIDER 6 285 223 318 delta delta 0 1 0.5 0.1 1 NIL HORIZONTAL @#$#@#$#@ ## WHAT IS IT? (a general understanding of what the model is trying to show or explain) ## HOW IT WORKS (what rules the agents use to create the overall behavior of the model) ## HOW TO USE IT (how to use the model, including a description of each of the items in the Interface tab) ## THINGS TO NOTICE (suggested things for the user to notice while running the model) ## THINGS TO TRY (suggested things for the user to try to do (move sliders, switches, etc.) with the model) ## EXTENDING THE MODEL (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) ## 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 (models in the NetLogo Models Library and elsewhere which are of related interest) ## CREDITS AND REFERENCES (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) @#$#@#$#@ 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 building store false 0 Rectangle -7500403 true true 30 45 45 240 Rectangle -16777216 false false 30 45 45 165 Rectangle -7500403 true true 15 165 285 255 Rectangle -16777216 true false 120 195 180 255 Line -7500403 true 150 195 150 255 Rectangle -16777216 true false 30 180 105 240 Rectangle -16777216 true false 195 180 270 240 Line -16777216 false 0 165 300 165 Polygon -7500403 true true 0 165 45 135 60 90 240 90 255 135 300 165 Rectangle -7500403 true true 0 0 75 45 Rectangle -16777216 false false 0 0 75 45 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 person farmer false 0 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 Polygon -1 true false 60 195 90 210 114 154 120 195 180 195 187 157 210 210 240 195 195 90 165 90 150 105 150 150 135 90 105 90 Circle -7500403 true true 110 5 80 Rectangle -7500403 true true 127 79 172 94 Polygon -13345367 true false 120 90 120 180 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 180 90 172 89 165 135 135 135 127 90 Polygon -6459832 true false 116 4 113 21 71 33 71 40 109 48 117 34 144 27 180 26 188 36 224 23 222 14 178 16 167 0 Line -16777216 false 225 90 270 90 Line -16777216 false 225 15 225 90 Line -16777216 false 270 15 270 90 Line -16777216 false 247 15 247 90 Rectangle -6459832 true false 240 90 255 300 person police false 0 Polygon -1 true false 124 91 150 165 178 91 Polygon -13345367 true false 134 91 149 106 134 181 149 196 164 181 149 106 164 91 Polygon -13345367 true false 180 195 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 Polygon -13345367 true false 120 90 105 90 60 195 90 210 116 158 120 195 180 195 184 158 210 210 240 195 195 90 180 90 165 105 150 165 135 105 120 90 Rectangle -7500403 true true 123 76 176 92 Circle -7500403 true true 110 5 80 Polygon -13345367 true false 150 26 110 41 97 29 137 -1 158 6 185 0 201 6 196 23 204 34 180 33 Line -13345367 false 121 90 194 90 Line -16777216 false 148 143 150 196 Rectangle -16777216 true false 116 186 182 198 Rectangle -16777216 true false 109 183 124 227 Rectangle -16777216 true false 176 183 195 205 Circle -1 true false 152 143 9 Circle -1 true false 152 166 9 Polygon -1184463 true false 172 112 191 112 185 133 179 133 Polygon -1184463 true false 175 6 194 6 189 21 180 21 Line -1184463 false 149 24 197 24 Rectangle -16777216 true false 101 177 122 187 Rectangle -16777216 true false 179 164 183 186 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 van side false 0 Polygon -7500403 true true 26 147 18 125 36 61 161 61 177 67 195 90 242 97 262 110 273 129 260 149 Circle -16777216 true false 43 123 42 Circle -16777216 true false 194 124 42 Polygon -16777216 true false 45 68 37 95 183 96 169 69 Line -7500403 true 62 65 62 103 Line -7500403 true 115 68 120 100 Polygon -1 true false 271 127 258 126 257 114 261 109 Rectangle -16777216 true false 19 131 27 142 van top true 0 Polygon -7500403 true true 90 117 71 134 228 133 210 117 Polygon -7500403 true true 150 8 118 10 96 17 85 30 84 264 89 282 105 293 149 294 192 293 209 282 215 265 214 31 201 17 179 10 Polygon -16777216 true false 94 129 105 120 195 120 204 128 180 150 120 150 Polygon -16777216 true false 90 270 105 255 105 150 90 135 Polygon -16777216 true false 101 279 120 286 180 286 198 281 195 270 105 270 Polygon -16777216 true false 210 270 195 255 195 150 210 135 Polygon -1 true false 201 16 201 26 179 20 179 10 Polygon -1 true false 99 16 99 26 121 20 121 10 Line -16777216 false 130 14 168 14 Line -16777216 false 130 18 168 18 Line -16777216 false 130 11 168 11 Line -16777216 false 185 29 194 112 Line -16777216 false 115 29 106 112 Line -7500403 false 210 180 195 180 Line -7500403 false 195 225 210 240 Line -7500403 false 105 225 90 240 Line -7500403 false 90 180 105 180 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 6.2.2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go count 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 @#$#@#$#@