use_idd: Use a specific EnergyPlus Input Data Dictionary (IDD) file

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/idd.R

Description

Use a specific EnergyPlus Input Data Dictionary (IDD) file

Usage

1
2
3
4
5
6
7
use_idd(idd, download = FALSE)

download_idd(ver = "latest", dir)

avail_idd()

is_avail_idd(ver)

Arguments

idd

Either a path, a connection, or literal data (either a single string or a raw vector) to an EnergyPlus Input Data Dictionary (IDD) file, usually named as Energy+.idd, or a valid version of IDD, e.g. 8.9, "8.9.0".

download

If TRUE and argument idd, the IDD file will be downloaded from EnergyPlus GitHub Repository, and saved to tempdir(). It will be parsed after it is downloaded successfully. A special value of "auto" can be given, which will automatically download corresponding IDD file if the Idd object is currently not available. It is useful in case when you only want to edit an EnergyPlus Input Data File (IDF) directly but do not want to install whole EnergyPlus software. Default is FALSE.

ver

A valid EnergyPlus version, e.g. 8, 8.7, "8.7" or "8.7.0". For download_idd(), the special value "latest", which is default, means the latest version.

dir

A directory to indicate where to save the IDD file.

Details

use_idd() takes a path of an EnergyPlus Input Data Dictionary (IDD) file, usually named "Energy+.idd" and return an Idd object. For details on Idd class, please see Idd.

download_idd() downloads specified version of EnergyPlus IDD file from EnergyPlus GitHub Repository. It is useful in case where you only want to edit an EnergyPlus Input Data File (IDF) directly but do not want to install whole EnergyPlus software.

avail_idd() returns versions of all cached Idd object.

is_avail_idd() returns TRUE if input version of IDD file has been parsed and cached.

eplusr tries to detect all installed EnergyPlus in default installation locations when loading. If argument idd is a version, eplusr will first try to find the cached Idd object of that version, if possible. If failed, and EnergyPlus of that version is available (see avail_eplus()), the "Energy+.idd" distributed with EnergyPlus will be parsed and stored in eplusr Idd cache.

Value

Author(s)

Hongyuan Jia

See Also

Idd Class for parsing, querying and making modifications to EnergyPlus IDD file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
# get all available Idd version
avail_idd()

# check if specific version of Idd is available
is_avail_idd(8.5)

# download latest IDD file from EnergyPlus GitHub repo
download_idd("latest", tempdir())

# use specific version of Idd
# only works if EnergyPlus v8.8 has been found or Idd v8.8 exists
use_idd(8.8)

# If Idd object is currently not avail_idd, automatically download IDD file
# from EnergyPlus GitHub repo and parse it
use_idd(8.8, download = "auto")

# now Idd v8.8 should be available
is_avail_idd(8.8)

# get specific version of parsed Idd object
use_idd(8.8)

avail_idd() # should contain "8.8.0"

## End(Not run)

hongyuanjia/eplusr documentation built on Oct. 14, 2018, 10:59 a.m.