csss-beedza/Source/vmodel.nls
2013-07-17 18:06:53 +02:00

39 lines
No EOL
1.1 KiB
Text

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
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 red pd ] ]
]
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