Skip to contents

Update the min and max value of the volume in the simulated configuration according to a value defined by the user

Usage

update_volume_with_desired_value(scenario, volume)

Arguments

scenario

data.frame

volume

numeric, named list of min and max value to simulate

Value

scenario_updated

Examples

scenario_example <- create_scenario(
  system.file("input_1culture_2pop.xlsx", package = "ambre")
)
volumes <- data.frame("min" = c(1.1, 1.2), "max" = c(1.3,1.4), "type" = c("triangle", "triangle"))
scenario_example_updated <- update_volume_with_desired_value(scenario = scenario_example,
                                 volume = volumes)

print(scenario_example_updated$config[[1]]$exposure)
#> # A tibble: 3 × 10
#>   name                 type    value   min   max mode  mean  sd    meanlog sdlog
#>   <chr>                <chr>   <dbl> <dbl> <dbl> <lgl> <lgl> <lgl> <lgl>   <lgl>
#> 1 number_of_repeatings value    1000  NA    NA   NA    NA    NA    NA      NA   
#> 2 number_of_exposures  value     365  NA    NA   NA    NA    NA    NA      NA   
#> 3 volume_perEvent      triang…    NA   1.1   1.3 NA    NA    NA    NA      NA   
print(scenario_example_updated$config[[2]]$exposure)
#> # A tibble: 3 × 10
#>   name                 type    value   min   max mode  mean  sd    meanlog sdlog
#>   <chr>                <chr>   <dbl> <dbl> <dbl> <lgl> <lgl> <lgl> <lgl>   <lgl>
#> 1 number_of_repeatings value    1000  NA    NA   NA    NA    NA    NA      NA   
#> 2 number_of_exposures  value     365  NA    NA   NA    NA    NA    NA      NA   
#> 3 volume_perEvent      triang…    NA   1.2   1.4 NA    NA    NA    NA      NA