csss-beedza/Source/vmodel.nls

41 lines
1.2 KiB
Plaintext

breed [ beekeepers beekeeper ]
breed [ spots spot ]
spots-own [ flower-type ]
breed [ centroids centroid ]
patches-own [ county-name ]
to setup-spots
foreach county-names
[ create-spots amount-of-spt
[ set size 2
set shape "star"
set flower-type one-of (list "PF" "AC" "LM" "SF")
set color color-flower flower-type
move-to one-of patches with [ county-name = ? ] ] ]
end
to setup-beekeepers
let temp 1
file-open "beekeepers-initial-location.txt"
while [not file-at-end?]
[
let amount-of-bk file-read
let location-bk file-read
create-beekeepers amount-of-bk
[ set shape "person"
set size 1
move-to one-of centroids-on patches with [ county-name = location-bk ]
if trace-on [ set color temp pd ] ]
set temp temp + 3
]
file-close
end
to setup-seasons-uncertainty
set abegin-uncertainty random-normal 0 season-uncertainty
set aend-uncertainty random-normal 0 season-uncertainty
set sbegin-uncertainty random-normal 0 season-uncertainty
set send-uncertainty random-normal 0 season-uncertainty
set lbegin-uncertainty random-normal 0 season-uncertainty
set lend-uncertainty random-normal 0 season-uncertainty
end