% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_qmra_custom.R
\name{run_qmra_custom}
\alias{run_qmra_custom}
\title{Run QMRA custom}
\usage{
run_qmra_custom(
  scenario,
  volume,
  frequency,
  concentration,
  objective = 1e-06,
  regulationLog,
  regulationConcentration,
  initialSituation
)
}
\arguments{
\item{scenario}{data.frame obtain with create_scenario function}

\item{volume}{data.frame of min and max value, same size as scenario}

\item{frequency}{array of integer same size as scenario}

\item{concentration}{data.frame of pathogenName, min, max and distribution law to simulate}

\item{objective}{numeric reference dalys threshold to compare simulation result on dalys plot. default value is OMS threshold 1e-6 dalys}

\item{regulationLog}{data.frame regulation value of the log reduction to compare with simulation result}

\item{regulationConcentration}{data.frame regulation value of the log reduction to compare with simulation result}

\item{initialSituation}{boolean, TRUE to consider InitialTrainID for simulation, FALSE to consider SupplementaryTrainID for simulation}
}
\value{
all_plots list
}
\description{
Run the full QMRA workflow using custom data for volume and frequency of exposure (not the default databases)
\enumerate{
\item simulate inflow concentration, volume of exposure
\item calculate initial dose
\item simulate log reduction for treatment processes
\item calculate final dose
\item calculate infection probability, illness probability and dalys reduction
\item calculate annual total risk
}
}
\examples{
\donttest{
sc <- create_scenario(system.file("input_1culture_2pop.xlsx", package = "ambre"))

regulation_reduction <- config_ambre$regulation$regulation_value |> 
  dplyr::filter(Country == "France") |>
  dplyr::select(-c(Concentration, Country, RegulationID))
regulation_concentration <- config_ambre$regulation$regulation_value |> 
  dplyr::filter(Country == "France") |>
  dplyr::select(-c(Country, RegulationID, Reduction))

concentration_custom <- data.frame(PathogenName = c("Rotavirus"),
                                   min = c(1),
                                   max = c(2),
                                   type = c("uniform"))
run_qmra_custom(scenario = sc,
                  concentration = concentration_custom,
                  volume = data.frame(min=c(0.5,1), max = c(1,2), type= c("triangle", "triangle")),
                  frequency = c(200L, 300L),
                  regulationLog = regulation_reduction,
                  regulationConcentration = regulation_concentration,
                  initialSituation = TRUE)

run_qmra_custom(scenario = sc,
                  concentration = concentration_custom,
                  volume = data.frame(min=c(0.5,1), max = c(1,2), type= c("triangle", "triangle")),
                  frequency = c(200L, 300L),
                  regulationLog = regulation_reduction,
                  regulationConcentration = regulation_concentration,
                  initialSituation = FALSE)
}
}
