Skip to contents

Update log reduction value according to treatment, crop, and population simulated

Usage

update_logreduction_specific_barrier(config, cropHeight, barrierID)

Arguments

config

list configuration simulated

cropHeight

numeric, height of th crop simulated

barrierID

numeric, ID of the barrier simulated

Value

config_updated

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,
    matrixID = scenario_example$MatrixID,
    cropHeight = scenario_example$CropHeight
  ),
  function(config, barrierID, matrixID, cropHeight) {

    if (barrierID %in% c(24, 26, 27, 28) &&
        matrixID %in% c(3, 5)) {

      update_logreduction_specific_barrier(
        config = config,
        cropHeight = cropHeight,
        barrierID = barrierID
      )

    } else {
      config
    }
  }
)