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

#' Perimeter calculation
#' 
#' Calculate perimeter (linear meter) according to surface, and add the value to the scenario dataframe
#' @param scenario data.frame scenario obtained with create_scenario function
#' @importFrom dplyr mutate
#' @return scenario_updated
#' 
#' @export
#' @examples
#' scenario_apprentissage <- create_scenario(
#'   system.file("input_1culture_2pop.xlsx", package = "ambre")
#' )
#'
#' scenario_apprentissage_updated <- perimeter_calculation(scenario_apprentissage)
#' print(scenario_apprentissage_updated$perimeter)
perimeter_calculation <- function(scenario){
    
    scenario_updated <- scenario |> mutate("perimeter" = sqrt(Area)*8)
    return(scenario_updated)
}
