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

Method netSourceEnergy

src/utilities/sql/SqlFile_Impl.cpp:973–989  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

971 }
972
973 boost::optional<double> SqlFile_Impl::netSourceEnergy() const {
974 boost::optional<double> hours = hoursSimulated();
975 if (!hours) {
976 LOG(Warn, "Reporting Net Source Energy with unknown number of simulation hours");
977 } else if (*hours != 8760) {
978 LOG(Warn, "Reporting Net Source Energy with " << *hours << " hrs");
979 }
980
981 const std::string& s = R"(SELECT Value FROM TabularDataWithStrings
982 WHERE ReportName='AnnualBuildingUtilityPerformanceSummary'
983 AND ReportForString='Entire Facility'
984 AND TableName='Site and Source Energy'
985 AND RowName='Net Source Energy'
986 AND ColumnName='Total Energy'
987 AND Units='GJ')";
988 return execAndReturnFirstDouble(s);
989 }
990
991 boost::optional<double> SqlFile_Impl::totalSiteEnergy() const {
992 boost::optional<double> hours = hoursSimulated();

Callers

nothing calls this directly

Calls 1

execAndReturnFirstDoubleFunction · 0.70

Tested by

no test coverage detected