transition {eplusr} | R Documentation |
Perform version transition of EnergyPlus model
Description
transition()
takes an Idf object or a path of IDF file and a target
version, performs version transitions and returns an Idf object of
specified version.
Usage
transition(idf, ver, keep_all = FALSE, save = FALSE, dir = NULL)
Arguments
idf |
An Idf object or a path of IDF file. |
ver |
A valid EnergyPlus IDD version, e.g. |
keep_all |
If |
save |
If |
dir |
Only applicable when |
Value
An Idf object if keep_all
is FALSE
or a list of Idf objects
if keep_all
is TRUE
.
Author(s)
Hongyuan Jia
See Also
See version_updater()
which directly call EnergyPlus preprocessor
IDFVersionUpdater
to perform the version transitions.
Examples
## Not run:
if (any(avail_eplus()) > "7.2") {
# create an empty IDF
idf <- empty_idf("7.2")
# convert it from v7.2 to the latest EnergyPlus installed
transition(idf, max(avail_eplus()))
# convert it from v7.2 to the latest EnergyPlus installed and keep all
# intermediate versions
transition(idf, max(avail_eplus()), keep_all = TRUE)
# convert it from v7.2 to the latest EnergyPlus installed and keep all
# intermediate versions and save all them
idf$save(tempfile(fileext = ".idf"))
transition(idf, max(avail_eplus()), keep_all = TRUE,
save = TRUE, dir = tempdir()
)
}
## End(Not run)