-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.R
58 lines (53 loc) · 1.32 KB
/
example.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
library(beehave.go.r)
weather_vector <- matrix(
c(
rep(10, 30),
rep(0, 335)
),
nrow = 1
)
# Source all R scripts
experiment <- beehave_init(add_default = FALSE) |>
add_weather_file(
"dev/data/weather_402.txt"
) |>
add_flower_patches_from_map(
landuse_map = "dev/data/preidl-etal-RSE-2020_land-cover-classification-germany-2016.tif",
lookup_table = "dev/data/NectarPollenLookUp.csv",
location = data.frame(lat = 48.2, lon = 7.8)
) |>
add_parameter(
list(
# InitialPatches = list(
# Patches = list(
# list(
# DistToColony = 1000,
# ConstantPatch = list(
# Nectar = 5,
# Pollen = 1,
# NectarConcentration = 1,
# DetectionProbability = 0.5
# )
# ),
# list(
# DistToColony = 200,
# SeasonalPatch = list(
# MaxNectar = 20,
# MaxPollen = 10,
# NectarConcentration = 1.5,
# DetectionProbability = 0.2,
# SeasonShift = 20
# )
# )
# )
# ),
reporters = c(
"worker_cohorts",
"stores"
)
)
)
plot_flower_patches(experiment)
print(experiment)
test <- run_simulation(experiment)
bcs_plot_series(test, group = "stores")