MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / totalSiteEnergy

Method totalSiteEnergy

src/utilities/sql/SqlFile_Impl.cpp:991–1007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989 }
990
991 boost::optional<double> SqlFile_Impl::totalSiteEnergy() const {
992 boost::optional<double> hours = hoursSimulated();
993 if (!hours) {
994 LOG(Warn, "Reporting Total Site Energy with unknown number of simulation hours");
995 } else if (*hours != 8760) {
996 LOG(Warn, "Reporting Total Site Energy with " << *hours << " hrs");
997 }
998
999 const std::string& s = R"(SELECT Value FROM TabularDataWithStrings
1000 WHERE ReportName='AnnualBuildingUtilityPerformanceSummary'
1001 AND ReportForString='Entire Facility'
1002 AND TableName='Site and Source Energy'
1003 AND RowName='Total Site Energy'
1004 AND ColumnName='Total Energy'
1005 AND Units='GJ')";
1006 return execAndReturnFirstDouble(s);
1007 }
1008
1009 boost::optional<double> SqlFile_Impl::totalSourceEnergy() const {
1010 boost::optional<double> hours = hoursSimulated();

Callers

nothing calls this directly

Calls 1

execAndReturnFirstDoubleFunction · 0.70

Tested by

no test coverage detected