# Fire (stored in the landscape object and called "fires") acts on the landscape for
#five years with an exponentially decaying intensity.
if (FALSE) {
regen <- function (time) {-exp(time)}
plot(1:5, regen(1:5), type = "l")
fire <- fire_effects(fire_layers = "fires", effect_time = 5, regeneration_function = regen)
ls <- landscape(population = egk_pop, suitability = egk_hab, "fires" = egk_fire)
pd <- population_dynamics(change = growth(egk_mat))
sim <- simulation(landscape = ls,
population_dynamics = pd,
habitat_dynamics = list(fire),
timesteps = 20)
plot(sim, object = "suitability", type = "raster", timesteps = 1:9)
}
Run the code above in your browser using DataLab