# WARNING - Generated by {fusen} from dev/flat_economic.Rmd: do not edit by hand # nolint: line_length_linter.

#' Water charge
#' 
#' Calculate  cost of water charge
#' @param scenario data.frame, with irrigation_need_m3an obtained with irrigation_need_calculation function
#' @param price_per_m3 numeric, water price in euro per cubic meter
#' @param membership_fee numeric annual membership fee in euro per hectare
#' @return updated_scenario
#' 
#' @export
#' @examples
#'
#'
#' scenario_apprentissage <- create_scenario(
#'   system.file("input_1culture_2pop.xlsx", package = "ambre")
#' )
#' irrigation_need <- irrigation_need_calculation(scenario_apprentissage)
#' water_price(scenario = irrigation_need,
#'             price_per_m3 = 0.01,
#'             membership_fee = 200)
water_price <- function(scenario, price_per_m3, membership_fee){
  scenario_updated <- scenario
  scenario_updated$water_charge <- price_per_m3 * scenario_updated$irrigation_need_m3an
  scenario_updated$annual_membership_fee <- membership_fee * scenario_updated$Area
  return(scenario_updated)
}
