if (FALSE) {
data(landscapeTEST)
landscape <- get("landscapeTEST1")
set.seed(12345)
## Generate a mosaic of three croptypes in balanced proportions
## and high level of spatial aggregation
AgriLand(landscape,
Nyears = 10,
rotation_sequence = c(0, 1, 2), prop = rep(1 / 3, 3),
aggreg = rep(10, 3), algo = "periodic",
graphic = TRUE, outputDir = getwd()
)
## Generate a dynamic mosaic of two croptypes in unbalanced proportions
## and low level of spatial aggregation,
## the second croptype being replaced every 5 years without changing field allocation
AgriLand(landscape,
Nyears = 20, rotation_period = 5, rotation_sequence = list(c(0, 1), c(0, 2)),
prop = c(1 / 3, 2 / 3), aggreg = c(0.07, 0.07), algo = "periodic", graphic = TRUE,
outputDir = getwd()
)
## Generate a dynamic mosaic of four croptypes in balanced proportions
## and medium level of spatial aggregation,
## with field allocation changing every year
AgriLand(landscape,
Nyears = 5, rotation_period = 1, rotation_realloc = TRUE,
rotation_sequence = c(0, 1, 2, 3),
prop = rep(1 / 4, 4), aggreg = 0.25, algo = "exp", graphic = TRUE, outputDir = getwd()
)
}
Run the code above in your browser using DataLab