Skip to contents

Calculate annual cost and total investment fees for simulated management risk scenario

Usage

run_economic_analysis(
  scenario,
  price_per_m3,
  membership_fee,
  grant,
  initialSituation,
  allocation_key = NULL
)

Arguments

scenario

data.frame scenario obtained with create_scenario function

price_per_m3

numeric, water price in euro per cubic meter

membership_fee

numeric annual membership fee in euro per hectare

grant

numeric amount of the grant in percentage

initialSituation

boolean, TRUE to simulate initial situation cost, FALSE to simulate supplementary process cost

allocation_key

numeric allocation key, NULL by default

Value

all_plots

Examples

scenario <- create_scenario(
  system.file("input_1culture_2pop.xlsx", package = "ambre")
)
run_economic_analysis(scenario = scenario,
                      price_per_m3 = 0.1, 
                      membership_fee = 200, 
                      grant = 0.5,
                      initialSituation = TRUE)
#> $annual

#> 
#> $allocation_key
#>   grant  CropName allocation
#> 1   0.5    Tomato     0.1111
#> 2   0.5 Corn seed     0.3889
#> 
run_economic_analysis(scenario = scenario,
                      price_per_m3 = 0.1, 
                      membership_fee = 200, 
                      grant = 0.5,
                      initialSituation = FALSE)
#> $annual

#> 
#> $total_investement

#> 
#> $allocation_key
#>   grant  CropName allocation
#> 1   0.5    Tomato     0.1111
#> 2   0.5 Corn seed     0.3889
#> 

crop <- scenario$CropName
allocation_custom <- data.frame(CropName = crop,
                                allocation = c(0.5, 0.5))
run_economic_analysis(scenario = scenario,
                      price_per_m3 = 0.1, 
                      membership_fee = 200, 
                      grant = 0,
                      initialSituation = TRUE,
                      allocation_key = allocation_custom)
#> $annual

#> 
#> $allocation_key
#>   grant  CropName allocation
#> 1     0    Tomato        0.5
#> 2     0 Corn seed        0.5
#>