
Define parameters that may be used in model calculations (uses expressions)
Source:R/input_f.R
add_item2.Rd
Define parameters that may be used in model calculations (uses expressions)
Details
The functions to add/modify events/inputs use lists. If chaining together add_item2, it will just append the expressions together in the order established.
If using pick_val_v
, note it should be used with the deploy_env = TRUE
argument so that add_item2 process it correctly.
Examples
library(magrittr)
add_item2(input = {fl.idfs <- 0})
#> {
#> fl.idfs <- 0
#> }
add_item2(input = {
util_idfs <- if(psa_bool){rnorm(1,0.8,0.2)} else{0.8}
util.mbc <- 0.6
cost_idfs <- 2500})
#> {
#> util_idfs <- if (psa_bool) {
#> rnorm(1, 0.8, 0.2)
#> }
#> else {
#> 0.8
#> }
#> util.mbc <- 0.6
#> cost_idfs <- 2500
#> }
common_inputs <- add_item2(input = {
pick_val_v(
base = l_statics[["base"]],
psa = pick_psa(
l_statics[["function"]],
l_statics[["n"]],
l_statics[["a"]],
l_statics[["b"]]
),
sens = l_statics[[sens_name_used]],
psa_ind = psa_bool,
sens_ind = sensitivity_bool,
indicator = indicators_statics,
names_out = l_statics[["parameter_name"]],
deploy_env = TRUE #Note this option must be active if using it at add_item2
)
}
)