Adding zmap
This commit is contained in:
parent
796d085aca
commit
f685ff89a6
4 changed files with 43 additions and 13 deletions
|
@ -5,8 +5,22 @@ to setup-wild-bees
|
||||||
[ set amount-of-wild-hives random max-wild-hives ]
|
[ set amount-of-wild-hives random max-wild-hives ]
|
||||||
end
|
end
|
||||||
|
|
||||||
to pollinate
|
to go-pollinate
|
||||||
if flower-season [
|
if flower-season [
|
||||||
ask spots
|
ask spots with [any? beekeepers-here]
|
||||||
[ set pollinisation-score amount-of-wild-hives + [amount-of-hives] of beekeepers-here ] ]
|
[ set pollinisation-score amount-of-wild-hives + item 0 [amount-of-hives] of beekeepers-here
|
||||||
|
;show pollinisation-score
|
||||||
|
if pollinisation-score > 0 [ set size 5 ]] ]
|
||||||
|
|
||||||
|
if pollinisation-map-on
|
||||||
|
[ clear-drawing
|
||||||
|
ask turtles [ hide-turtle ]
|
||||||
|
let max-pollinisation-score max [ pollinisation-score ] of spots
|
||||||
|
ask patches with [ any? spots-here ]
|
||||||
|
[ let local-pollinisation-score (item 0 [ pollinisation-score ] of spots-here)
|
||||||
|
set pcolor scale-color RED local-pollinisation-score 0 50
|
||||||
|
;set pcolor WHITE
|
||||||
|
;if local-pollinisation-score > 0 [ show local-pollinisation-score ]
|
||||||
|
] ]
|
||||||
|
diffuse pcolor 0.2
|
||||||
end
|
end
|
|
@ -52,6 +52,8 @@ to go
|
||||||
; tick!
|
; tick!
|
||||||
tick
|
tick
|
||||||
|
|
||||||
|
go-pollinate
|
||||||
|
|
||||||
set yearly-ticks ticks mod 365
|
set yearly-ticks ticks mod 365
|
||||||
if yearly-ticks = 0 [ setup-seasons-uncertainty ]
|
if yearly-ticks = 0 [ setup-seasons-uncertainty ]
|
||||||
|
|
||||||
|
@ -110,7 +112,7 @@ harvesting-uncertainty
|
||||||
harvesting-uncertainty
|
harvesting-uncertainty
|
||||||
0
|
0
|
||||||
10
|
10
|
||||||
0
|
1.9
|
||||||
0.1
|
0.1
|
||||||
1
|
1
|
||||||
NIL
|
NIL
|
||||||
|
@ -124,8 +126,8 @@ SLIDER
|
||||||
travel-cost
|
travel-cost
|
||||||
travel-cost
|
travel-cost
|
||||||
0
|
0
|
||||||
5
|
10
|
||||||
5
|
7.5
|
||||||
0.1
|
0.1
|
||||||
1
|
1
|
||||||
NIL
|
NIL
|
||||||
|
@ -264,10 +266,10 @@ NIL
|
||||||
VERTICAL
|
VERTICAL
|
||||||
|
|
||||||
CHOOSER
|
CHOOSER
|
||||||
37
|
8
|
||||||
288
|
249
|
||||||
275
|
246
|
||||||
333
|
294
|
||||||
strategy
|
strategy
|
||||||
strategy
|
strategy
|
||||||
"with-collective-strategy" "with-blind-strategy"
|
"with-collective-strategy" "with-blind-strategy"
|
||||||
|
@ -282,12 +284,23 @@ max-wild-hives
|
||||||
max-wild-hives
|
max-wild-hives
|
||||||
0
|
0
|
||||||
100
|
100
|
||||||
90
|
52
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
NIL
|
NIL
|
||||||
VERTICAL
|
VERTICAL
|
||||||
|
|
||||||
|
SWITCH
|
||||||
|
4
|
||||||
|
455
|
||||||
|
206
|
||||||
|
488
|
||||||
|
pollinisation-map-on
|
||||||
|
pollinisation-map-on
|
||||||
|
0
|
||||||
|
1
|
||||||
|
-1000
|
||||||
|
|
||||||
@#$#@#$#@
|
@#$#@#$#@
|
||||||
## WHAT IS IT?
|
## WHAT IS IT?
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
to-report with-collective-strategy
|
to-report with-collective-strategy
|
||||||
;; to explode. beekeeper do not know in advance
|
;; to explode. beekeeper do not know in advance
|
||||||
report max-one-of spots in-radius d-max with [ not any? beekeepers-here or member? myself beekeepers-here ] [ beekeep-utility flower-type ([amount-of-hives] of myself) (distance myself) ]
|
;let potential-empty-spots spots with [ not any? beekeepers-here or member? myself beekeepers-here ]
|
||||||
|
;let pes-radius-limited potential-empty-spots in-radius d-max
|
||||||
|
;report max-one-of pes-radius-limited [ beekeep-utility flower-type ([amount-of-hives] of myself) (distance myself) ]
|
||||||
|
report max-one-of (spots in-radius d-max) with [ not any? beekeepers-here or member? myself beekeepers-here ] [ beekeep-utility flower-type [amount-of-hives] of myself (distance myself) ]
|
||||||
end
|
end
|
||||||
|
|
||||||
to-report with-blind-strategy
|
to-report with-blind-strategy
|
||||||
|
|
|
@ -13,7 +13,7 @@ to setup-spots
|
||||||
set shape "star"
|
set shape "star"
|
||||||
set flower-type one-of (list "PF" "AC" "LM" "SF")
|
set flower-type one-of (list "PF" "AC" "LM" "SF")
|
||||||
set color color-flower flower-type
|
set color color-flower flower-type
|
||||||
move-to one-of patches with [ county-name = ? ] ] ]
|
move-to one-of patches with [ county-name = ? and not any? centroids-here ] ] ]
|
||||||
end
|
end
|
||||||
|
|
||||||
to setup-beekeepers
|
to setup-beekeepers
|
||||||
|
|
Loading…
Reference in a new issue