Update log reduction for decay barrier
update_logreduction_decay.RdUpdate the log reduction value for the decay barrier according to crop and population simulated
Examples
scenario_example <- create_scenario(
system.file("input_1culture_2pop.xlsx", package = "ambre")
)
scenario_example$config <- purrr::pmap(
list(
config = scenario_example$config,
barrierID = scenario_example$SupplementaryProcessID,
cropHeight = scenario_example$CropHeight,
popID = scenario_example$PopulationID,
decay = scenario_example$nb_day_decay
),
function(config, barrierID, cropHeight, popID, decay) {
if (barrierID %in% c(12)) {
update_logreduction_decay(
config = config,
cropHeight = cropHeight,
barrierID = barrierID,
popID = popID,
nb_day_decay = decay
)
} else {
config
}
}
)