Skip to contents

Reflective accessor that walks every slot of an S4 model object (except misc) and gathers the names in any weather column. A technology, storage or supply links to a weather profile by name; the profile itself is a separate weather object in the repository.

Usage

get_weather(object)

Arguments

object

a model object (S4) such as technology, storage or supply.

Value

a character vector of weather object names (possibly empty).

Examples

# the weather series a process is linked to, read from its own slots
topia_elc <- topia$modules$electricity
get_weather(getObject(topia_elc$repo, name = "EWIN", drop = TRUE))
#> [1] "WWIN"

# a process with no weather link reports none
get_weather(getObject(topia_elc$repo, name = "ECOA", drop = TRUE))
#> character(0)