
Extract cost parameters and uncertainty for sensitivity analysis
prepare_sa_cost.RdExtract nominal investment and maintenance costs per action for a given project, paired with their uncertainty bounds from the case.
Details
The function extracts actions involved in project using prepare_action().
For each action, investment costs (cost_during) and maintenance costs
(cost_after) are aggregated across steps. Actions with non-zero nominal costs
are retained and labeled as investment_<action> and maintenance_<action>.
These nominal values are then merged with the uncertainty bounds (min, max,
type) defined in case["uncertainty"] where cost_ prefix is stripped to
match the parameter names.
Note that costs for the reference project are currently assumed to be zero;
costs are extracted directly for project and are not yet calculated as a
differential between project and reference.
See also
Other sensitivity analysis:
format_flood(),
format_sector(),
perform_sa(),
plot_sa(),
plot_sa_triplet(),
plot_sobol(),
plot_uncertainty(),
prepare_sa(),
prepare_sa_calendar(),
prepare_sa_flood(),
prepare_sa_impact(),
prepare_uncertainty(),
prop_negative()
Author
Frédéric Grelot, frederic.grelot.1994_cran@m4x.org
Examples
case = import_case(
system.file("extdata", "case", "complete.ods", package = "floodam.cba")
)
#> import Case from /tmp/RtmpvMoJJK/temp_libpath2b69f6f14b9e9/floodam.cba/extdata/case/complete.ods
#> ... done
project = setdiff(unique(case["project"][["project"]]), "baseline")[1]
prepare_sa_cost(case, project)
#> parameter nominal min max type
#> 1 investment_reinforcement 1200 0 0.5 relative
#> 2 maintenance_nothing 200 0 0.5 relative
#> 3 maintenance_reinforcement -100 0 0.5 relative