Skip to contents

S4 class and constructor representing a Cost-Benefit Analysis (CBA) case study. A case study integrates project schedules, action descriptions and costs, spatial sectors, event transitions, multi-sector impacts, calendars, and uncertainty parameters.

Arguments

project

a data.frame giving characteristics of projects.

action

a data.frame giving characteristics of actions.

sector

a list of Sector objects.

event

a data.frame of events, or NULL (default to NULL if not needed).

synthesis

a data.frame of synthesis, or NULL (default to NULL if not given).

calendar

a list of calendar by projects, or NULL (default to NULL if not given, then it will be computed).

impact

an array summarizing impacts, or NULL (default to NULL if not given, then it will be computed).

characteristic

a list of characteristics for case, or NULL (default to NULL if not given, then it will be computed).

uncertainty

a data.frame of uncertainty parameters, or NULL (default to NULL if not given).

name

Character scalar giving the name of the case study (defaults to "case" if NULL or empty).

Value

Object of class Case.

Slots

project

a data.frame.

action

a data.frame.

sector

a list of sectors.

event

a data.frame of events, or NULL (default to NULL if not needed).

synthesis

a data.frame of synthesis (default to NULL if not given).

calendar

a list of calendar by projects (default to NULL if not given, then it will be computed).

impact

an array summarizing impacts (default to NULL if not given, then it will be computed).

characteristic

a list of characteristics for case (default to NULL if not given, then it will be computed).

uncertainty

a data.frame of uncertainty parameters, or NULL (default to NULL if not given).

Author

Frédéric Grelot, frederic.grelot.1994_cran@m4x.org

Examples


path = system.file("extdata", "case", "complete.ods", package = "floodam.cba")
complete = import_case(path)
#> import Case from /tmp/RtmpvMoJJK/temp_libpath2b69f6f14b9e9/floodam.cba/extdata/case/complete.ods
#>  ... done
compute_efficiency(complete)
#>            complete reinforcement
#> npv   -1620.1569447   3987.806119
#> bcr       0.8640406      1.627997
#> h_min           Inf     12.000000
compute_synthesis(complete)
#>               complete reinforcement
#> npv      -1.620157e+03 3987.80611878
#> bcr       7.951837e-01    3.25903870
#> h_min              Inf   12.00000000
#> cost_hab           Inf          -Inf
#> cost_emp           Inf          -Inf
#> aad_pos   1.785016e+02   74.34670245
#> aad_neg  -1.360446e+02  -18.58667561
#> dam_eff   4.090144e-02    0.05371699
#> hab_eff             NA            NA
#> emp_eff             NA            NA
#> aadd      4.629886e+01   62.71222500
#> aad_ori   1.038033e+03 1038.03333333
#> aad_fin   9.917345e+02  975.32110833
#> aadd_eff  4.460248e-02    0.06041446
#> aah_ori             NA            NA
#> aah_fin             NA            NA
#> aadh_eff            NA            NA
#> aae_ori             NA            NA
#> aae_fin             NA            NA
#> aade_eff            NA            NA
path = system.file("extdata", "case", "simple.ods", package = "floodam.cba")
simple = import_case(path)
#> import Case from /tmp/RtmpvMoJJK/temp_libpath2b69f6f14b9e9/floodam.cba/extdata/case/simple.ods
#>  ... done
path = system.file("extdata", "case", "simple_event.ods", package = "floodam.cba")
simple_event = import_case(path)
#> import Case from /tmp/RtmpvMoJJK/temp_libpath2b69f6f14b9e9/floodam.cba/extdata/case/simple_event.ods
#>  ... done