% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_economic_analysis.R
\name{run_economic_analysis}
\alias{run_economic_analysis}
\title{Run economic analysis}
\usage{
run_economic_analysis(
  scenario,
  price_per_m3,
  membership_fee,
  grant,
  initialSituation,
  allocation_key = NULL
)
}
\arguments{
\item{scenario}{data.frame scenario obtained with create_scenario function}

\item{price_per_m3}{numeric, water price in euro per cubic meter}

\item{membership_fee}{numeric annual membership fee in euro per hectare}

\item{grant}{numeric amount of the grant in percentage}

\item{initialSituation}{boolean, TRUE to simulate initial situation cost, FALSE to simulate supplementary process cost}

\item{allocation_key}{numeric allocation key, NULL by default}
}
\value{
all_plots
}
\description{
Calculate annual cost and total investment fees for simulated management risk scenario
}
\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)
run_economic_analysis(scenario = scenario,
                      price_per_m3 = 0.1, 
                      membership_fee = 200, 
                      grant = 0.5,
                      initialSituation = FALSE)

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)
}
