% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annual_cost.R
\name{annual_cost}
\alias{annual_cost}
\title{Annual cost}
\usage{
annual_cost(
  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 simulation supplementary process cost}

\item{allocation_key}{numeric allocation key, NULL by default}
}
\value{
result list
}
\description{
Calculate annual cost of the scenario simulated
}
\examples{
scenario_apprentissage <- create_scenario(
  system.file("input_1culture_2pop.xlsx", package = "ambre")
)
annual_cost(scenario = scenario_apprentissage,
            price_per_m3 = 0.1,
            membership_fee = 200,
            grant = 0.5,
            initialSituation = TRUE)

annual_cost(scenario = scenario_apprentissage,
            price_per_m3 = 0.1,
            membership_fee = 200,
            grant = 0.5,
            initialSituation = FALSE)

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

annual_cost(scenario = scenario_apprentissage,
            price_per_m3 = 0.1,
            membership_fee = 200,
            grant = 0,
            initialSituation = FALSE,
            allocation_key = allocation_custom)

}
