Clean working directory of an EnergyPlus simulation by deleting all input and output files of previous simulation.
clean_wd(path)
clean_wd()
imitates the same process that EnergyPlus does whenever a new
simulation is getting to start. It deletes all related output files that
have the same name prefix as the input path. The input model itself and
any weather file are not deleted. clean_wd()
is called internally when
running EnergyPlus models using run_idf()
and run_multi()
.
if (FALSE) { # \dontrun{
# run a test simulation
idf_path <- system.file("extdata/1ZoneUncontrolled.idf", package = "eplusr")
epw_path <- path_eplus_weather("8.8",
"USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
)
dir <- file.path(tempdir(), "test")
run_idf(idf_path, epw_path, output_dir = dir, echo = FALSE)
list.files(dir)
# remove all output files
clean_wd(file.path(dir, basename(idf_path)))
list.files(dir)
} # }