This commit is contained in:
EEva 2013-07-17 20:23:15 +02:00
parent dde9b40764
commit 184a2e008d
5 changed files with 44 additions and 27 deletions

View file

@ -1,7 +1,8 @@
breed [ hives hive ]
to setup-wild-hives
spots-own [ flower-type pollinisation-score amount-of-wild-hives ]
to setup-wild-bees
ask spots
[ set amount-of-wild-hives random max-wild-hive ]
end
to polinate

View file

@ -3,8 +3,8 @@
;;;;;;;;;;;;;;;;;;;;;;
; beekeep-utility = honey-quant * (honey-price - prod-cost) - (travel-cost * distance * vehicles) - moving-cost
to-report beekeep-utility [ha hi d]
report (honey-quant ha hi) * ((honey-price hi) - prod-cost) - (travel-cost * d)
to-report beekeep-utility [ha hi ah d]
report (honey-quant ha hi ah) * ((honey-price hi) - prod-cost) - (travel-cost * d)
end
to-report honey-price [ hi ]
@ -21,8 +21,8 @@ to-report prod-cost
end
; honey-quant = (bees-quant - 10000) * harv-index * uncertainty
to-report honey-quant [ ha hi ]
report ((bees-quant ha) - 10000) * (harv-index hi) * uncertainty
to-report honey-quant [ ha hi amount-h ]
report ((bees-quant ha) - 10000) * (harv-index hi) * amount-h * uncertainty
end
to-report harv-index [ hi ]

View file

@ -9,8 +9,7 @@ globals [
sbegin-uncertainty
send-uncertainty
lbegin-uncertainty
lend-uncertainty
]
lend-uncertainty ]
__includes [
"setup-gis.nls"
@ -103,9 +102,9 @@ NIL
1
SLIDER
94
53
49
127
86
244
harvesting-uncertainty
harvesting-uncertainty
@ -118,10 +117,10 @@ NIL
VERTICAL
SLIDER
177
136
50
210
245
169
244
travel-cost
travel-cost
0
@ -161,9 +160,9 @@ trace-on
-1000
SLIDER
52
11
48
85
44
243
amount-of-spt
amount-of-spt
@ -235,10 +234,10 @@ PENS
"Acacia" 1.0 0 -2674135 true "" "plot harv-index \"AC\""
SLIDER
133
92
50
166
247
125
245
season-uncertainty
season-uncertainty
0
@ -250,10 +249,10 @@ NIL
VERTICAL
SLIDER
215
174
50
248
246
207
244
d-max
d-max
0
@ -274,6 +273,21 @@ strategy
"with-collective-strategy" "with-blind-strategy"
0
SLIDER
213
51
250
244
max-wild-hive
max-wild-hive
0
100
50
1
1
NIL
VERTICAL
@#$#@#$#@
## WHAT IS IT?

View file

@ -1,9 +1,9 @@
to-report with-collective-strategy
;; to explode. beekeeper do not know in advance
report max-one-of spots in-radius d-max with [ not any? beekeepers-on self] [ beekeep-utility ticks flower-type (distance myself) ]
report max-one-of spots in-radius d-max with [ not any? beekeepers-on self] [ beekeep-utility ticks flower-type [amount-of-hives] of myself (distance myself) ]
end
to-report with-blind-strategy
;; to explode. beekeeper do not know in advance
report max-one-of spots in-radius d-max [ beekeep-utility 5 flower-type (distance myself) ]
end
report max-one-of spots in-radius d-max [ beekeep-utility ticks flower-type [amount-of-hives] of myself (distance myself) ]
end

View file

@ -1,7 +1,8 @@
breed [ beekeepers beekeeper ]
beekeepers-own [ age-hive ]
breed [ spots spot ]
spots-own [ flower-type ]
beekeepers-own [ amount-of-hives ]
breed [ centroids centroid ]
patches-own [ county-name ]
@ -27,7 +28,8 @@ to setup-beekeepers
[ 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 ] ]
if trace-on [ set color temp pd ]
set amount-of-hives random-normal 45 2.0 ]
set temp temp + 3
]
file-close