Introduction

The autoCalibrate package is a collection of functions useful for calibrating EnergyPlus simulations.

Functions

add_schedule_columns

Time series data often needs additional columns to label various time periods. This function adds useful columns for the calibration process. Columns include:

These labels are used to filter results, "Summer weekday afternoons", for example.

calc_CVRMSE

This function calculates coefficient of variation of the root mean square error. Metrics for checking model calibration. From ASHRAE Guideline 14, pg 15, equations 5.4 and 5.5 http://www.eeperformance.org/uploads/8/6/5/0/8650231/ashrae_guideline_14-2002_measurement_of_energy_and_demand_saving.pdf For hourly analyses the suggested heuristics are < 30% CVRSME.

calc_NMBE

This function calculates normalized mean bias error. Metrics for checking model calibration. From ASHRAE Guideline 14, pg 15, equations 5.4 and 5.5 http://www.eeperformance.org/uploads/8/6/5/0/8650231/ashrae_guideline_14-2002_measurement_of_energy_and_demand_saving.pdf

calc_weighted_avg

The billing data for a given buiding type and location is actually an aggregation of several building types (such as heating fuel and vintage). This function combines several EnergyPlus outputs into one, using a weighted average. The weights of each variation is determined from survey data, and is included as a function input.

JtoKW

This function searches for fields in a dataframe representing an EnergyPlus output for units of [J] and then converts them into units of [kW].

read_EP_Output

This function reads the EnergyPlus output file(s) into R and reformats them for use in the autocalibration alogorithms. It cleans up the date format, deletes extraneous "design day" rows at the beginning of the output file, renames columns, and calculates the energy use index, EUI, which is power used per unit area.

read_SMUD_data

This function reads the SMUD billing data into R and cleans it. Similar functions are required for each set of utility data. The functions select, rename, and filter columns as needed for compatibility with the analysis functions. It also converts the date to a standard format.

run_EP_weighted_avg

This function processes input files, calls EnergyPlus to simulate the representative set of buildings, and conbines them in a weighted average.

run_parametric_preprocessor

Takes a list of input file names, combines the files, and runs the parametric pre-processor. The parametric pre-processor is a tool included with energy plus, so one of the function inputs is the address of this executable.

transfer_preprocessor_results

The ADM billing data pre-processor determines some schedules for the EnergyPlus simulations. This function transfers scheduling information from the pre-processor into the EnergyPlus schedule file.


Vignettes are long form documentation commonly included in packages. Because they are part of the distribution of the package, they need to be as compact as possible. The html_vignette output type provides a custom style sheet (and tweaks some options) to ensure that the resulting html is as small as possible. The html_vignette format:

Vignette Info

Note the various macros within the vignette section of the metadata block above. These are required in order to instruct R how to build the vignette. Note that you should change the title field and the \VignetteIndexEntry to match the title of your vignette.

Styles

The html_vignette template includes a basic CSS theme. To override this theme you can specify your own CSS in the document metadata as follows:

output: 
  rmarkdown::html_vignette:
    css: mystyles.css

Figures

The figure sizes have been customised so that you can easily put two images side-by-side.

plot(1:10)
plot(10:1)

You can enable figure captions by fig_caption: yes in YAML:

output:
  rmarkdown::html_vignette:
    fig_caption: yes

Then you can use the chunk option fig.cap = "Your figure caption." in knitr.

More Examples

You can write math expressions, e.g. $Y = X\beta + \epsilon$, footnotes^[A footnote here.], and tables, e.g. using knitr::kable().

knitr::kable(head(mtcars, 10))

Also a quote using >:

"He who gives up [code] safety for [code] speed deserves neither." (via)



07engineer/FCZ12.Residential documentation built on May 30, 2019, 3:40 p.m.