read_err: Read an EnergyPlus Simulation Error File

View source: R/err.R

read_errR Documentation

Read an EnergyPlus Simulation Error File

Description

read_err() takes a file path of EnergyPlus simulation error file, usually with an extension .err, parses it and returns an ErrFile object.

Usage

read_err(path)

Arguments

path

a file path of EnergyPlus simulation error file, usually with an extension .err.

Details

Basically, an ErrFile object is a data.table with 6 columns and 6 additional attributes:

6 Columns:

  • index: Integer. Index of messages.

  • envir_index: Integer. Index of simulation environments.

  • envir: Character. Names of simulation environments.

  • level_index: Integer. Index for each severe level.

  • level: Character. Name of severe levels. Possible values: Info, Warning, Severe, and etc.

  • message: Character. Error messages.

6 Attributes:

  • path: A single string. The path of input file.

  • eplus_version: A numeric_version object. The version of EnergyPlus used during the simulation.

  • eplus_build: A single string. The build tag of EnergyPlus used during the simulation.

  • datetime: A DateTime (POSIXct). The time when the simulation started.

  • idd_version: A numeric_version. The version of IDD used during the simulation.

  • successful: TRUE when the simulation ended successfully, and FALSE otherwise.

  • terminated: TRUE when the simulation was terminated, and FALSE otherwise.

Value

An ErrFile object.

Examples

## Not run: 
# run simulation and get the err file
idf_name <- "1ZoneUncontrolled.idf"
epw_name <-  "USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw"
idf_path <- file.path(eplus_config(8.8)$dir, "ExampleFiles", idf_name)
epw_path <- file.path(eplus_config(8.8)$dir, "WeatherData", epw_name)
job <- eplus_job(idf_path, epw_path)
job$run(dir = tempdir())

# read the err file
read_err(job$locate_output(".err"))

## End(Not run)

eplusr documentation built on Aug. 25, 2023, 5:18 p.m.