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 ] spots-own [ flower-type pollinisation-score amount-of-wild-hives ]
to setup-wild-hives
to setup-wild-bees
ask spots
[ set amount-of-wild-hives random max-wild-hive ]
end end
to polinate to polinate

View file

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

View file

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

View file

@ -1,9 +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-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 end
to-report with-blind-strategy to-report with-blind-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 [ beekeep-utility 5 flower-type (distance myself) ] report max-one-of spots in-radius d-max [ beekeep-utility ticks flower-type [amount-of-hives] of myself (distance myself) ]
end end

View file

@ -1,7 +1,8 @@
breed [ beekeepers beekeeper ] breed [ beekeepers beekeeper ]
beekeepers-own [ age-hive ] beekeepers-own [ age-hive ]
breed [ spots spot ] breed [ spots spot ]
spots-own [ flower-type ]
beekeepers-own [ amount-of-hives ]
breed [ centroids centroid ] breed [ centroids centroid ]
patches-own [ county-name ] patches-own [ county-name ]
@ -27,7 +28,8 @@ to setup-beekeepers
[ set shape "person" [ set shape "person"
set size 1 set size 1
move-to one-of centroids-on patches with [ county-name = location-bk ] 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 set temp temp + 3
] ]
file-close file-close