% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_logreduction_decay.R
\name{update_logreduction_decay}
\alias{update_logreduction_decay}
\title{Update log reduction for decay barrier}
\usage{
update_logreduction_decay(config, cropHeight, popID, barrierID, nb_day_decay)
}
\arguments{
\item{config}{list configuration simulated}

\item{cropHeight}{numeric, height of th crop simulated}

\item{popID}{numeric, ID of the population simulated}

\item{barrierID}{numeric, ID of the barrier simulated}

\item{nb_day_decay}{numeric, number of day of natural decay for the simulated crop}
}
\value{
config_updated
}
\description{
Update 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
    }
  }
)


}
