globals [ Step ;; count simulation steps Bshop-share ;; the Spatial market-share of B-shop Sshop-share ;; the spatial market-share of S-shop Rich-center ;; the Rich households in the center Rich-UPA ;; the rich households in the UPA (not including those in the center) Rich-UCA ;; the rich households in the UCA Percolation-P ;; percolation probability, defined as B-shop spatial market share Ave-Prb ;; The average probability to choose B-shop Patches-UCA ;; the number of patches in the UCA area Patches-UPA ;; the number of patches in the UPA area Patches-Center ;; the numbe of patches in the center Urban-space ;; the total patches of urban space THS1 THS2 THS3 THS4 THS5 THB1 THB2 THB3 THB4 THB5 ] Breed [Households household] Breed [BShops Bshop ] Breed [SShops Sshop ] turtles-own [ District;; indicate which part of the city that the household live in ( center =1, UPA=2; UCA=3) Site ;; indicate the land use zone of the patch where this turtle in ] patches-own [ urbanarea ;; indicate it is urban promoting area or urban control area landzone ;; indicate land use type of this patch HFAR ;; Highest Foor area ratio, indentified the household capacity D-HFAR ;; the difference between the number of households-here and HFAR suitability ;; Physical suitability H-P-Num ;; the number of household live here. H-Bshop-Num ;; Household number shopping in B-shop H-Sshop-Num ;; Household number shopping in S-shop ] households-own [ DB ;; distance to B-shops DS ;; distance to S-shops Ub ;; utility of shopping in Bshop Us ;; utility of shopping in Sshop Prs ;; Probability shopping in Sshop Prb ;; Probability shopping in Bshop TT ;; A variable used in the process to set the location of a household Carship ;; 0 or 1, 0 having no car; 1 having a car Choice ;; 0 or 1, 0 shopping at B-shop; 1 shopping at S-shop Income ;; Income level travel-cost-Sshop ;;the possible minimum travel cost for shopping in a small shop travel-cost-Bshop ;;the possible minimum travel cost for shopping in a big shop Bus? ;; if bus is available travel-mode ;; 0 not available; 1 walking ; 2 bus; 3 car; ;;4 P&R at edge-of-UPA then change to bus; 5 P&R at edge-of-UCA then change to bus travel-Sshop-mode ;; travel-Bshop-mode ;; W-cost ;; Cost sensitivity W-amenity ;; sensibility to shopping enviroment; amenities are any tangible or intangible the attractiveness of the shops. F-Bshop ;; Frequency shopping in the Bshop F-Sshop ;; Frequencey shopping in the Shop ] BShops-own [ price ;; price of Bshop floorspace ;; floor-space of Bshop Sale ;; Sale-amount of Bshop ] SShops-own [ price ;; price of Bshop floorspace ;; floor-space of Bshop Sale ;; Sale-amount of Bshop ] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;Setup Procedures ;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;Prepare setting for simulation;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Setup ca check-radius setup-patches setup-shops ask Bshops [ hide-turtle ] ask Sshops [ hide-turtle ] setup-households ask patches [set H-P-Num count households-here] Refresh-show set Step 0 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Refresh-show ifelse Initial-show-pattern = "By-Zoning" [ ask households [ hide-turtle ] ask patches with [Distancexy 0 0 <= Radius-of-UPA] [set Pcolor 3 + landzone * 10] ask patches with [Distancexy 0 0 <= Radius-of-UCA] [ set Plabel D-HFAR ;set Plabel HFAR ] ] [ifelse Initial-show-pattern = "By-Density" [ask households [ hide-turtle ] ask patches with [Distancexy 0 0 <= Radius-of-UCA] [let HN count households-here ifelse HN >= 4 [set Pcolor 14] [ ifelse HN >= 2 [set Pcolor 117] [ifelse HN = 1 [set Pcolor 28] [set Pcolor 49]]]]] [ifelse Initial-show-pattern = "By-Urbanarea" [ ask turtles [ hide-turtle ] ask Bshops [ show-turtle ] ask patches with [urbanarea = 3] [set Pcolor 79] ask patches with [urbanarea = 2] [set Pcolor 98 ] ask patches with [urbanarea = 1] [set pcolor 118 ] ] [ask Bshops [ hide-turtle ] ask households with [income = 3 ] [ set color blue] ask households with [income = 2 ] [set color green ] ask households with [income = 1 ] [set color yellow ]]]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to check-radius if radius-of-center > radius-of-UPA or radius-of-center > radius-of-UCA [ user-message "The radius of the center shouldn't larger than the UPA's or UCA's. Please reset it." ] if radius-of-UPA > radius-of-UCA [ user-message "The radius of the UPA shouldn't larger than the UCA's. Please reset it." ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-patches ;; patch procedure ask patches [ set urbanarea 0 set landzone 0 set HFAR 0 set suitability 0 ] ask patches with [(pxcor = 0) and ( pycor = 0 )] [ setup-suitability setup-landzone setup-HFAR ] ask patches [set D-HFAR HFAR ] set Patches-UCA count patches with [ urbanarea = 3 ] set Patches-UPA count patches with [ urbanarea = 2] set Patches-Center count patches with [urbanarea = 1] set Urban-space Patches-UCA + Patches-UPA + Patches-Center end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-suitability ask patches in-radius Radius-of-UCA [ set suitability (1 + random 4 )] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-landzone ask patches in-radius Radius-of-UCA [set urbanarea 3 set pcolor 38 ] ask patches in-radius Radius-of-UPA [ set urbanarea 2 set landzone (1 + random 12 ) ] ask patches in-radius Radius-of-Center [ set urbanarea 1 ] ask patches in-radius 3 [ set landzone 9 ] ask patches in-radius Radius-of-UPA [ Repeat 5 [set landzone [landzone] of one-of neighbors4] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-HFAR ;;The following process is to decide the household-capacity of cells. ;;The Probability for a cell to be selected for holding Households is set as housing-ratio of its zoning type. ;;The household-capacity of selected cells are equal to the HFAR of the zoning type it belongs to. ;;It is supposed that the cells of all kinds of zoning type have a higher probaility to be selected for holding households, ;;and always reach the state of (household) saturation(uplimit of their capacity). The cells in the UPA have a lower probability comparing with those ;;in the center to be selected for holding households and generally will not always reach the state of saturation. ask patches in-radius Radius-of-UCA [if random 2 = 1 [ set HFAR 1 ]] ;; the possibility of celles in UCA to hold household is 50%. ;; This make the household density in UCA is lower than UPA ask patches in-radius Radius-of-UPA [ Ifelse (landzone <= 2) and (Random 100 <= 80) [set HFAR 1 ] [ifelse (landzone <= 4) and (Random 100 <= 80) [set HFAR 2 ] [ifelse (landzone <= 6) and (Random 100 <= 70) [set HFAR 2 ] [ifelse ( landzone = 7) and (Random 100 <= 60) [set HFAR 2 ] [ifelse (landzone = 8 or landzone = 10) and (Random 100 <= 50) [set HFAR 2] [ifelse (landzone = 9 ) and (Random 100 <= 30) [set HFAR 5] [ifelse (landzone = 11) and (Random 100 <= 10) [set HFAR 2 ] [set HFAR 0]]]]]]]] ask patches in-radius Radius-of-Center [ Ifelse (landzone <= 2) and (Random 100 <= 100) [set HFAR 2 ] [ifelse (landzone <= 4) and (Random 100 <= 100) [set HFAR 3 ] [ifelse (landzone <= 6) and (Random 100 <= 90) [set HFAR 4 ] [ifelse ( landzone = 7) and (Random 100 <= 80) [set HFAR 4 ] [ifelse (landzone = 8 or landzone = 10) and (Random 100 <= 70) [set HFAR 4] [ifelse (landzone = 9 ) and (Random 100 <= 50) [set HFAR 10] [ifelse (landzone = 11) and (Random 100 <= 30) [set HFAR 4 ] [set HFAR 0]]]]]]]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-shops ;; to setup B-shops ask patches with [(pxcor = B-xcor) and ( pycor = B-ycor )] [ sprout-Bshops 1 [ set color 18 set shape "house" set sale 0 set size 3 set-District set site [landzone] of (patch 0 0 ) set floorspace 20000 set label-color black ] ] ;; to setup SShops ask patches with [(pxcor = 0) and ( pycor = 0 )] [ ;;ask patches in-radius Radius-of-center ;;[set pcolor 98 ] sprout-Sshops 1 [set color Yellow set shape "circle" set sale 0 ;;set price 200 + random 100 set floorspace 300 set-District set site [landzone] of (patch 0 0 ) ]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Modify-price set price 200 + Random 300 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to setup-households let Household-limitation sum [HFAR] of Patches If Household-num > Household-limitation [User-message " the household-num is too big, please reset it." stop ] let Sum-ratio-CA Rich-ratio-CA + Middle-ratio-CA + Poor-ratio-CA if Sum-ratio-CA != 1.0 [user-message " the sum of income ratios in the Center should be equal to 1.0! Please reset them. " stop] let Sum-ratio-UPA Rich-ratio-UPA + Middle-ratio-UPA + Poor-ratio-UPA if Sum-ratio-UPA != 1.0 [user-message " the sum of income ratios in the UPA should be equal to 1.0! Please reset them. " stop] let Sum-ratio-UCA Rich-ratio-UCA + Middle-ratio-UCA + Poor-ratio-UCA if Sum-ratio-UCA != 1.0 [user-message " the sum of income ratios in the UCA should be equal to 1.0! Please reset them. " stop] set-default-shape households "square" Loop [ let Flag-num count households if Flag-num >= Household-num [stop] let p patches with [ D-HFAR > 0] ;; The agentset of patches who have the capacity for household ask n-of 1 p with-max [ suitability ] ;; let one of patches with largest suitability to generate household [sprout-households 1 [ set choice 0 set-Income set-Carship set-District set-taste ] set D-HFAR D-HFAR - 1 ]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to set-Income let Htype Random-float 1.0 ifelse distancexy 0 0 < Radius-of-center [ ifelse Htype < Rich-ratio-CA [set Income 3] [ifelse Htype > (Rich-ratio-CA + Middle-ratio-CA) [set Income 1] [set Income 2]]] [ifelse distancexy 0 0 < Radius-of-UPA [ ifelse Htype < Rich-ratio-UPA [set Income 3] [ifelse Htype > (Rich-ratio-UPA + Middle-ratio-UPA) [set Income 1] [set Income 2]]] [ifelse Htype < Rich-ratio-UCA [set Income 3] [ifelse Htype > (Rich-ratio-UCA + Middle-ratio-UCA) [set Income 1] [set Income 2]]]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to set-District ifelse distancexy 0 0 < Radius-of-center [set district 1] [ifelse distancexy 0 0 < radius-of-UPA [set district 2 ] [set district 3 ]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to set-taste if income = 1 [ set W-cost Random 30 set W-amenity Random 5 ] if income = 2 [ set W-cost Random 15 set W-amenity Random 15 ] if income = 3 [ set W-cost Random 5 set W-amenity Random 30 ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to set-Carship let Temp-car Random-float 1.0 ifelse Temp-car < Car-own-ratio [set carship 1] [set carship 0] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Count-rich let R-center count households with [income = 3 and distancexy 0 0 <= Radius-of-Center] let R-UPA count households with [income = 3 and distancexy 0 0 <= Radius-of-UPA] let R-UCA count households with [income = 3 and distancexy 0 0 <= Radius-of-UCA] set Rich-center R-center set Rich-UPA R-UPA - R-center set Rich-UCA R-UCA - R-UPA end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;Runtime Procedures;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to go ask Bshops [ hide-turtle ] ask households [ hide-turtle ] set Step Step + 1 ;if Step > 30 [stop] ; file-print "Shopsim-output---- Step Number: " + Step ;file-print "xcor" + "ycor" + "zone " + "Income" + "choice" + "W-cost" + "W-amenity" + "Probability-B" ask Sshops [Modify-price ] ask Bshops [Modify-price ] ask households [ calculate-travel-cost shopping ; file-show xcor + ycor + site + income + choice + w-cost + W-amenity + Prb ] Display-Shopping-status ;;export-world "shopsim-percolation21.csv" Market-statistics Plot-Marketshare if travel? = "True" [ ;;Plot-travelmode-histogram plot-travelmode-Bshop Plot-travelmode-Sshop] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; To calculate-travel-cost set Ds int ( distancexy 0 0 ) set Db int ( distancexy B-Xcor B-Ycor ) if travel? = "False" [ set travel-cost-Sshop Ds * 200 set travel-cost-Bshop Db * 200] if travel? = "True" ;;Travel? a logical variable to show if the travel-factor is considered [ let R-Bshop abs(round (sqrt(B-Xcor ^ 2 + B-Ycor ^ 2))) ;; the distance between B-shop and (0,0) if carship = 0 [ if district = 3 [ ifelse Ds <= walk-reachable-distance [set travel-Sshop-mode 1 set travel-cost-Sshop Ds * unit-cost-walk] [UCA-Shopping-By-Bus ifelse Bus? = true [set travel-Sshop-mode 2 set travel-cost-Sshop Ds * unit-cost-Bus ] [set travel-Sshop-mode 0 set travel-cost-Sshop 1000000 ]] ifelse Db <= walk-reachable-distance [set travel-Bshop-mode 1 set travel-cost-Bshop Db * unit-cost-walk] [ UCA-shopping-By-Bus ifelse Bus? = true [set travel-Bshop-mode 2 set travel-cost-Bshop Db * unit-cost-Bus ] [set travel-bshop-mode 0 set travel-cost-Bshop 1000000]]] if district = 2 [ifelse Ds <= walk-reachable-distance [set travel-Sshop-mode 1 set travel-cost-Sshop Ds * unit-cost-walk] [UPA-shopping-By-Bus ifelse Bus? = true [set travel-Sshop-mode 2 set travel-cost-Sshop Ds * unit-cost-Bus ] [set travel-Sshop-mode 0 set travel-cost-Sshop 1000000 ]] ifelse Db <= walk-reachable-distance [ set travel-Bshop-mode 1 set travel-cost-Bshop Db * unit-cost-walk] [UPA-shopping-By-Bus ifelse Bus? = true [set travel-Bshop-mode 2 set travel-cost-Bshop Db * unit-cost-Bus ] [set travel-Bshop-mode 0 set travel-cost-Bshop 1000000]]] if district = 1 [ ifelse Ds <= walk-reachable-distance [set travel-Sshop-mode 1 set travel-cost-Sshop Ds * unit-cost-walk] [CA-shopping-By-Bus ifelse Bus? = true [set travel-Sshop-mode 2 set travel-cost-Sshop Ds * unit-cost-Bus ] [set travel-Sshop-mode 0 set travel-cost-Sshop 1000000 ]] ifelse Db <= walk-reachable-distance [ set travel-Bshop-mode 1 set travel-cost-Bshop Db * unit-cost-walk] [CA-shopping-By-Bus ifelse Bus? = true [set travel-Bshop-mode 2 set travel-cost-Bshop Db * unit-cost-Bus ] [ set travel-Bshop-mode 0 set travel-cost-Bshop 1000000]]]] if carship = 1 [ if district = 3 [ UCA-Shopping-By-Bus ifelse Bus? = true [set travel-Sshop-mode 2 set travel-cost-Sshop Ds * unit-cost-bus] [ let Ts1 (Ds - Radius-of-UPA) * unit-cost-car + Parking-cost-edge-UPA + Radius-of-UPA * unit-cost-bus let Ts2 (Ds - Radius-of-Center) * unit-cost-car + Parking-cost-edge-CA + Radius-of-Center * unit-cost-bus ifelse Ts1 <= Ts2 [set travel-Sshop-mode 4 set travel-cost-Sshop Ts1] [set Travel-Sshop-mode 5 set travel-cost-Sshop Ts2]] ifelse Db <= walk-reachable-distance [set travel-Bshop-mode 1 set travel-cost-Bshop Db * unit-cost-walk] [ UCA-Shopping-By-Bus ifelse Bus? = true [ set travel-Bshop-mode 2 set travel-cost-Bshop Db * unit-cost-Bus] [ifelse abs B-Xcor <= Radius-of-Center and abs B-Ycor <= Radius-of-Center [ let Tb1 (Ds - Radius-of-UPA) * unit-cost-car + Parking-cost-edge-UPA + (Radius-of-UPA - R-Bshop) * unit-cost-bus ;;here Ds is the distance of a household to the point(0,0) let Tb2 (Ds - Radius-of-Center) * unit-cost-car + Parking-cost-edge-CA + (Radius-of-Center - R-Bshop) * unit-cost-bus ; here Ds is the distance of a household to the point (0,0) ifelse Tb1 <= Tb2 [ set travel-Bshop-mode 4 set travel-cost-Bshop Tb1] [ set travel-Bshop-mode 5 set travel-cost-Bshop Tb2]] [ ifelse abs B-Xcor <= Radius-of-UPA and abs B-Ycor <= Radius-of-UPA [ let Tb1 (Ds - Radius-of-UPA) * unit-cost-car + Parking-cost-edge-UPA + (Radius-of-UPA - R-Bshop) * unit-cost-bus ;; here Ds is the distance of a household to the point(0,0) let Tb2 Db * unit-cost-car ifelse Tb1 <= Tb2 [ set travel-Bshop-mode 4 set travel-cost-Bshop Tb1] [ set travel-Bshop-mode 3 set travel-cost-Bshop Tb2]] [ set travel-Bshop-mode 3 set travel-cost-Bshop Db * unit-cost-car]]]]] if district = 2 [ ifelse Ds <= walk-reachable-distance [set travel-Sshop-mode 1 set travel-cost-Sshop Ds * unit-cost-walk] [UPA-Shopping-By-Bus ifelse Bus? = true [set travel-Sshop-mode 2 set travel-cost-Sshop Ds * unit-cost-bus] [set travel-Sshop-mode 5 set travel-cost-Sshop (Ds - Radius-of-Center) * unit-cost-car + Radius-of-center * unit-cost-bus]] ifelse Db <= walk-reachable-distance [ set travel-Bshop-mode 1 set travel-cost-Bshop Db * unit-cost-walk] [ UPA-Shopping-By-Bus ifelse Bus? = true [ set travel-Bshop-mode 2 set travel-cost-Bshop Db * unit-cost-Bus] [ifelse abs B-Xcor <= Radius-of-Center and abs B-Ycor <= Radius-of-Center [let Tb2 (Ds - Radius-of-Center) * unit-cost-car + Parking-cost-edge-CA + (Radius-of-Center - R-Bshop) * unit-cost-bus ;;Here Ds is the distance of a household to the point (0 0) set travel-Bshop-mode 5 set travel-cost-Bshop Tb2] [ set travel-Bshop-mode 3 set travel-cost-Bshop Db * unit-cost-car]]]] if district = 1 [ ifelse Ds <= walk-reachable-distance [set travel-Sshop-mode 1 set travel-cost-Sshop Ds * unit-cost-walk] [CA-Shopping-By-Bus ifelse Bus? = true [set travel-Sshop-mode 2 set travel-cost-Sshop Ds * unit-cost-bus] [set travel-Sshop-mode 0 set travel-cost-Sshop 1000000]] ifelse Db <= walk-reachable-distance [ set travel-Bshop-mode 1 set travel-cost-Bshop Db * unit-cost-walk] [ CA-Shopping-By-Bus ifelse Bus? = true [ set travel-Bshop-mode 2 set travel-cost-Bshop Db * unit-cost-Bus] [ set travel-Bshop-mode 3 set travel-cost-Bshop Db * unit-cost-car]]]] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to CA-Shopping-By-Bus ifelse round (Random 100) <= Bus-availability-CA [ set Bus? true] ;; may travel to Bshop by bus [set Bus? false] ;; allmost impossible travel to shop end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to UPA-Shopping-By-Bus ifelse round (Random 100) <= Bus-availability-UPA [ set Bus? true] ;; may travel to Bshop by bus [set Bus? false] ;; allmost impossible travel to shop end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to UCA-Shopping-By-Bus ifelse round (Random 100) <= Bus-availability-UCA [ set Bus? true] ;; may travel to Bshop by bus [set Bus? false] ;; allmost impossible travel to shop end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; To shopping let Buy-num income ;; calculate utility in S-shop let Ps [price] of Sshop 1 set Us 50000 + W-amenity * (Random (Center-amenity / 25) + 100) - W-cost * ( Ps + travel-cost-Sshop) + Random 100000 if Us < 0 [ set Us 0 ] ;;calculate utility in B-shop set Db int ( distancexy B-Xcor B-Ycor ) let Pb [price] of Bshop 0 set Ub 50000 + W-amenity * (Random (Bshop-floorspace / 50) + 100) - W-cost * ( Ps + travel-cost-Bshop) + Random 100000 if Ub < 0 [ set Ub 0 ] ifelse Us = 0 and Ub = 0 [ set prb 50 set prs 50 ] [ Set Prb int(( Ub / (Ub + Us)) * 100) Set Prs 100 - Prb ] ifelse (Random 100 < Prb) [set choice 1 set travel-mode travel-Bshop-mode set F-Bshop F-Bshop + 1 ask Bshops with [xcor = B-xcor and Ycor = B-Ycor ] [ set sale sale + Buy-num ]] [ set choice 0 set travel-mode travel-Sshop-mode set F-Sshop F-Sshop + 1 ask Sshops with [xcor = 0 and Ycor = 0 ] [ set sale sale + Buy-num ]] ;; ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Market-statistics let Bshop-sale sum [sale] of Bshops let Sshop-sale sum [sale] of Sshops set Bshop-share Bshop-sale * 100 / (Bshop-sale + Sshop-sale) set Sshop-share Sshop-sale * 100 / (Bshop-sale + Sshop-sale) ;let Bluepatch count patches with [Pcolor = Blue ] ;let Greenpatch count patches with [Pcolor = Green] ;set Bshop-share Bluepatch * 100 / (Bluepatch + Greenpatch) ;set Sshop-share 100 - Bshop-share ;set Percolation-P Bshop-share Let Sum-Prb sum [Prb] of households set Ave-prb sum-prb / Household-num ask patches with [count households-here > 0] ;;all patches with households on them [set H-Bshop-Num count households-here with [choice = 1] set H-Sshop-Num count households-here with [choice = 0 ]] Count-households-by-travelmodes end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Count-households-by-travelmodes let TB-households households with [choice = 1] let TS-Households households with [choice = 0 ] set THS1 count TS-Households with [travel-mode = 1 ] set THS2 count TS-Households with [travel-mode = 2 ] set THS3 count TS-Households with [travel-mode = 3 ] set THS4 count TS-Households with [travel-mode = 4 ] set THS5 count TS-Households with [travel-mode = 5 ] set THB1 count TB-Households with [travel-mode = 1 ] set THB2 count TB-Households with [travel-mode = 2 ] set THB3 count TB-Households with [travel-mode = 3 ] set THB4 count TB-Households with [travel-mode = 4 ] set THB5 count TB-Households with [travel-mode = 5 ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Display-Shopping-status ask patches [set pcolor white] ifelse Display-shopping-pattern = "By-Marketshare" [ ask patches with [count households-here > 0] ;;all patches with households on them [set pcolor green if H-Bshop-Num > H-Sshop-Num [set pcolor blue ] ] ] [if Travel? = "True" [ ifelse Display-shopping-pattern = "Travelmode-to-Bshop" [ ask patches with [H-Bshop-Num > 0] [ let B-Households households-here with [choice = 1 ] ask B-households [ if travel-mode = 1 [set pcolor green] if travel-mode = 2 [set pcolor Blue] if travel-mode = 3 [set pcolor red] if travel-mode = 4 [set pcolor 117] if travel-mode = 5 [set pcolor brown]]]] [ifelse Display-shopping-pattern = "Travelmode-to-Sshop" [ask patches with [H-Sshop-Num > 0] [let S-Households households-here with [choice = 0 ] ask S-households [if travel-mode = 1 [set Pcolor green] if travel-mode = 2 [set Pcolor Blue] if travel-mode = 3 [set Pcolor red] if travel-mode = 4 [set Pcolor 117] if travel-mode = 5 [set Pcolor brown]]]] [ ask patches with [count households-here > 0] ;;all patches with households on them [ask households-here [if travel-mode = 1 [set Pcolor green] if travel-mode = 2 [set Pcolor Blue] if travel-mode = 3 [set Pcolor red] if travel-mode = 4 [set Pcolor 117] if travel-mode = 5 [set Pcolor brown]]]]]] if Travel? = "False" [ stop user-message "Please change Travel? to'True'" ]] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Plot-Marketshare set-current-plot "Market-share vs. Step" set-current-plot-pen "Bshop" Plot Bshop-share set-current-plot-pen "Sshop" Plot SShop-share end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Plot-travelmode-Bshop set-current-plot "Travelmode to Bshop" ;;plot-pen-reset ;; erase what we plotted before set-current-plot-pen "walking" plot THB1 set-current-plot-pen "bus" plot THB2 set-current-plot-pen "car" plot THB3 set-current-plot-pen "car-UPA-bus" plot THB4 set-current-plot-pen "car-CA-bus" plot THB5 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Plot-travelmode-Sshop set-current-plot "Travelmode to Sshop" set-current-plot-pen "walking" plot THS1 set-current-plot-pen "bus" plot THS2 set-current-plot-pen "car" plot THS3 set-current-plot-pen "car-UPA-bus" plot THS4 set-current-plot-pen "car-CA-bus" plot THS5 end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to Plot-travelmode-histogram set-current-plot "Travelmode histogram" plot-pen-reset ;; erase what we plotted before set-plot-x-range 1 5 set-plot-y-range 0 1000 ; set-histogram-num-bars 5 ; histogram-from households [travel-mode] ;; for this plot, the axes are logarithmic, so we can't use "histogram-from"; we have to plot the points ;; ourselves one at a time ;;set-current-plot "Household Distribution (log-log)" ;;plot-pen-reset ;; erase what we plotted before ;let max-prb max values-from households [prb] ;;let t-Prb 1 ;;while [Prb <= max-prb] ;;[ ;;let H-B-shops households with [Prb = t-Prb] ;;if any? matches ;; [ plotxy log t-Prb 10 ;; log (count households) 10 ] ;; set t-Prb t-Prb + 1 ;;] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to open-output-file let file "shopsim-output.csv" file-open file end @#$#@#$#@ GRAPHICS-WINDOW 865 23 1137 316 25 25 5.14 1 8 1 1 1 0 0 0 1 -25 25 -25 25 0 0 1 ticks CC-WINDOW 5 676 1146 771 Command Center 0 BUTTON 38 19 159 56 NIL setup NIL 1 T OBSERVER NIL NIL NIL NIL SLIDER 31 148 233 181 Radius-of-Center Radius-of-Center 1 25 10 1 1 NIL HORIZONTAL SLIDER 31 181 233 214 Radius-of-UPA Radius-of-UPA 1 25 20 1 1 NIL HORIZONTAL SLIDER 31 211 233 244 Radius-of-UCA Radius-of-UCA 1 25 25 1 1 NIL HORIZONTAL BUTTON 165 19 286 57 go Go T 1 T OBSERVER NIL NIL NIL NIL TEXTBOX 30 253 180 271 Bshop: 12 0.0 0 SLIDER 29 270 236 303 B-xcor B-xcor -25 25 10 1 1 NIL HORIZONTAL SLIDER 28 303 236 336 B-ycor B-ycor -25 25 15 1 1 NIL HORIZONTAL SLIDER 252 146 455 179 Household-Num Household-Num 1000 5000 1500 100 1 NIL HORIZONTAL TEXTBOX 38 129 188 147 Urban area: 12 0.0 0 SLIDER 28 336 236 369 Bshop-floorspace Bshop-floorspace 1000 50000 20000 1000 1 NIL HORIZONTAL SLIDER 30 401 237 434 Center-amenity Center-amenity 1000 50000 1000 1 1 NIL HORIZONTAL TEXTBOX 252 128 402 146 Household: 12 0.0 0 TEXTBOX 253 366 403 384 Income-ratio in the UCA 12 0.0 0 SLIDER 252 214 455 247 Rich-ratio-CA Rich-ratio-CA 0 1 0.2 0.1 1 NIL HORIZONTAL SLIDER 252 246 455 279 Middle-ratio-CA Middle-ratio-CA 0 1 0.6 0.1 1 NIL HORIZONTAL SLIDER 253 278 455 311 Poor-ratio-CA Poor-ratio-CA 0 1 0.2 0.1 1 NIL HORIZONTAL SLIDER 253 312 455 345 Rich-ratio-UPA Rich-ratio-UPA 0 1 0.2 0.1 1 NIL HORIZONTAL SLIDER 253 345 455 378 Middle-ratio-UPA Middle-ratio-UPA 0 1 0.6 0.1 1 NIL HORIZONTAL SLIDER 253 376 455 409 Poor-ratio-UPA Poor-ratio-UPA 0 1 0.2 0.1 1 NIL HORIZONTAL SLIDER 254 409 455 442 Rich-ratio-UCA Rich-ratio-UCA 0 1 0.2 0.1 1 NIL HORIZONTAL SLIDER 255 442 456 475 Middle-ratio-UCA Middle-ratio-UCA 0 1 0.6 0.1 1 NIL HORIZONTAL SLIDER 255 475 457 508 Poor-ratio-UCA Poor-ratio-UCA 0 1 0.2 0.1 1 NIL HORIZONTAL MONITOR 471 76 582 125 Household-Uplilmit sum [HFAR] of patches 3 1 12 SLIDER 252 526 447 559 Unit-cost-bus Unit-cost-bus 0 1000 200 10 1 NIL HORIZONTAL SLIDER 26 561 232 594 Unit-cost-car Unit-cost-car 0 1000 200 50 1 NIL HORIZONTAL SLIDER 28 528 234 561 Unit-cost-walk Unit-cost-walk 0 1000 0 10 1 NIL HORIZONTAL SLIDER 27 495 234 528 Walk-reachable-distance Walk-reachable-distance 0 10 2 1 1 NIL HORIZONTAL SLIDER 252 179 455 212 Car-own-ratio Car-own-ratio 0 1 1 0.1 1 NIL HORIZONTAL SLIDER 26 628 230 661 Parking-cost-edge-UPA Parking-cost-edge-UPA 0 2000 0 50 1 NIL HORIZONTAL SLIDER 26 594 231 627 Parking-cost-edge-CA Parking-cost-edge-CA 0 2000 200 50 1 NIL HORIZONTAL CHOOSER 38 72 175 117 Initial-show-pattern Initial-show-pattern "By-Zoning" "By-Density" "By-Income" "By-Urbanarea" 3 CHOOSER 177 72 317 117 Display-shopping-pattern Display-shopping-pattern "By-Marketshare" "Travelmode-to-Bshop" "Travelmode-to-Sshop" "Travelmode" 3 PLOT 472 125 818 284 Market-share vs. Step Time Market-share 0.0 100.0 0.0 100.0 true true PENS "Bshop" 1.0 0 -13345367 true "Sshop" 1.0 0 -10899396 true PLOT 473 287 819 455 Travelmode to Bshop Step Households 0.0 10.0 0.0 1000.0 true true PENS "walking" 1.0 0 -10899396 true "bus" 1.0 0 -13345367 true "car" 1.0 0 -2674135 true "car-UPA-bus" 1.0 0 -5204280 true "car-CA-bus" 1.0 0 -6459832 true CHOOSER 317 71 457 116 Travel? Travel? "True" "False" 0 MONITOR 583 76 701 125 Households in Sshop count households with [choice = 0 ] 0 1 12 PLOT 473 452 819 595 Travelmode to Sshop Step Households 0.0 10.0 0.0 1000.0 true true PENS "walking" 1.0 0 -10899396 true "bus" 1.0 0 -13345367 true "car" 1.0 0 -2674135 true "car-UPA-bus" 1.0 0 -5204280 true "car-CA-bus" 1.0 0 -6459832 true TEXTBOX 32 380 182 398 Sshop: 12 0.0 1 TEXTBOX 30 474 180 492 Transport: 12 0.0 1 MONITOR 701 76 818 125 Households in Bshop count households with [choice = 1 ] 17 1 12 SLIDER 252 560 447 593 Bus-Availability-CA Bus-Availability-CA 0 100 100 1 1 NIL HORIZONTAL SLIDER 252 594 447 627 Bus-Availability-UPA Bus-Availability-UPA 0 100 80 1 1 NIL HORIZONTAL SLIDER 253 629 448 662 Bus-Availability-UCA Bus-Availability-UCA 0 100 50 1 1 NIL HORIZONTAL @#$#@#$#@ WHAT IS IT? ----------- This section could give a general understanding of what the model is trying to show or explain. HOW IT WORKS ------------ This section could explain what rules the agents use to create the overall behavior of the model. HOW TO USE IT ------------- This section could explain how to use the model, including a description of each of the items in the interface tab. THINGS TO NOTICE ---------------- This section could give some ideas of things for the user to notice while running the model. THINGS TO TRY ------------- This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with 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 ---------------------- This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 link true 0 Line -7500403 true 150 0 150 300 link direction true 0 Line -7500403 true 150 150 30 225 Line -7500403 true 150 150 270 225 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 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 4.0 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go step = 10 THS1 THS2 THS3 THS4 THS5 THB1 THB2 THB3 THB4 THB5 @#$#@#$#@ @#$#@#$#@ 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 @#$#@#$#@