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.
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"
#>
# }
