Generic, reflective accessor that walks every slot of an S4 model object
(except misc) and gathers the regions it refers to. Regions are read from:
any atomic slot named
region,src, ordst, andthe
region,src, anddstcolumns of anydata.frameslot.
Details
The result is the set of unique, non-missing, non-empty region labels. The
function is intentionally schema-agnostic so it keeps working as region
information is added to classes that do not yet carry an explicit @region
slot (e.g. import / export).
See also
Other model:
find_in_model(),
get_weather(),
update,model-method
Examples
topia_elc <- topia$modules$electricity
mod <- newModel("TOPIA", data = topia_elc$repo,
calendar = topia$modules$calendars$d365_h24_1dps,
region = topia_elc$regions,
horizon = topia$modules$horizons$BY2025_50_by10,
discount = 0.05)
mod <- setGeoscale(mod, topia_elc$geoscale)
get_region(mod)
#> [1] "R01" "R02" "R03" "R04" "R05" "R06" "R07" "R08" "R09" "R10" "R11" "R12"
