EplusSql class wraps SQL queries that can retrieve simulation outputs using EnergyPlus SQLite output file.

Details

SQLite output is an optional output format for EnergyPlus. It will be created if there is an object in class Output:SQLite. If the value of field Option in class Output:SQLite is set to "SimpleAndTabular", then database tables related to the tabular reports will be also included.

There are more than 30 tables in the SQLite output file which contains all of the data found in EnergyPlus's tabular output files, standard variable and meter output files, plus a number of reports that are found in the eplusout.eio output file. The full description for SQLite outputs can be found in the EnergyPlus "Output Details and Examples" documentation. Note that all column names of tables returned have been tidied, i.e. "KeyValue" becomes "key_value", "IsMeter" becomes "is_meter" and etc.

EplusSql class makes it possible to directly retrieve simulation results without creating an EplusJob object. EplusJob can only get simulation outputs after the job was successfully run before.

However, it should be noted that, unlike EplusJob, there is no checking on whether the simulation is terminated or completed unsuccessfully or, the parent Idf has been changed since last simulation. This means that you may encounter some problems when retrieve data from an unsuccessful simulation. It is suggested to carefully go through the .err file using read_err() to make sure the output data in the SQLite is correct and reliable.

Methods

Public methods


Method new()

Create an EplusSql object

Usage

EplusSql$new(sql)

Arguments

sql

A path to an local EnergyPlus SQLite output file.

Returns

An EplusSql object.

Examples

\dontrun{
if (is_avail_eplus(8.8)) {
    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)

    # copy to tempdir and run the model
    idf <- read_idf(idf_path)
    idf$run(epw_path, tempdir(), echo = FALSE)

    # create from local file
    sql <- eplus_sql(file.path(tempdir(), "1ZoneUncontrolled.sql"))
}
}


Method path()

Get the file path of current EpwSql object

Usage

EplusSql$path()

Details

$path() returns the path of EnergyPlus SQLite file.

Returns

A single string.

Examples

\dontrun{
# get path
sql$path()
}


Method path_idf()

Get the path of corresponding IDF file

Usage

EplusSql$path_idf()

Details

$path_idf() returns the IDF file path with same name as the SQLite file in the same folder. NULL is returned if no corresponding IDF is found.

Returns

NULL or a single string.

Examples

\dontrun{
# get path
sql$path_idf()
}


Method list_table()

List all table names in current EnergyPlus SQL output

Usage

EplusSql$list_table()

Details

$list_table() returns all available table and view names in the EnergyPlus SQLite file.

Returns

A character vector

Examples

\dontrun{
sql$list_table()
}


Method read_table()

Read a single table from current EnergyPlus SQL output

Usage

EplusSql$read_table(name)

Arguments

name

A single string specifying the name of table to read.

Details

$read_table() takes a valid table name of those from $list_table() and returns that table data in a data.table::data.table() format.

Returns

A data.table::data.table().

Examples

\dontrun{
# read a specific table
sql$read_table("Zones")
}


Method report_data_dict()

Read report data dictionary from current EnergyPlus SQL output

Usage

EplusSql$report_data_dict()

Details

$report_data_dict() returns a data.table::data.table() which contains all information about report data.

For details on the meaning of each columns, please see "2.20.2.1 ReportDataDictionary Table" in EnergyPlus "Output Details and Examples" documentation.

Returns

A data.table::data.table() of 10 columns:

  • report_data_dictionary_index: The integer used to link the dictionary data to the variable data. Mainly useful when joining different tables

  • is_meter: Whether report data is a meter data. Possible values: 0 and 1

  • timestep_type: Type of data timestep. Possible values: Zone and HVAC System

  • key_value: Key name of the data

  • name: Actual report data name

  • reporting_frequency:

  • schedule_name: Name of the the schedule that controls reporting frequency.

  • units: The data units

Examples

\dontrun{
sql$report_data_dict()
}


Method report_data()

Read report data

Usage

EplusSql$report_data(
  key_value = NULL,
  name = NULL,
  year = NULL,
  tz = "UTC",
  case = "auto",
  all = FALSE,
  wide = FALSE,
  period = NULL,
  month = NULL,
  day = NULL,
  hour = NULL,
  minute = NULL,
  interval = NULL,
  simulation_days = NULL,
  day_type = NULL,
  environment_name = NULL
)

Arguments

key_value

A character vector to identify key values of the data. If NULL, all keys of that variable will be returned. key_value can also be data.frame that contains key_value and name columns. In this case, name argument in $report_data() is ignored. All available key_value for current simulation output can be obtained using $report_data_dict(). Default: NULL.

name

A character vector to identify names of the data. If NULL, all names of that variable will be returned. If key_value is a data.frame, name is ignored. All available name for current simulation output can be obtained using $report_data_dict(). Default: NULL.

year

Year of the date time in column datetime. If NULL, it will calculate a year value that meets the start day of week restriction for each environment. Default: NULL.

tz

Time zone of date time in column datetime. Default: "UTC".

case

A single string used to add a character column case in the returned results to indicate the case of this simulation. If NULL, no column is added. If "auto", the name of the IDF file without extension is used. Default: "auto".

all

If TRUE, extra columns are also included in the returned data.table::data.table().

wide

If TRUE, the output is formatted in the same way as standard EnergyPlus csv output file.

period

A Date or POSIXt vector used to specify which time period to return. The year value does not matter and only month, day, hour and minute value will be used when subsetting. If NULL, all time period of data is returned. Default: NULL.

month, day, hour, minute

Each is an integer vector for month, day, hour, minute subsetting of datetime column when querying on the SQL database. If NULL, no subsetting is performed on those components. All possible month, day, hour and minute can be obtained using $read_table("Time"). Default: NULL.

interval

An integer vector used to specify which interval length of report to extract. If NULL, all interval will be used. Default: NULL.

simulation_days

An integer vector to specify which simulation day data to extract. Note that this number resets after warmup and at the beginning of an environment period. All possible simulation_days can be obtained using $read_table("Time"). If NULL, all simulation days will be used. Default: NULL.

day_type

A character vector to specify which day type of data to extract. All possible day types are: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Holiday, SummerDesignDay, WinterDesignDay, CustomDay1, and CustomDay2. All possible values for current simulation output can be obtained using $read_table("Time").

environment_name

A character vector to specify which environment data to extract. If NULL, all environment data are returned. Default: NULL. All possible environment_name for current simulation output can be obtained using:

$read_table("EnvironmentPeriods")

Details

$report_data() extracts the report data in a data.table::data.table() using key values, variable names and other specifications.

$report_data() can also directly take all or subset output from $report_data_dict() as input, and extract all data specified.

The returned column numbers varies depending on all argument.

  • all is FALSE, the returned data.table::data.table() has 6 columns:

    • case: Simulation case specified using case argument

    • datetime: The date time of simulation result

    • key_value: Key name of the data

    • name: Actual report data name

    • units: The data units

    • value: The data value

  • all is TRUE, besides columns described above, extra columns are also included:

    • month: The month of reported date time

    • day: The day of month of reported date time

    • hour: The hour of reported date time

    • minute: The minute of reported date time

    • dst: Daylight saving time indicator. Possible values: 0 and 1

    • interval: Length of reporting interval

    • simulation_days: Day of simulation

    • day_type: The type of day, e.g. Monday, Tuesday and etc.

    • environment_period_index: The indices of environment.

    • environment_name: A text string identifying the environment.

    • is_meter: Whether report data is a meter data. Possible values: 0 and 1

    • type: Nature of data type with respect to state. Possible values: Sum and Avg

    • index_group: The report group, e.g. Zone, System

    • timestep_type: Type of data timestep. Possible values: Zone and HVAC System

    • reporting_frequency: The reporting frequency of the variable, e.g. HVAC System Timestep, Zone Timestep.

    • schedule_name: Name of the the schedule that controls reporting frequency.

With the datetime column, it is quite straightforward to apply time-series analysis on the simulation output. However, another painful thing is that every simulation run period has its own Day of Week for Start Day. Randomly setting the year may result in a date time series that does not have the same start day of week as specified in the RunPeriod objects.

eplusr provides a simple solution for this. By setting year to NULL, which is the default behavior, eplusr will calculate a year value (from current year backwards) for each run period that compliances with the start day of week restriction.

It is worth noting that EnergyPlus uses 24-hour clock system where 24 is only used to denote midnight at the end of a calendar day. In EnergyPlus output, "00:24:00" with a time interval being 15 mins represents a time period from "00:23:45" to "00:24:00", and similarly "00:15:00" represents a time period from "00:24:00" to "00:15:00" of the next day. This means that if current day is Friday, day of week rule applied in schedule time period "00:23:45" to "00:24:00" (presented as "00:24:00" in the output) is also Friday, but not Saturday. However, if you try to get the day of week of time "00:24:00" in R, you will get Saturday, but not Friday. This introduces inconsistency and may cause problems when doing data analysis considering day of week value.

With wide equals TRUE, $report_data() will format the simulation output in the same way as standard EnergyPlus csv output file. Sometimes this can be useful as there may be existing tools/workflows that depend on this format. When both wide and all are TRUE, columns of runperiod environment names and date time components are also returned, including: environment_period_index", "environment_name, simulation_days, datetime, month, day, hour, minute, day_type.

For convenience, input character arguments matching in $report_data() are case-insensitive.

Returns

A data.table::data.table().

Examples

\dontrun{
# read all report data
sql$report_data()

# specify output variables using report data dictionary
dict <- sql$report_data_dict()
sql$report_data(dict[units == "C"])

# specify output variables using 'key_value' and 'name'
sql$report_data("environment", "site outdoor air drybulb temperature")

# explicitly specify year value and time zone
sql$report_data(dict[1], year = 2020, tz = "Etc/GMT+8")

# explicitly specify case name
sql$report_data(dict[1], case = "example")

# get all possible columns
sql$report_data(dict[1], all = TRUE)

# return in a format that is similar as EnergyPlus CSV output
sql$report_data(dict[1], wide = TRUE)

# return in a format that is similar as EnergyPlus CSV output with
# extra columns
sql$report_data(dict[1], wide = TRUE, all = TRUE)

# only get data at the working hour on the first Monday
sql$report_data(dict[1], hour = 8:18, day_type = "monday", simulation_days = 1:7)

# only get specified run period data
sql$read_table("EnvironmentPeriods") # possible environment name
sql$report_data(dict[1], environment_name = "San Francisco Intl Ap CA USA TMY3 WMO#=724940")
# can also be done using 'environment_period_index' column
sql$report_data(dict[1], all = TRUE)[environment_period_index == 3L]
}


Method tabular_data()

Read tabular data

Usage

EplusSql$tabular_data(
  report_name = NULL,
  report_for = NULL,
  table_name = NULL,
  column_name = NULL,
  row_name = NULL,
  case = "auto",
  wide = FALSE,
  string_value = !wide
)

Arguments

report_name, report_for, table_name, column_name, row_name

Each is a character vector for subsetting when querying the SQL database. For the meaning of each argument, please see the description above.

case

A single string used to add a character column case in the returned results to indicate the case of this simulation. If NULL, no column is added. If "auto", the name of the IDF file without extension is used. Default: "auto".

wide

If TRUE, each table will be converted into the similar format as it is shown in EnergyPlus HTML output file. Default: FALSE.

string_value

Only applicable when wide is TRUE. If string_value is FALSE, instead of keeping all values as characters, values in possible numeric columns are converted into numbers. Default: the opposite of wide. Possible numeric columns indicate column that:

  • columns that have associated units

  • columns that contents numbers

Details

$tabular_data() extracts the tabular data in a data.table::data.table() using report, table, column and row name specifications. The returned data.table::data.table() has 9 columns:

  • case: Simulation case specified using case argument

  • index: Tabular data index

  • report_name: The name of the report that the record belongs to

  • report_for: The For text that is associated with the record

  • table_name: The name of the table that the record belongs to

  • column_name: The name of the column that the record belongs to

  • row_name: The name of the row that the record belongs to

  • units: The units of the record

  • value: The value of the record in string format by default.

For convenience, input character arguments matching in $tabular_data() are case-insensitive.

Returns

A data.table::data.table() with 9 columns (when wide is FALSE) or a named list of data.table::data.table()s where the names are the combination of report_name, report_for and table_name.

Examples

\dontrun{
# read all tabular data
sql$tabular_data()

# explicitly specify data you want
str(sql$tabular_data(
    report_name = "AnnualBuildingUtilityPerformanceSummary",
    table_name = "Site and Source Energy",
    column_name = "Total Energy",
    row_name = "Total Site Energy"
))

# get tabular data in wide format and coerce numeric values
str(sql$tabular_data(
    report_name = "AnnualBuildingUtilityPerformanceSummary",
    table_name = "Site and Source Energy",
    column_name = "Total Energy",
    row_name = "Total Site Energy",
    wide = TRUE, string_value = FALSE
))
}


Method print()

Print EplusSql object

Usage

EplusSql$print()

Details

$print() shows the core information of this EplusSql object, including the path of the EnergyPlus SQLite file, last modified time of the SQLite file and the path of the IDF file with the same name in the same folder.

Returns

The EplusSql object itself, invisibly.

Examples

\dontrun{
sql$print()
}

Examples

## ------------------------------------------------ ## Method `EplusSql$new` ## ------------------------------------------------ # \dontrun{ if (is_avail_eplus(8.8)) { 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) # copy to tempdir and run the model idf <- read_idf(idf_path) idf$run(epw_path, tempdir(), echo = FALSE) # create from local file sql <- eplus_sql(file.path(tempdir(), "1ZoneUncontrolled.sql")) }
#> Replace the existing IDF located at /tmp/Rtmpa0qSDH/1ZoneUncontrolled.idf.
# } ## ------------------------------------------------ ## Method `EplusSql$path` ## ------------------------------------------------ # \dontrun{ # get path sql$path()
#> [1] "/tmp/Rtmpa0qSDH/1ZoneUncontrolled.sql"
# } ## ------------------------------------------------ ## Method `EplusSql$path_idf` ## ------------------------------------------------ # \dontrun{ # get path sql$path_idf()
#> [1] "/tmp/Rtmpa0qSDH/1ZoneUncontrolled.idf"
# } ## ------------------------------------------------ ## Method `EplusSql$list_table` ## ------------------------------------------------ # \dontrun{ sql$list_table()
#> [1] "ComponentSizes" "ConstructionLayers" #> [3] "Constructions" "DaylightMapHourlyData" #> [5] "DaylightMapHourlyReports" "DaylightMaps" #> [7] "EnvironmentPeriods" "Errors" #> [9] "Materials" "NominalBaseboardHeaters" #> [11] "NominalElectricEquipment" "NominalGasEquipment" #> [13] "NominalHotWaterEquipment" "NominalInfiltration" #> [15] "NominalLighting" "NominalOtherEquipment" #> [17] "NominalPeople" "NominalSteamEquipment" #> [19] "NominalVentilation" "ReportData" #> [21] "ReportDataDictionary" "ReportExtendedData" #> [23] "ReportMeterData" "ReportMeterDataDictionary" #> [25] "ReportMeterExtendedData" "ReportVariableData" #> [27] "ReportVariableDataDictionary" "ReportVariableExtendedData" #> [29] "ReportVariableWithTime" "RoomAirModels" #> [31] "Schedules" "Simulations" #> [33] "StringTypes" "Strings" #> [35] "Surfaces" "SystemSizes" #> [37] "TabularData" "TabularDataWithStrings" #> [39] "Time" "ZoneGroups" #> [41] "ZoneInfoZoneLists" "ZoneLists" #> [43] "ZoneSizes" "Zones"
# } ## ------------------------------------------------ ## Method `EplusSql$read_table` ## ------------------------------------------------ # \dontrun{ # read a specific table sql$read_table("Zones")
#> zone_index zone_name rel_north origin_x origin_y origin_z centroid_x #> 1: 1 ZONE ONE 0 0 0 0 7.62 #> centroid_y centroid_z of_type multiplier list_multiplier minimum_x maximum_x #> 1: 7.62 2.286 1 1 1 0 15.24 #> minimum_y maximum_y minimum_z maximum_z ceiling_height volume #> 1: 0 15.24 0 4.572 4.572 1061.882 #> inside_convection_algo outside_convection_algo floor_area #> 1: 2 7 232.2576 #> ext_gross_wall_area ext_net_wall_area ext_window_area is_part_of_total_area #> 1: 278.7091 278.7091 0 1
# } ## ------------------------------------------------ ## Method `EplusSql$report_data_dict` ## ------------------------------------------------ # \dontrun{ sql$report_data_dict()
#> report_data_dictionary_index is_meter type #> 1: 6 0 Avg #> 2: 7 0 Avg #> 3: 8 0 Avg #> 4: 21 1 Sum #> 5: 40 0 Sum #> 6: 41 0 Sum #> 7: 42 0 Sum #> 8: 43 0 Sum #> 9: 44 0 Avg #> 10: 45 0 Avg #> 11: 46 0 Avg #> 12: 47 0 Avg #> 13: 48 0 Avg #> 14: 49 0 Avg #> 15: 50 0 Avg #> 16: 51 0 Avg #> 17: 52 0 Avg #> 18: 53 0 Avg #> 19: 54 0 Avg #> 20: 55 0 Avg #> 21: 56 0 Avg #> 22: 57 0 Avg #> 23: 58 0 Avg #> 24: 59 0 Avg #> 25: 60 0 Avg #> 26: 61 0 Avg #> 27: 62 0 Avg #> 28: 63 0 Avg #> 29: 64 0 Avg #> 30: 65 0 Avg #> 31: 66 0 Avg #> 32: 67 0 Avg #> 33: 68 0 Avg #> 34: 69 0 Avg #> 35: 70 0 Avg #> 36: 73 1 Sum #> 37: 83 1 Sum #> report_data_dictionary_index is_meter type #> index_group timestep_type key_value #> 1: Zone HVAC System Environment #> 2: Zone HVAC System Environment #> 3: Zone HVAC System Environment #> 4: Facility:Electricity:ExteriorLights HVAC System #> 5: Zone HVAC System ZONE ONE #> 6: Zone HVAC System TEST 352A #> 7: Zone HVAC System ZONE ONE #> 8: Zone HVAC System TEST 352 MINUS #> 9: Zone HVAC System ZN001:WALL001 #> 10: Zone HVAC System ZN001:WALL001 #> 11: Zone HVAC System ZN001:WALL001 #> 12: Zone HVAC System ZN001:WALL001 #> 13: Zone HVAC System ZN001:WALL002 #> 14: Zone HVAC System ZN001:WALL002 #> 15: Zone HVAC System ZN001:WALL002 #> 16: Zone HVAC System ZN001:WALL002 #> 17: Zone HVAC System ZN001:WALL003 #> 18: Zone HVAC System ZN001:WALL003 #> 19: Zone HVAC System ZN001:WALL003 #> 20: Zone HVAC System ZN001:WALL003 #> 21: Zone HVAC System ZN001:WALL004 #> 22: Zone HVAC System ZN001:WALL004 #> 23: Zone HVAC System ZN001:WALL004 #> 24: Zone HVAC System ZN001:WALL004 #> 25: Zone HVAC System ZN001:FLR001 #> 26: Zone HVAC System ZN001:FLR001 #> 27: Zone HVAC System ZN001:FLR001 #> 28: Zone HVAC System ZN001:ROOF001 #> 29: Zone HVAC System ZN001:ROOF001 #> 30: Zone HVAC System ZN001:ROOF001 #> 31: Zone HVAC System ZN001:ROOF001 #> 32: Zone HVAC System ZONE ONE #> 33: Zone HVAC System ZONE ONE #> 34: System Zone ZONE ONE #> 35: System Zone ZONE ONE #> 36: Facility:EnergyTransfer HVAC System #> 37: Building:EnergyTransfer HVAC System #> index_group timestep_type key_value #> name #> 1: Site Outdoor Air Drybulb Temperature #> 2: Site Daylight Saving Time Status #> 3: Site Day Type Index #> 4: ExteriorLights:Electricity #> 5: Zone Total Internal Latent Gain Energy #> 6: Other Equipment Total Heating Energy #> 7: Zone Other Equipment Total Heating Energy #> 8: Other Equipment Total Heating Energy #> 9: Surface Inside Face Temperature #> 10: Surface Outside Face Temperature #> 11: Surface Inside Face Convection Heat Transfer Coefficient #> 12: Surface Outside Face Convection Heat Transfer Coefficient #> 13: Surface Inside Face Temperature #> 14: Surface Outside Face Temperature #> 15: Surface Inside Face Convection Heat Transfer Coefficient #> 16: Surface Outside Face Convection Heat Transfer Coefficient #> 17: Surface Inside Face Temperature #> 18: Surface Outside Face Temperature #> 19: Surface Inside Face Convection Heat Transfer Coefficient #> 20: Surface Outside Face Convection Heat Transfer Coefficient #> 21: Surface Inside Face Temperature #> 22: Surface Outside Face Temperature #> 23: Surface Inside Face Convection Heat Transfer Coefficient #> 24: Surface Outside Face Convection Heat Transfer Coefficient #> 25: Surface Inside Face Temperature #> 26: Surface Outside Face Temperature #> 27: Surface Inside Face Convection Heat Transfer Coefficient #> 28: Surface Inside Face Temperature #> 29: Surface Outside Face Temperature #> 30: Surface Inside Face Convection Heat Transfer Coefficient #> 31: Surface Outside Face Convection Heat Transfer Coefficient #> 32: Zone Mean Radiant Temperature #> 33: Zone Mean Air Temperature #> 34: Zone Air Heat Balance Surface Convection Rate #> 35: Zone Air Heat Balance Air Energy Storage Rate #> 36: EnergyTransfer:Facility #> 37: EnergyTransfer:Building #> name #> reporting_frequency schedule_name units #> 1: Hourly <NA> C #> 2: Daily <NA> #> 3: Daily <NA> #> 4: Hourly <NA> J #> 5: Hourly <NA> J #> 6: Monthly <NA> J #> 7: Monthly <NA> J #> 8: Monthly <NA> J #> 9: Daily <NA> C #> 10: Daily <NA> C #> 11: Daily <NA> W/m2-K #> 12: Daily <NA> W/m2-K #> 13: Daily <NA> C #> 14: Daily <NA> C #> 15: Daily <NA> W/m2-K #> 16: Daily <NA> W/m2-K #> 17: Daily <NA> C #> 18: Daily <NA> C #> 19: Daily <NA> W/m2-K #> 20: Daily <NA> W/m2-K #> 21: Daily <NA> C #> 22: Daily <NA> C #> 23: Daily <NA> W/m2-K #> 24: Daily <NA> W/m2-K #> 25: Daily <NA> C #> 26: Daily <NA> C #> 27: Daily <NA> W/m2-K #> 28: Daily <NA> C #> 29: Daily <NA> C #> 30: Daily <NA> W/m2-K #> 31: Daily <NA> W/m2-K #> 32: Hourly <NA> C #> 33: Hourly <NA> C #> 34: Hourly <NA> W #> 35: Hourly <NA> W #> 36: Hourly <NA> J #> 37: Hourly <NA> J #> reporting_frequency schedule_name units
# } ## ------------------------------------------------ ## Method `EplusSql$report_data` ## ------------------------------------------------ # \dontrun{ # read all report data sql$report_data()
#> case datetime key_value #> 1: 1ZoneUncontrolled 2020-12-21 01:00:00 Environment #> 2: 1ZoneUncontrolled 2020-12-21 01:00:00 ZONE ONE #> 3: 1ZoneUncontrolled 2020-12-21 01:00:00 ZONE ONE #> 4: 1ZoneUncontrolled 2020-12-21 01:00:00 ZONE ONE #> 5: 1ZoneUncontrolled 2020-12-21 01:00:00 ZONE ONE #> --- #> 88485: 1ZoneUncontrolled 2020-01-01 00:00:00 Environment #> 88486: 1ZoneUncontrolled 2020-01-01 00:00:00 Environment #> 88487: 1ZoneUncontrolled 2020-01-01 00:00:00 TEST 352A #> 88488: 1ZoneUncontrolled 2020-01-01 00:00:00 ZONE ONE #> 88489: 1ZoneUncontrolled 2020-01-01 00:00:00 TEST 352 MINUS #> name units value #> 1: Site Outdoor Air Drybulb Temperature C -1.550000e+01 #> 2: Zone Total Internal Latent Gain Energy J 0.000000e+00 #> 3: Zone Mean Radiant Temperature C -1.820826e+01 #> 4: Zone Mean Air Temperature C -1.821079e+01 #> 5: Zone Air Heat Balance Surface Convection Rate W -3.595789e-02 #> --- #> 88485: Site Daylight Saving Time Status 0.000000e+00 #> 88486: Site Day Type Index 3.000000e+00 #> 88487: Other Equipment Total Heating Energy J 9.427968e+08 #> 88488: Zone Other Equipment Total Heating Energy J 0.000000e+00 #> 88489: Other Equipment Total Heating Energy J -9.427968e+08
# specify output variables using report data dictionary dict <- sql$report_data_dict() sql$report_data(dict[units == "C"])
#> case datetime key_value #> 1: 1ZoneUncontrolled 2020-12-21 01:00:00 Environment #> 2: 1ZoneUncontrolled 2020-12-21 01:00:00 ZONE ONE #> 3: 1ZoneUncontrolled 2020-12-21 01:00:00 ZONE ONE #> 4: 1ZoneUncontrolled 2020-12-21 02:00:00 Environment #> 5: 1ZoneUncontrolled 2020-12-21 02:00:00 ZONE ONE #> --- #> 30824: 1ZoneUncontrolled 2020-01-01 00:00:00 ZN001:WALL004 #> 30825: 1ZoneUncontrolled 2020-01-01 00:00:00 ZN001:FLR001 #> 30826: 1ZoneUncontrolled 2020-01-01 00:00:00 ZN001:FLR001 #> 30827: 1ZoneUncontrolled 2020-01-01 00:00:00 ZN001:ROOF001 #> 30828: 1ZoneUncontrolled 2020-01-01 00:00:00 ZN001:ROOF001 #> name units value #> 1: Site Outdoor Air Drybulb Temperature C -15.50000 #> 2: Zone Mean Radiant Temperature C -18.20826 #> 3: Zone Mean Air Temperature C -18.21079 #> 4: Site Outdoor Air Drybulb Temperature C -15.50000 #> 5: Zone Mean Radiant Temperature C -18.20835 #> --- #> 30824: Surface Outside Face Temperature C 13.06661 #> 30825: Surface Inside Face Temperature C 12.37279 #> 30826: Surface Outside Face Temperature C 12.36798 #> 30827: Surface Inside Face Temperature C 12.44925 #> 30828: Surface Outside Face Temperature C 12.12315
# specify output variables using 'key_value' and 'name' sql$report_data("environment", "site outdoor air drybulb temperature")
#> case datetime key_value #> 1: 1ZoneUncontrolled 2020-12-21 01:00:00 Environment #> 2: 1ZoneUncontrolled 2020-12-21 02:00:00 Environment #> 3: 1ZoneUncontrolled 2020-12-21 03:00:00 Environment #> 4: 1ZoneUncontrolled 2020-12-21 04:00:00 Environment #> 5: 1ZoneUncontrolled 2020-12-21 05:00:00 Environment #> --- #> 8804: 1ZoneUncontrolled 2019-12-31 20:00:00 Environment #> 8805: 1ZoneUncontrolled 2019-12-31 21:00:00 Environment #> 8806: 1ZoneUncontrolled 2019-12-31 22:00:00 Environment #> 8807: 1ZoneUncontrolled 2019-12-31 23:00:00 Environment #> 8808: 1ZoneUncontrolled 2020-01-01 00:00:00 Environment #> name units value #> 1: Site Outdoor Air Drybulb Temperature C -15.5000 #> 2: Site Outdoor Air Drybulb Temperature C -15.5000 #> 3: Site Outdoor Air Drybulb Temperature C -15.5000 #> 4: Site Outdoor Air Drybulb Temperature C -15.5000 #> 5: Site Outdoor Air Drybulb Temperature C -15.5000 #> --- #> 8804: Site Outdoor Air Drybulb Temperature C 13.1125 #> 8805: Site Outdoor Air Drybulb Temperature C 12.6125 #> 8806: Site Outdoor Air Drybulb Temperature C 11.2000 #> 8807: Site Outdoor Air Drybulb Temperature C 10.6000 #> 8808: Site Outdoor Air Drybulb Temperature C 10.9125
# explicitly specify year value and time zone sql$report_data(dict[1], year = 2020, tz = "Etc/GMT+8")
#> case datetime key_value #> 1: 1ZoneUncontrolled 2020-12-21 01:00:00 Environment #> 2: 1ZoneUncontrolled 2020-12-21 02:00:00 Environment #> 3: 1ZoneUncontrolled 2020-12-21 03:00:00 Environment #> 4: 1ZoneUncontrolled 2020-12-21 04:00:00 Environment #> 5: 1ZoneUncontrolled 2020-12-21 05:00:00 Environment #> --- #> 8804: 1ZoneUncontrolled 2020-12-31 20:00:00 Environment #> 8805: 1ZoneUncontrolled 2020-12-31 21:00:00 Environment #> 8806: 1ZoneUncontrolled 2020-12-31 22:00:00 Environment #> 8807: 1ZoneUncontrolled 2020-12-31 23:00:00 Environment #> 8808: 1ZoneUncontrolled 2021-01-01 00:00:00 Environment #> name units value #> 1: Site Outdoor Air Drybulb Temperature C -15.5000 #> 2: Site Outdoor Air Drybulb Temperature C -15.5000 #> 3: Site Outdoor Air Drybulb Temperature C -15.5000 #> 4: Site Outdoor Air Drybulb Temperature C -15.5000 #> 5: Site Outdoor Air Drybulb Temperature C -15.5000 #> --- #> 8804: Site Outdoor Air Drybulb Temperature C 13.1125 #> 8805: Site Outdoor Air Drybulb Temperature C 12.6125 #> 8806: Site Outdoor Air Drybulb Temperature C 11.2000 #> 8807: Site Outdoor Air Drybulb Temperature C 10.6000 #> 8808: Site Outdoor Air Drybulb Temperature C 10.9125
# explicitly specify case name sql$report_data(dict[1], case = "example")
#> case datetime key_value #> 1: example 2020-12-21 01:00:00 Environment #> 2: example 2020-12-21 02:00:00 Environment #> 3: example 2020-12-21 03:00:00 Environment #> 4: example 2020-12-21 04:00:00 Environment #> 5: example 2020-12-21 05:00:00 Environment #> --- #> 8804: example 2019-12-31 20:00:00 Environment #> 8805: example 2019-12-31 21:00:00 Environment #> 8806: example 2019-12-31 22:00:00 Environment #> 8807: example 2019-12-31 23:00:00 Environment #> 8808: example 2020-01-01 00:00:00 Environment #> name units value #> 1: Site Outdoor Air Drybulb Temperature C -15.5000 #> 2: Site Outdoor Air Drybulb Temperature C -15.5000 #> 3: Site Outdoor Air Drybulb Temperature C -15.5000 #> 4: Site Outdoor Air Drybulb Temperature C -15.5000 #> 5: Site Outdoor Air Drybulb Temperature C -15.5000 #> --- #> 8804: Site Outdoor Air Drybulb Temperature C 13.1125 #> 8805: Site Outdoor Air Drybulb Temperature C 12.6125 #> 8806: Site Outdoor Air Drybulb Temperature C 11.2000 #> 8807: Site Outdoor Air Drybulb Temperature C 10.6000 #> 8808: Site Outdoor Air Drybulb Temperature C 10.9125
# get all possible columns sql$report_data(dict[1], all = TRUE)
#> case datetime month day hour minute dst interval #> 1: 1ZoneUncontrolled 2020-12-21 01:00:00 12 21 1 0 0 60 #> 2: 1ZoneUncontrolled 2020-12-21 02:00:00 12 21 2 0 0 60 #> 3: 1ZoneUncontrolled 2020-12-21 03:00:00 12 21 3 0 0 60 #> 4: 1ZoneUncontrolled 2020-12-21 04:00:00 12 21 4 0 0 60 #> 5: 1ZoneUncontrolled 2020-12-21 05:00:00 12 21 5 0 0 60 #> --- #> 8804: 1ZoneUncontrolled 2019-12-31 20:00:00 12 31 20 0 0 60 #> 8805: 1ZoneUncontrolled 2019-12-31 21:00:00 12 31 21 0 0 60 #> 8806: 1ZoneUncontrolled 2019-12-31 22:00:00 12 31 22 0 0 60 #> 8807: 1ZoneUncontrolled 2019-12-31 23:00:00 12 31 23 0 0 60 #> 8808: 1ZoneUncontrolled 2020-01-01 00:00:00 12 31 24 0 0 60 #> simulation_days day_type #> 1: 1 WinterDesignDay #> 2: 1 WinterDesignDay #> 3: 1 WinterDesignDay #> 4: 1 WinterDesignDay #> 5: 1 WinterDesignDay #> --- #> 8804: 365 Tuesday #> 8805: 365 Tuesday #> 8806: 365 Tuesday #> 8807: 365 Tuesday #> 8808: 365 Tuesday #> environment_name #> 1: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB #> 2: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB #> 3: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB #> 4: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB #> 5: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB #> --- #> 8804: San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8805: San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8806: San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8807: San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8808: San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> environment_period_index is_meter type index_group timestep_type #> 1: 1 0 Avg Zone HVAC System #> 2: 1 0 Avg Zone HVAC System #> 3: 1 0 Avg Zone HVAC System #> 4: 1 0 Avg Zone HVAC System #> 5: 1 0 Avg Zone HVAC System #> --- #> 8804: 3 0 Avg Zone HVAC System #> 8805: 3 0 Avg Zone HVAC System #> 8806: 3 0 Avg Zone HVAC System #> 8807: 3 0 Avg Zone HVAC System #> 8808: 3 0 Avg Zone HVAC System #> key_value name reporting_frequency #> 1: Environment Site Outdoor Air Drybulb Temperature Hourly #> 2: Environment Site Outdoor Air Drybulb Temperature Hourly #> 3: Environment Site Outdoor Air Drybulb Temperature Hourly #> 4: Environment Site Outdoor Air Drybulb Temperature Hourly #> 5: Environment Site Outdoor Air Drybulb Temperature Hourly #> --- #> 8804: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8805: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8806: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8807: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8808: Environment Site Outdoor Air Drybulb Temperature Hourly #> schedule_name units value #> 1: <NA> C -15.5000 #> 2: <NA> C -15.5000 #> 3: <NA> C -15.5000 #> 4: <NA> C -15.5000 #> 5: <NA> C -15.5000 #> --- #> 8804: <NA> C 13.1125 #> 8805: <NA> C 12.6125 #> 8806: <NA> C 11.2000 #> 8807: <NA> C 10.6000 #> 8808: <NA> C 10.9125
# return in a format that is similar as EnergyPlus CSV output sql$report_data(dict[1], wide = TRUE)
#> case Date/Time #> 1: 1ZoneUncontrolled 12/21 01:00 #> 2: 1ZoneUncontrolled 12/21 02:00 #> 3: 1ZoneUncontrolled 12/21 03:00 #> 4: 1ZoneUncontrolled 12/21 04:00 #> 5: 1ZoneUncontrolled 12/21 05:00 #> --- #> 8804: 1ZoneUncontrolled 12/31 20:00 #> 8805: 1ZoneUncontrolled 12/31 21:00 #> 8806: 1ZoneUncontrolled 12/31 22:00 #> 8807: 1ZoneUncontrolled 12/31 23:00 #> 8808: 1ZoneUncontrolled 12/31 24:00 #> Environment:Site Outdoor Air Drybulb Temperature [C](Hourly) #> 1: -15.5000 #> 2: -15.5000 #> 3: -15.5000 #> 4: -15.5000 #> 5: -15.5000 #> --- #> 8804: 13.1125 #> 8805: 12.6125 #> 8806: 11.2000 #> 8807: 10.6000 #> 8808: 10.9125
# return in a format that is similar as EnergyPlus CSV output with # extra columns sql$report_data(dict[1], wide = TRUE, all = TRUE)
#> case environment_period_index #> 1: 1ZoneUncontrolled 1 #> 2: 1ZoneUncontrolled 1 #> 3: 1ZoneUncontrolled 1 #> 4: 1ZoneUncontrolled 1 #> 5: 1ZoneUncontrolled 1 #> --- #> 8804: 1ZoneUncontrolled 3 #> 8805: 1ZoneUncontrolled 3 #> 8806: 1ZoneUncontrolled 3 #> 8807: 1ZoneUncontrolled 3 #> 8808: 1ZoneUncontrolled 3 #> environment_name simulation_days #> 1: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB 1 #> 2: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB 1 #> 3: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB 1 #> 4: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB 1 #> 5: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB 1 #> --- #> 8804: San Francisco Intl Ap CA USA TMY3 WMO#=724940 365 #> 8805: San Francisco Intl Ap CA USA TMY3 WMO#=724940 365 #> 8806: San Francisco Intl Ap CA USA TMY3 WMO#=724940 365 #> 8807: San Francisco Intl Ap CA USA TMY3 WMO#=724940 365 #> 8808: San Francisco Intl Ap CA USA TMY3 WMO#=724940 365 #> datetime month day hour minute day_type Date/Time #> 1: 2020-12-21 01:00:00 12 21 1 0 WinterDesignDay 12/21 01:00 #> 2: 2020-12-21 02:00:00 12 21 2 0 WinterDesignDay 12/21 02:00 #> 3: 2020-12-21 03:00:00 12 21 3 0 WinterDesignDay 12/21 03:00 #> 4: 2020-12-21 04:00:00 12 21 4 0 WinterDesignDay 12/21 04:00 #> 5: 2020-12-21 05:00:00 12 21 5 0 WinterDesignDay 12/21 05:00 #> --- #> 8804: 2019-12-31 20:00:00 12 31 20 0 Tuesday 12/31 20:00 #> 8805: 2019-12-31 21:00:00 12 31 21 0 Tuesday 12/31 21:00 #> 8806: 2019-12-31 22:00:00 12 31 22 0 Tuesday 12/31 22:00 #> 8807: 2019-12-31 23:00:00 12 31 23 0 Tuesday 12/31 23:00 #> 8808: 2020-01-01 00:00:00 12 31 24 0 Tuesday 12/31 24:00 #> Environment:Site Outdoor Air Drybulb Temperature [C](Hourly) #> 1: -15.5000 #> 2: -15.5000 #> 3: -15.5000 #> 4: -15.5000 #> 5: -15.5000 #> --- #> 8804: 13.1125 #> 8805: 12.6125 #> 8806: 11.2000 #> 8807: 10.6000 #> 8808: 10.9125
# only get data at the working hour on the first Monday sql$report_data(dict[1], hour = 8:18, day_type = "monday", simulation_days = 1:7)
#> case datetime key_value #> 1: 1ZoneUncontrolled 2019-01-07 08:00:00 Environment #> 2: 1ZoneUncontrolled 2019-01-07 09:00:00 Environment #> 3: 1ZoneUncontrolled 2019-01-07 10:00:00 Environment #> 4: 1ZoneUncontrolled 2019-01-07 11:00:00 Environment #> 5: 1ZoneUncontrolled 2019-01-07 12:00:00 Environment #> 6: 1ZoneUncontrolled 2019-01-07 13:00:00 Environment #> 7: 1ZoneUncontrolled 2019-01-07 14:00:00 Environment #> 8: 1ZoneUncontrolled 2019-01-07 15:00:00 Environment #> 9: 1ZoneUncontrolled 2019-01-07 16:00:00 Environment #> 10: 1ZoneUncontrolled 2019-01-07 17:00:00 Environment #> 11: 1ZoneUncontrolled 2019-01-07 18:00:00 Environment #> name units value #> 1: Site Outdoor Air Drybulb Temperature C 8.4875 #> 2: Site Outdoor Air Drybulb Temperature C 8.9000 #> 3: Site Outdoor Air Drybulb Temperature C 9.5875 #> 4: Site Outdoor Air Drybulb Temperature C 8.6250 #> 5: Site Outdoor Air Drybulb Temperature C 7.8000 #> 6: Site Outdoor Air Drybulb Temperature C 8.4875 #> 7: Site Outdoor Air Drybulb Temperature C 8.9000 #> 8: Site Outdoor Air Drybulb Temperature C 9.5875 #> 9: Site Outdoor Air Drybulb Temperature C 9.6250 #> 10: Site Outdoor Air Drybulb Temperature C 9.0875 #> 11: Site Outdoor Air Drybulb Temperature C 8.5250
# only get specified run period data sql$read_table("EnvironmentPeriods") # possible environment name
#> environment_period_index simulation_index #> 1: 1 1 #> 2: 2 1 #> 3: 3 1 #> environment_name environment_type #> 1: DENVER CENTENNIAL GOLDEN N ANN HTG 99% CONDNS DB 1 #> 2: DENVER CENTENNIAL GOLDEN N ANN CLG 1% CONDNS DB=>MWB 1 #> 3: San Francisco Intl Ap CA USA TMY3 WMO#=724940 3
sql$report_data(dict[1], environment_name = "San Francisco Intl Ap CA USA TMY3 WMO#=724940")
#> case datetime key_value #> 1: 1ZoneUncontrolled 2019-01-01 01:00:00 Environment #> 2: 1ZoneUncontrolled 2019-01-01 02:00:00 Environment #> 3: 1ZoneUncontrolled 2019-01-01 03:00:00 Environment #> 4: 1ZoneUncontrolled 2019-01-01 04:00:00 Environment #> 5: 1ZoneUncontrolled 2019-01-01 05:00:00 Environment #> --- #> 8756: 1ZoneUncontrolled 2019-12-31 20:00:00 Environment #> 8757: 1ZoneUncontrolled 2019-12-31 21:00:00 Environment #> 8758: 1ZoneUncontrolled 2019-12-31 22:00:00 Environment #> 8759: 1ZoneUncontrolled 2019-12-31 23:00:00 Environment #> 8760: 1ZoneUncontrolled 2020-01-01 00:00:00 Environment #> name units value #> 1: Site Outdoor Air Drybulb Temperature C 7.0125 #> 2: Site Outdoor Air Drybulb Temperature C 7.2000 #> 3: Site Outdoor Air Drybulb Temperature C 6.8875 #> 4: Site Outdoor Air Drybulb Temperature C 6.3250 #> 5: Site Outdoor Air Drybulb Temperature C 5.0375 #> --- #> 8756: Site Outdoor Air Drybulb Temperature C 13.1125 #> 8757: Site Outdoor Air Drybulb Temperature C 12.6125 #> 8758: Site Outdoor Air Drybulb Temperature C 11.2000 #> 8759: Site Outdoor Air Drybulb Temperature C 10.6000 #> 8760: Site Outdoor Air Drybulb Temperature C 10.9125
# can also be done using 'environment_period_index' column sql$report_data(dict[1], all = TRUE)[environment_period_index == 3L]
#> case datetime month day hour minute dst interval #> 1: 1ZoneUncontrolled 2019-01-01 01:00:00 1 1 1 0 0 60 #> 2: 1ZoneUncontrolled 2019-01-01 02:00:00 1 1 2 0 0 60 #> 3: 1ZoneUncontrolled 2019-01-01 03:00:00 1 1 3 0 0 60 #> 4: 1ZoneUncontrolled 2019-01-01 04:00:00 1 1 4 0 0 60 #> 5: 1ZoneUncontrolled 2019-01-01 05:00:00 1 1 5 0 0 60 #> --- #> 8756: 1ZoneUncontrolled 2019-12-31 20:00:00 12 31 20 0 0 60 #> 8757: 1ZoneUncontrolled 2019-12-31 21:00:00 12 31 21 0 0 60 #> 8758: 1ZoneUncontrolled 2019-12-31 22:00:00 12 31 22 0 0 60 #> 8759: 1ZoneUncontrolled 2019-12-31 23:00:00 12 31 23 0 0 60 #> 8760: 1ZoneUncontrolled 2020-01-01 00:00:00 12 31 24 0 0 60 #> simulation_days day_type environment_name #> 1: 1 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 2: 1 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 3: 1 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 4: 1 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 5: 1 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> --- #> 8756: 365 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8757: 365 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8758: 365 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8759: 365 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> 8760: 365 Tuesday San Francisco Intl Ap CA USA TMY3 WMO#=724940 #> environment_period_index is_meter type index_group timestep_type #> 1: 3 0 Avg Zone HVAC System #> 2: 3 0 Avg Zone HVAC System #> 3: 3 0 Avg Zone HVAC System #> 4: 3 0 Avg Zone HVAC System #> 5: 3 0 Avg Zone HVAC System #> --- #> 8756: 3 0 Avg Zone HVAC System #> 8757: 3 0 Avg Zone HVAC System #> 8758: 3 0 Avg Zone HVAC System #> 8759: 3 0 Avg Zone HVAC System #> 8760: 3 0 Avg Zone HVAC System #> key_value name reporting_frequency #> 1: Environment Site Outdoor Air Drybulb Temperature Hourly #> 2: Environment Site Outdoor Air Drybulb Temperature Hourly #> 3: Environment Site Outdoor Air Drybulb Temperature Hourly #> 4: Environment Site Outdoor Air Drybulb Temperature Hourly #> 5: Environment Site Outdoor Air Drybulb Temperature Hourly #> --- #> 8756: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8757: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8758: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8759: Environment Site Outdoor Air Drybulb Temperature Hourly #> 8760: Environment Site Outdoor Air Drybulb Temperature Hourly #> schedule_name units value #> 1: <NA> C 7.0125 #> 2: <NA> C 7.2000 #> 3: <NA> C 6.8875 #> 4: <NA> C 6.3250 #> 5: <NA> C 5.0375 #> --- #> 8756: <NA> C 13.1125 #> 8757: <NA> C 12.6125 #> 8758: <NA> C 11.2000 #> 8759: <NA> C 10.6000 #> 8760: <NA> C 10.9125
# } ## ------------------------------------------------ ## Method `EplusSql$tabular_data` ## ------------------------------------------------ # \dontrun{ # read all tabular data sql$tabular_data()
#> case index report_name #> 1: 1ZoneUncontrolled 1 AnnualBuildingUtilityPerformanceSummary #> 2: 1ZoneUncontrolled 2 AnnualBuildingUtilityPerformanceSummary #> 3: 1ZoneUncontrolled 3 AnnualBuildingUtilityPerformanceSummary #> 4: 1ZoneUncontrolled 4 AnnualBuildingUtilityPerformanceSummary #> 5: 1ZoneUncontrolled 5 AnnualBuildingUtilityPerformanceSummary #> --- #> 2154: 1ZoneUncontrolled 2154 Initialization Summary #> 2155: 1ZoneUncontrolled 2155 Initialization Summary #> 2156: 1ZoneUncontrolled 2156 Initialization Summary #> 2157: 1ZoneUncontrolled 2157 Initialization Summary #> 2158: 1ZoneUncontrolled 2158 Initialization Summary #> report_for table_name #> 1: Entire Facility Site and Source Energy #> 2: Entire Facility Site and Source Energy #> 3: Entire Facility Site and Source Energy #> 4: Entire Facility Site and Source Energy #> 5: Entire Facility Site and Source Energy #> --- #> 2154: Entire Facility Warmup Convergence Information #> 2155: Entire Facility Warmup Convergence Information #> 2156: Entire Facility Warmup Convergence Information #> 2157: Entire Facility Warmup Convergence Information #> 2158: Entire Facility Warmup Convergence Information #> column_name row_name units value #> 1: Total Energy Total Site Energy GJ 82.43 #> 2: Total Energy Net Site Energy GJ 82.43 #> 3: Total Energy Total Source Energy GJ 261.06 #> 4: Total Energy Net Source Energy GJ 261.06 #> 5: Energy Per Total Building Area Total Site Energy MJ/m2 354.92 #> --- #> 2154: Heating Load Pass/Fail Convergence 2 Pass #> 2155: Heating Load Pass/Fail Convergence 3 Pass #> 2156: Cooling Load Pass/Fail Convergence 1 Pass #> 2157: Cooling Load Pass/Fail Convergence 2 Pass #> 2158: Cooling Load Pass/Fail Convergence 3 Pass
# explicitly specify data you want str(sql$tabular_data( report_name = "AnnualBuildingUtilityPerformanceSummary", table_name = "Site and Source Energy", column_name = "Total Energy", row_name = "Total Site Energy" ))
#> Classes ‘data.table’ and 'data.frame': 1 obs. of 9 variables: #> $ case : chr "1ZoneUncontrolled" #> $ index : int 1 #> $ report_name: chr "AnnualBuildingUtilityPerformanceSummary" #> $ report_for : chr "Entire Facility" #> $ table_name : chr "Site and Source Energy" #> $ column_name: chr "Total Energy" #> $ row_name : chr "Total Site Energy" #> $ units : chr "GJ" #> $ value : chr " 82.43" #> - attr(*, ".internal.selfref")=<externalptr>
# get tabular data in wide format and coerce numeric values str(sql$tabular_data( report_name = "AnnualBuildingUtilityPerformanceSummary", table_name = "Site and Source Energy", column_name = "Total Energy", row_name = "Total Site Energy", wide = TRUE, string_value = FALSE ))
#> List of 1 #> $ AnnualBuildingUtilityPerformanceSummary.Entire Facility.Site and Source Energy:Classes ‘data.table’ and 'data.frame': 1 obs. of 6 variables: #> ..$ case : chr "1ZoneUncontrolled" #> ..$ report_name : chr "AnnualBuildingUtilityPerformanceSummary" #> ..$ report_for : chr "Entire Facility" #> ..$ table_name : chr "Site and Source Energy" #> ..$ row_name : chr "Total Site Energy" #> ..$ Total Energy [GJ]: num 82.4 #> ..- attr(*, ".internal.selfref")=<externalptr> #> ..- attr(*, "sorted")= chr [1:4] "case" "report_name" "report_for" "table_name"
# } ## ------------------------------------------------ ## Method `EplusSql$print` ## ------------------------------------------------ # \dontrun{ sql$print()
#> ── EnergyPlus SQLite Output ──────────────────────────────────────────────────── #> * File: '/tmp/Rtmpa0qSDH/1ZoneUncontrolled.sql' #> * Last Modified: 2020-02-20 12:21:37 #> * Parent Idf: '/tmp/Rtmpa0qSDH/1ZoneUncontrolled.idf'
# }