Skip to contents

Minimal use of floodam.cba.sa

How to load data

path_input = system.file("extdata", package = "floodam.cba.sa")
input = load_data(case = "test", path_input = path_input)
#> Case 'test' successfully loaded.
#> Key informations are:
#>  - 'floodam.cba.sa' in version 1.0.0.0 is used with:
#>      - n=1000
#>      - rate=constant
#>  - 'sensitivity' in version 1.30.0 is used.
#>  - input are taken from '/tmp/RtmpGNck7o/temp_libpath1c771a5e6d5489/floodam.cba.sa/extdata/test'
#>  - output are saved in '/tmp/Rtmp9i17d6/test'

How to perform analysis

Compute nominal value

nominal = calculate_nominal(input)
#> Model EAD: 1.077
#> Model NPV: 21.39

Do uncertainty and sensitivity analysis

analysis = analyze_uncertainty(input)
#> Registered S3 method overwritten by 'sensitivity':
#>   method    from 
#>   print.src dplyr
#> Model EAD: 1.077
#> Model NPV: 21.39
#> Evaluating model_npv... elapsed time: 0.867 secs
#> sentivity analysis is perform using sensitity::sobolmartinez
#> Evaluating sobol_analysis... elapsed time: 5.62 secs
#> Evaluating analyze_graphic... elapsed time: 0.157 secs
#> Evaluating compress... elapsed time: 0.333 secs

Plot graphs from results

plot_uncertainty(input, analysis)

plot_sobol(input, analysis)

plot_sobol(input, analysis, "T")