diff --git a/R/idf.R b/R/idf.R index a8a47074f..c11fbf101 100644 --- a/R/idf.R +++ b/R/idf.R @@ -2478,6 +2478,12 @@ Idf <- R6::R6Class(classname = "Idf", #' standard output and error from EnergyPlus. Default: same as #' `wait`. #' + #' @param readvars If `TRUE`, the `ReadVarESO` post-processor will run + #' to generate CSV files from the ESO output. Since those CSV + #' files are never used when extracting simulation data in eplusr, + #' setting it to `FALSE` can speed up the simulation if there are + #' hundreds of output variables or meters. Default: `TRUE`. + #' #' @return An [EplusJob] object of current simulation. #' #' @examples @@ -2501,6 +2507,9 @@ Idf <- R6::R6Class(classname = "Idf", #' # copy all external files into the directory run simulation #' idf$run(epw, dir = tempdir(), copy_external = TRUE) #' + #' # run simulation without generating CSV files from ESO output + #' idf$run(epw, dir = tempdir(), readvars = FALSE) + #' #' # check for simulation errors #' job$errors() #' @@ -2517,8 +2526,8 @@ Idf <- R6::R6Class(classname = "Idf", #' job$report_data() #' } #' - run = function(weather, dir = NULL, wait = TRUE, force = FALSE, copy_external = FALSE, echo = wait) - idf_run(self, private, weather, dir, wait, force, copy_external = copy_external, echo), + run = function(weather, dir = NULL, wait = TRUE, force = FALSE, copy_external = FALSE, echo = wait, readvars = TRUE) + idf_run(self, private, weather, dir, wait, force, copy_external = copy_external, echo = echo, readvars = readvars), # }}} # last_job {{{ @@ -3344,7 +3353,7 @@ idf_save <- function(self, private, path = NULL, format = eplusr_option("save_fo # }}} # idf_run {{{ idf_run <- function(self, private, epw, dir = NULL, wait = TRUE, - force = FALSE, copy_external = FALSE, echo = wait) { + force = FALSE, copy_external = FALSE, echo = wait, readvars = TRUE) { # check if the model is still running old <- private$m_log$job if (!inherits(old, "EplusJob")) { @@ -3355,7 +3364,7 @@ idf_run <- function(self, private, epw, dir = NULL, wait = TRUE, } private$m_log$job$run(epw = epw, dir = dir, wait = wait, force = force, - echo = echo, copy_external = copy_external + echo = echo, copy_external = copy_external, readvars = readvars ) } # }}} diff --git a/R/job.R b/R/job.R index ed63cf6ba..16462b9ea 100644 --- a/R/job.R +++ b/R/job.R @@ -180,10 +180,13 @@ EplusJob <- R6::R6Class(classname = "EplusJob", cloneable = FALSE, #' #' # copy external files used in the model to simulation output directory #' job$run(copy_external = TRUE) + #' + #' # run simulation without generating CSV files from ESO output + #' job$run(epw, dir = tempdir(), readvars = FALSE) #' } #' - run = function(epw, dir = NULL, wait = TRUE, force = FALSE, echo = wait, copy_external = FALSE) - job_run(self, private, epw, dir, wait, force, echo, copy_external), + run = function(epw, dir = NULL, wait = TRUE, force = FALSE, echo = wait, copy_external = FALSE, readvars = TRUE) + job_run(self, private, epw, dir, wait, force, echo, copy_external, readvars), # }}} # kill {{{ diff --git a/man/EplusJob.Rd b/man/EplusJob.Rd index 63d8de450..47cd0989f 100644 --- a/man/EplusJob.Rd +++ b/man/EplusJob.Rd @@ -110,6 +110,9 @@ job$run(echo = FALSE) # copy external files used in the model to simulation output directory job$run(copy_external = TRUE) + +# run simulation without generating CSV files from ESO output +job$run(epw, dir = tempdir(), readvars = FALSE) } @@ -464,7 +467,8 @@ Run simulation wait = TRUE, force = FALSE, echo = wait, - copy_external = FALSE + copy_external = FALSE, + readvars = TRUE )}\if{html}{\out{}} } @@ -547,6 +551,9 @@ job$run(echo = FALSE) # copy external files used in the model to simulation output directory job$run(copy_external = TRUE) + +# run simulation without generating CSV files from ESO output +job$run(epw, dir = tempdir(), readvars = FALSE) } } diff --git a/man/Idf.Rd b/man/Idf.Rd index a8bd9ba91..e7aef947a 100644 --- a/man/Idf.Rd +++ b/man/Idf.Rd @@ -794,6 +794,9 @@ idf$run(epw, dir = tempdir(), wait = FALSE) # copy all external files into the directory run simulation idf$run(epw, dir = tempdir(), copy_external = TRUE) +# run simulation without generating CSV files from ESO output +idf$run(epw, dir = tempdir(), readvars = FALSE) + # check for simulation errors job$errors() @@ -4002,7 +4005,8 @@ Run simulation using EnergyPlus wait = TRUE, force = FALSE, copy_external = FALSE, - echo = wait + echo = wait, + readvars = TRUE )}\if{html}{\out{}} } @@ -4036,6 +4040,12 @@ will have all files needed for the model to run. Default is \item{\code{echo}}{Only applicable when \code{wait} is \code{TRUE}. Whether to show standard output and error from EnergyPlus. Default: same as \code{wait}.} + +\item{\code{readvars}}{If \code{TRUE}, the \code{ReadVarESO} post-processor will run +to generate CSV files from the ESO output. Since those CSV +files are never used when extracting simulation data in eplusr, +setting it to \code{FALSE} can speed up the simulation if there are +hundreds of output variables or meters. Default: \code{TRUE}.} } \if{html}{\out{}} } @@ -4092,6 +4102,9 @@ idf$run(epw, dir = tempdir(), wait = FALSE) # copy all external files into the directory run simulation idf$run(epw, dir = tempdir(), copy_external = TRUE) +# run simulation without generating CSV files from ESO output +idf$run(epw, dir = tempdir(), readvars = FALSE) + # check for simulation errors job$errors()