Skip to contents

The commodity a process HOLDS, as distinct from what it consumes or produces. Only storage has one. It is @storage$comm where given, otherwise @commodity – so a storage that names no roles keeps today's behaviour.

Usage

get_process_stored(object, process = NULL, classes = NULL)

Arguments

object

scenario object

process

optional character vector to restrict to

classes

classes to search; defaults to "storage"

Value

a named list mapping each process to its stored commodity

Details

Needed because a storage may hold something that is neither its input nor its output (hydrogen: ELC in, H2 stored, ELC out). Without this the stored commodity never reaches get_process_comm(), and the storage's timeframe would be derived from its ELC flows alone – putting the level at the wrong resolution.

Examples

# \donttest{
ek   <- topia$modules$electricity$R3
mod  <- newModel("TOPIA", data = ek$repo,
                 calendar = topia$modules$calendars$s4_h24,
                 region = ek$regions,
                 horizon = topia$modules$horizons$base,
                 discount = 0.05)
mod <- setGeoscale(mod, ek$geoscale)
scen <- interpolate_model(mod, name = "EX")
#> Cost declared at a coarse geoscale level:
#>   TBD_COA_WEST_CENTRAL@invcost: CENTRAL, WEST
#>   TBD_GAS_WEST_CENTRAL@invcost: CENTRAL, WEST
#> The cost is charged ONCE at that cell rather than at each child region, and is discounted at the children's rate. That is usually what a national cost datum means -- said here because it is a different number from naming the children individually.

# only `storage` holds a commodity
get_process_stored(scen)
#> $STG_ELC
#> [1] "ELC"
#> 
# }