clean_wd {eplusr}R Documentation

Clean working directory of a previous EnergyPlus simulation

Description

Clean working directory of an EnergyPlus simulation by deleting all input and output files of previous simulation.

Usage

clean_wd(path)

Arguments

path

An .idf or .imf file path.

Details

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().

Author(s)

Hongyuan Jia

Examples

## Not run: 
# 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)

## End(Not run)

[Package eplusr version 0.16.2 Index]